Linux Operating System Structure Flashcards
Responsible for interacting with system hardware
Hardware layer
The core of the operating system. Provides system with process, memory, and task management.
Kernel
Provides a connection between user space and kernel space
System Call Interface(SCI)
Responsible for creating, stopping, and communicating with system processes
Process management
Responsible for memory allocation, virtual memory, and paging
Memory management
Provides an abstraction layer for multiple filesystem types
Virtual File System
Provides protocols used in network communications
Network stack
Software used to communicate with hardware
Device drivers
System code specific to the type of processor
Architecture-dependent code
Application and user environment and interface
Shell
Used to manage the operating system
Operating system software
Editors and other user applications
Application software
Which bash configuration files are used for non-login bash shell sessions?(Choose 2) A. /etc/profile B. /etc/bashrc C. ~/.bashrc D. ~/.profile
B. /etc/bashrc
C. ~/.bashrc
You need more information on the ls command. Which commands can be used to learn how to use this utility? (Choose 2) A. ls- -help B. help ls C. ls -h D. man ls
A. ls- -help
D. man ls
You've opened the /var/opt/myapp/settings.txt file in the vi editor. You need to enter new text into the file. Which key should you press to switch into Insert mode from Normal or "Command" mode? A. I B. A C. O D. R
A.I
YAML files used to configure network cards to use DHCP or set up static IP addressing can be found where? A. /etc/X11 B. /etc/yum C. /etc/yum.repos.d D. /etc/netplan
D. /etc/netplan
To create a new directory in a user's home directory named MyFiles, you use which of the following commands? A. mkdir ~/myfiles B. mkdir ~/MyFiles C. md ~/myFiles D. mkdir ~ MyFiles
B. mkdir ~/MyFiles
The sealert utility is used to determine that a user cannot access a file. Which command would aid in troubleshooting by showing access settings? A. ls -s B. ls Z C. ls -l D. restorecon
B. ls -Z
Which vi command-line mode commands can be used to save changes to the current file being edited and close the vi editor? (Choose three) A. ZZ B. :wq C. :q D. :q! E. :x
A. ZZ
B. :wq
E. :x
You need to change the permissions of a file named widgets.odt such that the file owner can edit the file, but no other users on the system will be allowed to view or modify it. Which command will do this?
chmod 600 widgets.odt
You need to change the permissions of a file named projectx.odt such that the file owner can edit the file, users who are members of the group that owns the file can view and edit it, and users who are not owners and don’t belong to the owning group cannot view or modify it. Which command will do this?
chmod 660 projectx.odt
Which usermod command options must be used to add user accounts as members of a secondary group? (Choose two) A. -a B. -s C. -g D. -G
A. -a
D. -G
Which control structure processes over and over as long as a specified condition evaluates to false? A. while B. until C. for D. case
B. until
For designing the implementation of a new Linux server in the company’s network, the server will function as an internal file and print server for the organization. Employees will save their work-related files in shared storage locations on the server, and print jobs for shared printers will be managed by the server as well. What services should be included in the specifications?
Samba & CUPS
This process takes over and kills processes that use too much memory because they score too high under this process’s monitoring system.
OOM
Which tools can be used to check for open network ports? (Choose two) A. nmap B. lsof B. pwconv D. ssh
A. nmap
B. lsof
To insert a new kernel module into a Linux system that has no dependencies, which tool is best to use to utilize the module? A. dmesg B. modinfo C. insmod D. depmod
C. insmod
Which of the following commands is used to find the domain's mail server? A. dig B. ping C. traceroute D. route
A. dig
Which command updates ever few seconds, displaying the routers that packets use to reach their destination within a GUI? A. mtr B. traceroute C. tracert D. iftop
A. mtr
When local authentication is used on a Linux system, which file contains the passwords for the user accounts? A. /etc/passwd B. /etc/group C. /etc/gshadow D. /etc/shadow
D. /etc/shadow
Consider the following entry from the /etc/passwd file: algreer:x:1001:100:AlbertGreer:/home/algreer:/bin/bash. What user ID (UID) has been assigned to this user account? A. algreer B. 1001 C. 100 D. Albert Greer
B. 1001
Consider the following entry from the /etc/shadow file: kmorgan:$2a$05$KL1DbTBqpSEMiL.2FoI3ue4bdyR.eL6GMKs7MU6.nZl5SCC7/REUS:15043:1:60:7:5::. In how many days will this account be disabled after the user's password has expired? A. one day B. seven days C. five days D. null value (never)
C. five days
Which of the following contains files that populate new user's home directories created with useradd? A. /etc/login.defs B. /etc/default/useradd C. /etc/skel D. /etc/default/grub
C. /etc/skel
You need to create a new account for a user named Ian Mausi on a Linux system and specify a username of imausi, a full name of Ian Mausi, a default shell of /bin/bash, and that a home directory is created. What command will do this?
useradd -c “Ian Mausi” -m -s “/bin/bash” imausi
Which file keeps a list of internationally untracked files that git should ignore? A. .gitnot B. gitnot C. .gitignore D. .git
C. .gitignore
Command substitution, which allows a command to run within a command, is performed with which operators? (Choose two) A. ` ` B. $( ) C. ' ' D. " " E. $ { }
A. ` `
B. $ ( )
An administrator runs mount /dev/sdb2/external and realizes they have made a mistake because a filesystem was already mounted to /external. What happened to the files that were initially mounted onto /external?
When the administrator runs unmount /dev/sdb2 the files will reappear unharmed
A script that requires the end user to enter the name of their supervisor will use which of the following lines to input the user's response into a variable named SUP? A. read SUP B. input SUP C. prompt SUP D. query SUP
A. read SUP
When a new user attempts to run a script while in their home directory using the ./runme.sh command from the shell prompt, they see the following error: bash: ./runme.sh: Permission denied. Which resolution will fix this issue?
Enter chmod u+x runme.sh at the shell prompt
Which of the following will make for the fastest restore, and fewest number of tapes to restore, assuming the system fails shortly after the Friday backup completes?
Key: F=Full, I=Incremental,D=Differential.
A. Mon-F1, Tue-D1, Wed-I1, Thu-D2, Fri-F2
B. Mon-F1, Tue-D1, Wed-I1, Thu-D2, Fri-I2
C. Mon-F1, Tue-D1, Wed-D2, Thu-D3, Fri-D4
B. Mon-F1, Tue-D1, Wed-I1, Thu-D2, Fri-I2
Which of the following commands can convert a SHELL variable to an ENVIRONMENT variable? A. env B. export C. set D. chmod
B. export
Which command would an administrator run to generate a sequence of numbers that starts at 1, increments by 1, and stops at 100? (Choose all that apply) A. seq 1 100 B. seq 100 C. seq 1 1 100 D. seq 1-100
A. seq 1 100
B. seq 100
C. seq 1 1 100
Which command can uncover a remote user's login name and password when they connect using telnet or ftp? A. dig B. nslookup C. tcpdump D. ip
C. tcpdump
Which protocols encrypt the network traffic? (Choose two) A. SSH B. FTP C. TElnet D. HTTPS
A. SSH
D. HTTPS
Which of the following is not a single-sign-on system? A. RADIUS B. Kerberos C. TACACS+ D. Circumference
D. Circumference
Consider the following IP address: 172.17.8.10/22. Which subnet mask is assigned to this address? A. 255.255.252.0 B. 255.255.0.0 C. 255.255.255.0 D. 255.255.255.252
A. 255.255.252.0
Which command would assign the ens32 interface an IP address of 172.17.8.1 with a subnet mask of 255.255.0.0 and a broadcast address of 172.17.255.255?
ip addr add 172.17.8.1/255.255.0.0 broadcast 172.17.255.255 dev ens32
Which directive in /etc/sysconfig/network/ifcfg-eth0 is used to specify whether the interface is automatically enabled when the system is booted? A. STARTMODE B. BOOTPROTO C. IPADDR D. USERCONTROL
A. STARTMODE
Which system keeps one NIC sleeping and awakens when another NIC fails? A. Active-passive B. Active-active C. Load balancing D. Aggregation
A. Active-passive
For security reasons, a Linux system should resolve hostnames using the DNS server before trying to resolve them using the /etc/hosts file. Which file is reconfigured to change the name resolver order? A. /etc/resolv.conf B. /etc/sysconfig/network/ifcfg-eth0 C. /etc/nsswitch.conf D. /etc/sysconfig/services
C. /etc/nsswitch.conf
The /etc/sudoers file on your Linux system is configured by default such that users must supply the root password when using sudo. Which commands are best used to modify the /etc/sudoers file? (Choose two) A. gedit B. vi C. notepad D. sudoedit E. visudo
D. sudoedit
E. visudo
Which setting made in the proper file in the /etc/pam.d/ directory tracks login attempts and locks out users after multiple attempts? A. pam_access.so B. pam_loginuid.so C. pam_limits.so D. pam_tally2.so
D. pam_tally2.so
To secure the sshd service running on a Linux system from hackers, it is decided to configure it to listen for SSH requests on a port other than the default of 22. Which directive in the /etc/ssh/sshd_config file can do this? A. Port B. BindAddress C. Protocol D. Tunnel
A. Port
You want to write the stdout from the ps command to a file named myprocesses in the /tmp directory without overwriting the existing contents of that file. Which command will do this? A. ps < /tmp/myprocesses B. ps > /tmp/myprocesses C. ps <> / tmp/myprocesses D. ps >> /tmp/myprocesses
D. ps»_space; /tmp/myprocesses
Which Linux runlevel puts the system in multiuser mode as a network server with a command-line interface? A. 1 B. 2 C. 3 D. 5
C. 3
An administrator must configure the GRUB2 bootloader such that it will boot the first operating system in the boot menu by default unless an end-user manually selects an operating system within the timeout period. Which directive should be set within the /etc/default/grub configuration file to do this?
GRUB_DEFAULT=0
Which commands will switch a Linux system from a graphical environment to a multiuser text-based environment? (Choose two) A. systemctl isolate runlevel3.target B. systemctl isolate rescue.target C. systemctl isolate multi-user.target D. systemctl isolate runlevel5.target
A. systemctl isolate runlevel3.target
C. systemctl isolate multi-user.target
The systems administrator just added a third SATA hard disk to the Linux system and needs to create a GPT partition on it. Which command should they use to do this? A. fdisk /dev/sdb B. fdisk /dev/sdc C. fdisk /dev/sd2 D. fdisk /dev/sd3
B. fdisk /dev/sdc
On a Linux system with 16GB of RAM, two additional SATA hard disks(/dev/sdb and /dev/sdc) are added to the system and a partition is created on each one. The partitions are defined as LVM physical volumes. Which command is run to add both physical volumes to a new volume group named DATA?
vgcreate DATA /dev/sdb1 /dev/sdc1
Which statements are true about logical volumes? (choose three)
A. Logical volumes may be extended and resized
B. Logical volumes and RAID are the same
C. Logical volume can span multiple block devices
D. The command lvscan will display a list of logical volumes.
A, C, D
A new Linux system was installed about a week ago. Three days ago, an administrative user compiled and installed a new application from source code. Now, the Ethernet interface in the system sporadically goes offline. What command does the administrator run to see the boot messages generated by the system when it was in a pristine state shortly after being installed?
journalctl -b 2
The following content is listed in what file? # Virtual consoles tty1 tty2 tty3
/etc/securetty
After installing GIT, which two configuration properties must you define before issuing a commit? A. Username and e-mail address B. MAC address and project name C. IP address and MAC address D. Username and password
A. Username and e-mail address
Which of the following is not a Linux Desktop Environment? A. GNOME B. VNC C. Unity D. Cinnamon
B. VNC
You have lost the system's root password. What must you add to the kernel line in the Grub bootloader to change root's password? A. init=1 B. systemd.unit=rescue.target C. systemd.unit=emergency.target D. init=/bin/sh
D. init=/bin/sh