| Introduction to Basic Unix System Administration | ||
|---|---|---|
| <<< Previous | Exercises | Next >>> |
The following are exam questions from various certification programs. Use the system documentation to find the answers.
If you wanted to turn off mail notification, what command would you use?
biff n
mesg n
mesg off
notify off
set notify=off
Which of these commands could you use to show one page of output at a time?
more
less
set
pause
grep
Which commands will give you information about how much disk space each file in the current directory uses?
ls -l
ls -la
du .
ls -a
ls
What command would send the output of cmd1 to the input of cmd2?
cmd1 | cmd2
cmd1 || cmd2
cmd1 && cmd2
cmd1 ; cmd2
cmd1 cmd2
Under the bash shell, when a command is running, pressing control-Z will usually
suspend the foreground task.
adds an EOF to the file.
kill the command running in the foreground.
move the foreground task into the background.
log the user off.
What is the 'man' command used for?
to display information about the syntax for a command
it is the replacement for the 'boy' command
it is a standard alias to 'ls -la | more'
it is used to display formatted html pages
In which file might you find the following entry: root:x:0:0::/root:/bin/bash ?
Under the bash shell which is the most appropriate place to set environment variables that apply to all users?
/etc/profile
rc.local
rc.sysinit
/etc/skel
/etc/bashrc
Which statement describes the cron daemon?
Manages scheduling of routine system tasks
Manages all incoming connections and spawns off child processes
Is responsible for file sharing across a network
Manages the printing subsystem
Keeps track of system messages and errors
How can you best see how much free space you have in your current directory?
Use df .
Use df
Use du /
Use du .
Use df /
Which command(s) would you use to alter the permissions of a file
chown
change
chattr
chmod
set
Which statement describes the LPD daemon?
Manages the printing subsystem
Manages all incoming connections and spawns off child processes
Is responsible for file sharing across a network
Manages scheduling of routine system tasks
Manages processes running in the background
Type the full command you could use to decompress the file "foo.gz"
decompress foo.gz
unzip foo.gz
gzip -d foo.gz
gunzip -d foo.gz
gunzip foo.gz
What are the contents of the SSH (secure shell) file /etc/ssh_known_hosts?
Public keys of known hosts.
User identity.
List of IP numbers of trusted hosts.
List of names of trusted hosts.
Private keys of known hosts.
cat < foo.bar > cat ; cat cat | xargs -iV touch V # > file.out
Which one of the following is the result of the command listed above?
It updates the date on all filenames listed in foo.bar or creates blank files.
It lists all files in foo.bar to the file cat in the current directory. It then concatenates cat, pipes it to xargs, which interactively views each file to the stdout and appends touch to each line. It then writes the results to file.out
It does not do anything.
It reads the contents of foo.bar, updates the date of foo.bar, and outputs two copies of foo.bar in the file file.out.
It reads foo.bar to a file named touch in the local directory.
Filesystem 1k-blocks Used Available Use% Mounted on /dev/hda1 1018298 428839 536848 44% / /dev/hda6 3051748 2674311 219600 92% /home /dev/hda5 3780823 3488317 96917 97% /usr |
What command produces the output above?
ls
fs
free
df
du
command -U username -P password
Based on the above, which one of the following explains why you should NOT enter a password on the command line for certain programs?
Many programs do not clear their command line copy buffer between invocations, and the next person to run the program will default to the previous password.
Many programs are subject to buffer overflow errors if passwords are entered on a command line.
Other users on the system can see the command line arguments.
Export regulations on encryption do not allow strong encryption to secure the passwords passed through the shell.
There is no problem with using command line passwords.
Many users prefer to use SSH rather than normal telnet. Why?
It disables packet sniffers.
It provides better logs.
It allows for better communication.
It encrypts the whole connection.
It encrypts the password.
| <<< Previous | Home | Next >>> |
| Exercises | Up | Glossary |