Upgrade to remove ads
LINUX FINAL (9-16)
Terms in this set (81)
Which are appropriate editors for writing shell scripts?
Most of nanos commands take the form of:
Control and another character
Which of the following are correct about for and while loops?
for loops operate over a fixed list of items
while loops have a test each cycle to determine if it should run again
Given the following part of a script:
if [ -f $1 ]; then
echo I am here
What is the meaning of $1?
It is the first argument passed into the script
Given the following script that is run through ./test.sh hello goodbye:
if [ -f $2 ]; then
echo "I am here"
When will I am here be printed?
If a file called "goodbye" exists in the current directory
What is the correct way to save the current directory to a variable?
Which shell command accepts input from the users keyboard?
How would you finish your script with an exit code of 42?
A conditional that lets you make multiple comparisons with a pattern is called:
What is the meaning of $(( $i + 1)) ?
1 will be added to the i variable
How would you write a test that says if /tmp/foo is a directory or USERS is greater than 5?
test d /tmp/foo o $USERS gt 5
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
What information is held inside $? ?
The previous commands exit code
A file begins with #!/bin/csh. This means:
Running the script will invoke /bin/csh to interpret the rest of the file
The echo command:
Is used to output text to the console
Which of the following are valid CPU types for Intel-based platforms?
32 and 64 bit
64 bit platforms can access more memory than 32 bit platforms.
A CPU flag...
...defines the features that the CPU supports
Which command displays information from SMBIOS?
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
Which of the following are common busing systems?
The fdisk command is a tool used for working with the MBR partitioned disks.
Which of the following are valid video cable connector types?
Which of the following commands will display CPU information?
`A division of a hard drive may be referred to as a _______ .
Which of the following are valid partitioning types?
Which of the following is the valid device file name for the first IDE hard drive on the system?
What does the acronym RPM mean?
RPM Package Management
Which of the following are package management commands for distributions with software distributed in files ending in .rpm?
The Linux kernel mounts the following pseudo-filesystems to provide access to information about hardware devices connected to the system:
The /proc directory contains a subdirectory for each process present on the system.
The free command outputs statistics about:
Which log file contains messages regarding authentication and authorization?
A load average of 1.0 always means the system is fully loaded.
A command that will continuously update statistics about running processes:
The following are valid Linux option styles:
Traditional Unix with a single dash (-)
BSD Unix without a dash
GNU long options with two dashes (--)
To get a list of all packages installed on a system using RPM Package Management you can execute:
Which of the following would be considered a host?
A printer attached to the network via an IP address
A service is...
...a feature provided by one computer to another.
A network packet contains ...
...the IP address of the destination machine.
...the IP address of the source machine.
Only servers have hostnames.
Which of the following are valid IPv4 addresses?
Which of the following commands will display the routing table?
Which of the following commands will allow you to log into a remote machine?
What option to the netstat command has information shown as numbers rather than names?
Which of the following commands will allow you to log into the machine server1 with the account name nick?
The RSA key fingerprint allows the dig command to connect to remote systems.
Which user can view the /etc/shadow file?
The root user
Each user belongs to at least one group.
Which command will display the users that are currently logged in to the system?
Which of the following commands will display the group(s) a user belongs to?
Which of the following commands will display the groups that the user bob belongs to?
A user can belong to...
At least 16 groups
Sudo privileges can be used to specify which user can use the sudo command to execute commands as other users.
Which command can be used to view the /etc/passwd file entries?
The /etc/sudoers file should be edited directly by root using the visudo command.
Which files contain user account information?
UIDs 1-500 are usually reserved for what kind of users?
System accounts, such as server processes
Which option for the usermod command can be used to specify a user's group ID (either primary or secondary)?
For non-root users, the passwd command can only be used to change the password of the user running the command.
The userdel command will...
...delete the user account, but leave the user's files by default.
The groupmod command can be used to change a group GID.
Which of the following commands can be used to modify a group?
What directory contains user's home directories?
The chown command can be used to change the owner and group of a file.
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
Octal notation uses the following values for the permissions granted:
r = 4, w = 2, x = 1
Which of the following permissions would allow all users to add, view, and delete files in a directory?
A user cannot delete a file if they do not own it.
The chmod command can be used on a file by:
The file owner and root
Which option for the chown command can be used to change the owner of a directory and all the files and directories below it?
The user owner of a file will always have the same or higher permissions as "other".
The /tmp directory is a temporary directory and will not exist on a system at all times.
The "sticky bit" permission...
...prevents others from removing files they don't own from a common directory.
Which of the following commands will set the "sticky bit" on /shared ?
chmod 1777 /shared
Which of the following commands will set setuid for /usr/bin/program?
chmod 4755 /usr/bin/program
The setgid permission...
...allows a command to be run as the group owner of the file.
...allows files created in a directory to be owned by the group that owns the directory.
Deleting a source file will break an associated hard link.
A source and a hard link must be part of the same filesystem.
Deleting a source file will break an associated symbolic link.
A source file and a symbolic link must be part of the same file system.
THIS SET IS OFTEN IN FOLDERS WITH...
COMP3060 Linux Exam (Chapter 10) REVISED
COMP3060 Linux Exam (Chapter 7)
Chapter 14 Quiz Linux
YOU MIGHT ALSO LIKE...
NDG Linux Essentials - Final Ch 9-16
Ioka Ward Leadership
NDG Linux Essentials Chapter 9 and 10
OTHER SETS BY THIS CREATOR
CCNA (2015) Final Exam
COMP3097: iOS Final Exam
COMP3060 Linux Exam (Chapter 9)
COMP3060 Linux Exam (Chapter 13)
OTHER QUIZLET SETS
CISCO CCNP Security 642-637 chapter 16
AP Psychology Unit 10 Study Guide
Science|Plant Growth and Development