Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CORRECT - See section 9.4
- Most of nanos commands take the form of:
- Control and another character
- CORRECT - See section 9.5.2
- What does this shell script do?
- FOO=/tmp/foo
- if [ ! d $FOO ]; then
- mkdir $FOO
- fi
- Creates /tmp/foo if it does not exist
- CORRECT - See section 9.5.1
- Given the following part of a script:
- if [ -f $1 ]; then
- echo I am here
- fi
- What is the meaning of $1?
- It is the first argument passed to the script
- WRONG - See section 9.5.1
- What is the correct way to assign the word "Hello" to a variable?
- $A=Hello
- CORRECT - See section 9.5.1
- Which shell command accepts input from the users keyboard?
- read
- CORRECT - See section 9.5.1
- How would you finish your script with an exit code of 42?
- exit 42
- CORRECT - See section 9.5.2
- The if command looks for what exit code to consider a condition to be true?
- 0
- CORRECT - See section 9.5.2
- The number of users logged in is in a variable called USERS. How would you test to see if 5 users are logged in?
- test $USERS eq 5
- WRONG - See section 9.5.2
- Given the following script:
- while [ ! f /tmp/foo ]; do
- echo n .
- process_data > /tmp/foo
- done
- Which of the following are true?
- If a file called /tmp/foo exists, process_data wont be run
- process_data will never be run
- WRONG - See section 9.5.2
- How would you write a test that says if /tmp/foo is a directory or USERS is greater than 5?
- test d /tmp/foo | $USERS > 5
- CORRECT - See section 10.3
- 64 bit platforms can access more memory than 32 bit platforms.
- True
- WRONG - See section 10.3
- Which of the following commands will display CPU information?
- cpuinfo
- lscpu
- cat /proc/cpuinfo
- CORRECT - See section 10.3
- A CPU flag...
- ...defines the features that the CPU supports
- CORRECT - See section 10.4.2
- Choose all of the following statements that are true in regard to virtual RAM:
- Virtual RAM is used when available physical RAM is low.
- Virtual RAM is also called swap space
- Virtual RAM is stored on a hard drive
- CORRECT - See section 10.4.3
- Which of the following are common busing systems?
- USB
- PCI
- WRONG - See section 10.6
- A division of a hard drive may be referred to as a _______ . (Choose 2)
- partition
- block
- CORRECT - See section 10.6
- Which of the following are valid partitioning types?
- MBR
- GPT
- CORRECT - See section 10.6
- The fdisk command is a tool used for working with the MBR partitioned disks.
- True
- CORRECT - See section 10.6
- Which of the following is the valid device file name for the first IDE hard drive on the system?
- /dev/hda
- CORRECT - See section 10.7
- Which of the following are valid video cable connector types?
- VGA
- DVI
- CORRECT - See section 11.3.2
- What does the acronym RPM mean?
- RPM Package Management
- CORRECT - See section 11.4
- The /proc directory contains a subdirectory for each process present on the system.
- True
- CORRECT - See section 11.4
- The Process ID (PID) of the init process is
- 1
- CORRECT - See section 11.6
- The process (ps) command shows only processes running in the current shell by default.
- True
- CORRECT - See section 11.8
- The free command outputs statistics about:
- Memory usage
- CORRECT - See section 11.7
- A load average of 1.0 always means the system is fully loaded.
- False
- CORRECT - See section 11.7
- A command that will continuously update statistics about running processes:
- top
- CORRECT - See section 11.6
- The following are valid Linux option styles:
- Traditional Unix with a single dash (-)
- BSD Unix without a dash
- GNU long options with two dashes (--)
- CORRECT - See section 11.4
- Which file contains the information passed to the kernel at boot time?
- /proc/cmdline
- CORRECT - See section 11.3.2.4
- To get a list of all packages installed on a system using RPM Package Management you can execute:
- rpm -qa
- CORRECT - See section 12.3
- Which of the following would be considered a host?
- A printer attached to the network via an IP address
- CORRECT - See section 12.5
- A network packet contains ...
- ...the IP address of the destination machine.
- ...the IP address of the source machine.
- CORRECT - See section 12.4
- Only servers have hostnames.
- False
- CORRECT - See section 12.4
- Which of the following protocols defines how network communication functions?
- TCP/IP
- CORRECT - See section 12.5
- Which of the following are valid IPv4 addresses?
- 192.105.10.10
- 10.33.55.77
- CORRECT - See section 12.7.1
- The name of the primary wired network devices is ether0.
- False
- CORRECT - See section 12.7.1
- Which of the following commands will display your machine's IP address?
- ifconfig
- CORRECT - See section 12.7.6
- Which of the following commands will allow you to log into a remote machine?
- ssh
- CORRECT - See section 12.7.6
- Which of the following commands will allow you to log into the machine server1 with the account name nick?
- ssh nick@server1
- CORRECT - See section 12.7.6.1
- The RSA key fingerprint allows the dig command to connect to remote systems.
- False
- CORRECT - See section 13.3
- Which files contain user account information?
- /etc/passwd
- /etc/shadow
- CORRECT - See section 13.7.1
- The /etc/sudoers file should be edited directly by root using the visudo command.
- True
- CORRECT - See section 13.3.4
- Which of the following commands will display the group(s) a user belongs to?
- id
- WRONG - See section 13.3.4
- Which of the following commands will display the groups that the user bob belongs to?
- group bob
- groups -a
- CORRECT - See section 13.4.1
- The /etc/group file follows what structure?
- group_name:password_placeholder:GID:user_list
- CORRECT - See section 13.4.1
- A GID is associated with a group name.
- True
- CORRECT - See section 13.7.1
- Sudo privileges can be used to specify which user can use the sudo command to execute commands as other users.
- True
- CORRECT - See section 13.7.1
- In distributions that do not allow the root user to login directly or via the su command, the installation process automatically configures one user account to be able to use the sudo command to execute commands as if they were executed by the root user.
- True
- CORRECT - See section 13.3.2
- The /etc/shadow file contains plain-text passwords.
- False
- WRONG - See section 13.3.3
- Which command can be used to view the /etc/passwd file entries?
- uppasswd
- CORRECT - See section 14.13
- If a user is deleted, the files and directories that the user owned...
- ...will show a UID as the owner, but not user name.
- CORRECT - See section 14.8.1
- Which of the following options for the useradd command allows root to specify supplementary groups the user will be a member of?
- -G
- CORRECT - See section 14.12.1
- The usermod command can be used to do all of the following except...
- ...change the user's MAX and MIN password settings.
- CORRECT - See section 14.12.1
- Which option for the usermod command can be used to specify a user's group ID (either primary or secondary)?
- -g
- -G
- CORRECT - See section 14.10
- For non-root users, the passwd command can only be used to change the password of the user running the command.
- True
- CORRECT - See section 14.13
- The userdel command will...
- ...delete the user account, but leave the user's files by default.
- WRONG - See section 14.4
- The groupmod command can be used to change a group name.
- False
- CORRECT - See section 13.3.4
- Which of the following commands can be used to modify a group?
- groupmod
- CORRECT - See section 14.12.1
- Which of the following commands, run as root, will prevent the user bob from logging in?
- usermod -L bob
- CORRECT - See section 19.4
- What directory contains user's home directories?
- /home
- CORRECT - See section 15.7.3
- Which of the following commands sets "other" permissions on file to r-x?
- chmod 775 file
- CORRECT - See section 15.6
- The chown command can be used to change the owner and group of a file.
- True
- CORRECT - See section 15.2
- The chgrp command can be used to change the owner and group of a file.
- False
- WRONG - See section 15.7
- The user sysadmin will be able to read the file because they own it.
- ----r--r-- 1 sysadmin group 38270 Sep 2 18:49 file
- True
- CORRECT - See section 15.7.2
- The user sysadmin will be able to change the permissions of the file because they own it.
- ----r--r-- 1 sysadmin group 38270 Sep 2 18:49 file
- True
- CORRECT - See section 15.7.3
- Octal notation uses the following values for the permissions granted:
- r = 4, w = 2, x = 1
- CORRECT - See section 15.7
- A user cannot delete a file if they do not own it.
- False
- CORRECT - See section 15.7
- The "execute" permission on a directory allows you to:
- Along with read permission to successfully perform ls -l
- Along with write permission to successfully create new files
- Change to that directory or use it as part of a path
- CORRECT - See section 15.6
- Which option for the chown command can be used to change the owner of a directory and all the files and directories below it?
- -R
- WRONG - See section 15.6
- The chown command will only accept one file at a time as an argument.
- True
- CORRECT - See section 16.9
- The /tmp directory is a temporary directory and will not exist on a system at all times.
- False
- CORRECT - See section 16.7
- The "sticky bit" permission...
- ...prevents others from removing files they don't own from a common directory.
- CORRECT - See section 16.3
- Which of the following commands will set setuid for /usr/bin/program?
- chmod 4755 /usr/bin/program
- WRONG - See section 16.4
- The setgid permission...
- ...prevents the group owner of a file from being changed.
- ...allows files created in a directory to be owned by the group that owns the directory.
- CORRECT - See section 16.6
- Which of the following commands will set setgid on /shared ?
- chmod 2777 /shared
- CORRECT - See section 16.5
- Setting setgid on a directory...
- ...will set the group owner of all files created in the directory to the group owner of the directory.
- CORRECT - See section 16.8.3
- A source and a hard link must be part of the same filesystem.
- True
- CORRECT - See section 16.8.3
- Deleting a source file will break an associated symbolic link.
- True
- CORRECT - See section 16.8.3
- A source file and a symbolic link must be part of the same file system.
- False
- CORRECT - See section 16.8.1
- Which of the following commands would create a hard link, link to file?
- ln file link
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement