Question 1: You want all messages from the kernel with a priority of "warn" or higher to be displayed on your 10th virtual terminal. What line in /etc/syslog.conf would guarantee this? |
 |
kernel.=warn /dev/tty10 |
 |
kern.=warn /dev/tty10 |
 |
kern.warn /dev/tty9 |
 |
kernel.warn /dev/tty10 |
 |
kern.warn /dev/tty10 |
|
Question 2: How would you assign the result of the calculation 5 + 4 to the enviroment variable SUM in the bash shell? |
 |
let SUM=5+4 |
 |
set SUM=5+4 |
 |
set $SUM=5+4 |
 |
let $SUM=5+4 |
 |
SUM=5+4 |
|
Question 3: Which command would copy the whole directory tree, including all subdirectories under /home/foo to /tmp? |
 |
cp -r /home/foo /tmp |
 |
xcp -s /home/foo /tmp |
 |
cp /home/foo /tmp |
 |
mv -cr /home/foo /tmp |
 |
cp -s /home/foo /tmp |
|
Question 4: How could you get the number of all accounts on your system, including administrative and system accounts? |
 |
wc -l /etc/passwd |
 |
numusers -r |
 |
userinfo --get_num |
 |
userinfo -n |
 |
count --lines /etc/passwd |
|
Question 5: What would the following command result in? cp /home/foo/bar /home/bar/foo /foo |
 |
This isn't a valid commandline |
 |
The files /home/foo/bar and /home/bar/foo are copied into the directory /foo |
 |
The files /home/foo/bar and /home/bar/foo are copied together in the file /foo |
 |
The file /home/foo/bar is copied into the directorys /home/bar/foo and /foo |
 |
The files /home/foo/bar, /home/bar/foo, and /foo are copied into the current directory |
|
Question 6: How could you start the command foo in the background? |
 |
foo -bg |
 |
bg foo |
 |
foo --background |
 |
background foo |
 |
foo & |
|
Question 7: What is a zombie-process? |
 |
A hung process which refuses to accept keyboard input |
 |
A process which isn't reachable by any signals |
 |
A process without own terminal |
 |
A process which kills other processes |
 |
A process which has already done its work but couldn't die due to other reasons |
|
Question 8: What tool could you use to change the nice value of a running process? |
 |
renice |
 |
nice |
 |
ps |
 |
top |
 |
setpriority |
|
Question 9: Which of the following regular expressions fits all words, starting with an uppercase letter and ending with an d (using grep)? |
 |
\b[A-Z].*d\b |
 |
\b[A-Z]*d\b |
 |
[A-Z].*d |
 |
[A-Z]*d |
 |
[A-Z]..d |
|
Question 10: What statement concerning the following wildcard is correct? [A-Z]\* |
 |
All files beginning with an non numeric letter |
 |
All files beginning with one of the letters A, Z or - |
 |
All files beginning with an uppercase letter followed by the backslash |
 |
All files beginning with an uppercase letter followed by one * |
 |
All files without numbers in their names |
|
Question 11: Which of these commands could you use to show one page of output at a time? |
 |
less |
 |
sed |
 |
more |
 |
pause |
 |
grep |
|
Question 12: How could you monitor the amount of free blocks on /dev/hda3? |
 |
df /dev/hda3 |
 |
ls -i /dev/hda3 |
 |
du -b /dev/hda3 |
 |
inode --free /dev/hda3 |
 |
dm -i /dev/hda3 |
|
Question 13: Consider a mounted partition /dev/hdc7 is mounted on /mnt. Which commands could be used to unmount this filesystem? |
 |
unmount /mnt |
 |
umount /dev/hdc7 |
 |
unmount /dev/hdc7 |
 |
mount -u /dev/hdc7 |
 |
umount /mnt |
|
Question 14: How could you generate a report of the user quota of /home? |
 |
edquota /home |
 |
quota --report /home |
 |
quotaed /home |
 |
quotarep /home |
 |
repquota /home |
|
Question 15: In the directory /home/foo exists a file named bar which is a symbolic link to /etc/services. If you would copy the link to /tmp using the command cp -d /home/foo/bar /tmp what would happen? |
 |
The destination /tmp/bar is a regular file with the same content as /etc/services |
 |
Nothing. The cp-command is not made for copying links. |
 |
The destination /tmp/bar is a symbolic link to /etc/services |
 |
The destination /tmp/bar is a symbolic link to /home/foo/bar |
 |
The cp command would ask you whether to create a link or a file |
|
Question 16: What would the following command search for? find / -perm +4000  |
 |
All files which are "unchanged" since more than 4000 minutes. |
 |
All files which are networking sockets with a permanent connection and which have transmitted more than 4000 Bytes |
 |
All files with a permission of at least 4000 |
 |
All files which are permutated more than 4000 minutes ago. |
 |
All files which are permutated more than 4000 times. |
|
Question 17: Which commands will give you information about how much disk space each file in the current directory uses? |
 |
ls -la |
 |
ls -a |
 |
ls |
 |
ls -l |
 |
du |
|
Question 18: What would be the result of the following command? init 3 |
 |
The first three tasks of the system initialization are started. |
 |
The process with PID 3 is forced to read it's configuration file. |
 |
The system switches to runlevel 3. |
 |
The system ist initialised three times for security reasons. |
 |
The job with the JobID 3 is initialised after being suspended. |
|
Question 19: What is the command to built a new manpage index database? |
 |
mandb-update |
 |
updatemandb |
 |
updatedb |
 |
mandb |
 |
mkindex |
|
Question 20: What command would send the output of cmd1 to the input of cmd2? |
 |
cmd1 && cmd2 |
 |
cmd1 || cmd2 |
 |
cmd1 | cmd2 |
 |
cmd1;cmd2 |
 |
cmd1 cmd2 |
|
Question 21: What command would you use to create a new group named foo? |
 |
mkgrp foo |
 |
create --group=foo |
 |
addgroup foo |
 |
groupadd foo |
 |
newgrp foo |
|
Question 22: What is described by the PS1 and PS2 enviroment variable? |
 |
PS2 is a link to the mouse-port of a ps/2 mouse, PS1 doesn't exist |
 |
Postscript Level 1 and Level 2 capabilities |
 |
The normal prompt and the following prompt of the shell |
 |
The different levels for the Power Save Mode |
 |
Shortcuts for the commands "ps" and "ps uax" |
|
Question 23: Having booted into runlevel 3, how would you change the runlevel 5 without rebooting? |
 |
telinit 5 |
 |
setinit 5 |
 |
ALT-F7-5 |
 |
startx |
 |
run 5 |
|
Question 24: The file /etc/syslog.conf contains the following line:*.=crit /var/log/warn |
 |
All messages of all facilities with priority "crit" are written into the file /var/log/warn |
 |
The syslog daemon reads its rules for all facilities with priority "crit" or any higher priority out of the file /var/log/warn |
 |
The syslog daemon reads its rules for all facilities with priority "crit" out of the file /var/log/warn |
 |
All messages of all facilities with priority "crit" or any higher priority are written into the file /var/log/warn |
 |
The file /var/log/warn contains a list of all errors which are defined as critical |
|
Question 25: You've defined an enviroment variable FOO with the content "bar" and now you want to start a new shell typing "bash". What of the following is neccesary to ensure, that the variable FOO has its content "bar" also in the new shell? |
 |
You have to open the shell with a leading dot (. bash) |
 |
You have to type the command "export FOO" before you start the new shell. |
 |
It is impossible to have the same variable in different shells. |
 |
Nothing, the content of a variable is automaticly inherited to the later shells. |
 |
You have to type the command "import FOO" after you've started the new shell. |
|
Question 26: How could you describe the following commandline? foo; bar; foobar |
 |
The commands foo, bar and foobar are processed one after another. |
 |
The command foo is processed. If it results without error, then bar and foobar are processed. |
 |
This isn't a valid commandline |
 |
The command foo is processed. If it results without error, then bar will be processed. If bar results without error, foobar will be processed. |
 |
The commands foo, bar and foobar are processed at the same time. |
|
Question 27: You've defined an enviroment variable FOO with the content "bar" and now you start a new shell typing "bash". Which of the following statements is true? |
 |
If you type "echo .. $FOO" you see the word "bar" as a result. |
 |
If you type "echo $FOO" you see an error message on the screen. |
 |
If you type "echo $FOO" you see an empty line as result. |
 |
If you type "echo $FOO" you see the word "bar" as a result. |
 |
If you type "echo . $FOO" you see the word "bar" as a result. |
|
Question 28: Which of the following commands could be used to search for a particular term inside a textfile without opening the file? |
 |
less |
 |
ex |
 |
grep |
 |
vi |
 |
sed |
|
Question 29: What would be the result of the following command? cp *.* /tmp |
 |
All files in the current directory would be copied to /tmp |
 |
This is a DOS-command - it has no meaning under Linux |
 |
All files in the current directory, which have one or more dots (.) inside their names - but neither at the begining nor at the end of the name would be copied to /tmp |
 |
All files in the current directory, which have one or more dots (.) anywhere inside their names but not at the beginning would be copied to /tmp |
 |
All files in the current directory, which have exactly one dot (.) inside their names would be copied to /tmp |
|
Question 30: Which command would change the owner of all files and subdirectories under /home/foo to foobar? |
 |
chown --recursive foobar /home/foo |
 |
chown foobar /home/foo |
 |
chown -R foobar /home/foo |
 |
chown -r foobar /home/foo |
 |
chmod foobar /home/foo |
|
Question 31: What command would you use to copy all files inside the current directory which names end with a number to /tmp |
 |
cp *[ |
 |
cp *.[0-9] /tmp |
 |
cp [*0-9] /tmp |
 |
cp *[0-9] /tmp |
 |
cp ?[0-9] /tmp |
|
Question 32: What is the number of the first logical partition on /dev/hda? |
 |
/dev/hda4 |
 |
/dev/hda1 |
 |
/dev/hdal1 |
 |
/dev/hda2 |
 |
/dev/hda5 |
|
Question 33: How could you check the integrity of a non mounted filesystem /dev/hdb7 even if it has a valid cleanflag? |
 |
chkdsk /dev/hdb7 |
 |
fsck /dev/hdb7 |
 |
fsck -f /dev/hdb7 |
 |
fschk -f /dev/hdb7 |
 |
hdcheck --force /dev/hdb7 |
|
Question 34: Under the bash shell which is the most appropriate place to set environment variables that apply to all users? |
 |
etc/profiles |
 |
/etc/profile |
 |
rc.sysinit |
 |
/etc/skel |
 |
rc.local |
|
Question 35: You want your users to be able to mount the CD-Rom on /dev/hdc. What is the right way to enable them? |
 |
Add the entry "may_mount(/dev/hdc)" into the users line inside /etc/passwd |
 |
Add the SUID-Bit to the /bin/mount command |
 |
Add the entry "user,noauto" to the options of the filesystem in /etc/fstab |
 |
Add the appropriate usernames to /etc/mountusers |
 |
Change the file permissions of /dev/hdc so that all users can write to this file. |
|
Question 36: What is the meaning of the sticky bit applied to a directory? |
 |
A user with write permission in this directory may not create any file there. |
 |
A user with write permission in this directory may not remove any file inside the directory if he is not the owner of the file to remove. |
 |
Everybody may read the content of the directory |
 |
Any user may remove files inside this directory, even if he is not the owner of the file to remove. |
 |
Nothing. The sticky bit is only used for regular files. |
|
Question 37: How could you read the current umask setting? |
 |
which umask |
 |
echo $umask |
 |
umask |
 |
umask --show |
 |
echo $UMASK |
|
Question 38: You create a symbolic link bar which points to the file foo. If you remove the file foo, what happens? |
 |
The link exists and it is possible to have access to it's content |
 |
The link exists but any access would lead to an error |
 |
The link is automaticly removed, too |
 |
The link but not the file was removed. |
 |
The link is automaticly changed into a regular file with the content of foo. |
|
Question 39: How could you get the following information: Which GID has the default group of user foo? |
 |
grep foo /etc/group | cut -d: -f4 |
 |
getuserinfo -gid foo |
 |
defgrp -n foo |
 |
grep foo /etc/passwd | cut -d: -f4 |
 |
defgrp foo |
|
Question 40: You have two program files named foo. One of them is located in /usr/local/bin and the other in /usr/X11R6/bin. How can you find out, which of the both commands would be used, when you just type the command foo? |
 |
find /usr -exec foo |
 |
find / -name foo |
 |
locate foo |
 |
which foo |
 |
find / -exec foo |
|
Question 41: You can give options to the kernel |
 |
using the options-command in /etc/lilo.conf |
 |
appending the options to the kernel name while using the bootmanager |
 |
writing the desired options to /proc/kernel |
 |
using the append-command in /etc/lilo.conf |
 |
using the chopt command while running the system |
|
Question 42: You want your Linux box to shutdown this evening for a technical review. How could you manage this shutdown, so that no user stays unwarned? |
 |
Use wall to write to every user's console to notify them. Also use /etc/nologin to prevent new logins. |
 |
Change the /etc/motd file to notify all users. |
 |
Use the at command to warn the users in regular intervalls |
 |
Just use "shutdown -h time" where time is the time of shutdown |
 |
Mail every user the time of the planed shutdown |
|
Question 43: After installing a new package which contains manpages, the man command does not find the new pages. What could be the reason? |
 |
The permissions of the new manpages have to be changed |
 |
The system has to be rebooted after an installation of a new package |
 |
New packages use a incompatible manual format |
 |
The MANPATH variable isn't set |
 |
The manpage index database has to be rebuilt |
|
Question 44: How could you inhibit a valid user on your system to login but offer him a possibillity to fetch his mail with POP3? |
 |
Use /bin/false as his login shell in /etc/passwd |
 |
Add the username to /etc/nologin |
 |
Add his name to /etc/users.deny |
 |
Add a # at the beginning of his line in /etc/passwd |
 |
Add an entry with his name to /etc/hosts.deny |
|
Question 45: The file /etc/syslog.conf contains the following line: *.crit /var/log/warn |
 |
All messages of all facilities with priority "crit" or any higher priority are written into the file /var/log/warn |
 |
All messages of all facilities with priority "crit" are written into the file /var/log/warn |
 |
The file /var/log/warn contains a list of all errors which are defined as critical |
 |
The syslog daemon reads its rules for all facilities with priority "crit" or any higher priority out of the file /var/log/warn |
 |
The syslog daemon reads its rules for all facilities with priority "crit" out of the file /var/log/warn |
|
Question 46: How could you read the contents of the enviroment variable PATH in the bash shell? |
 |
echo PATH |
 |
print $PATH |
 |
print PATH |
 |
echo %PATH% |
 |
echo $PATH |
|
Question 47: Which of the following commands could be used to turn all characters inside a textfile into uppercase without opening the file in an editor? |
 |
upcase |
 |
tr |
 |
recode |
 |
vi |
 |
sed |
|
Question 48: Many server-processes allow the root-user to force them to read their configfiles while running. How is this done? |
 |
Send them the SIGCONF signal |
 |
Send them the SIGPIPE signal |
 |
Use the reconf command |
 |
Send them the SIGHUP signal |
 |
Use the ps command |
|
Question 49: Which statements are true? |
 |
Only root can use negative nice values |
 |
A nice value reaches from 0 to 20 |
 |
Nice-values can be changed with the ps-command |
 |
A less nice value means higher priority |
 |
An even nice-value means high, an odd value low priority |
|
Question 50: Under the bash shell, when a command is running, pressing control-Z will usually do? |
 |
kill the command running in the foreground |
 |
move the foreground task into the background |
 |
suspend the foreground task |
 |
adds an EOF to the file |
 |
log the user off |
|
Question 51: How could you monitor the amount of free inodes on /dev/hda3? |
 |
df -i /dev/hda3 |
 |
dm -i /dev/hda3 |
 |
du -i /dev/hda3 |
 |
ls -i /dev/hda3 |
 |
inode --free /dev/hda3 |
|
Question 52: How could you get the information about the group membership of user foo? |
 |
cat /etc/passwd | grep foo |
 |
group foo |
 |
getusergrp foo |
 |
groups foo |
 |
which groups foo |
|
Question 53: What is the effect of the following command? foo & |
 |
The command foo connects its STDOUT and STDERR |
 |
The command foo writes its errorcode into the variable ERR |
 |
The command foo will be started again and again, until it returns a value of 0 |
 |
The command foo is started in the foreground |
 |
The command foo is started in the background |
|
Question 54: In the directory /home/foo exists a file named bar which is a symbolic link to the file foobar in the same directory, created with the command ln -s foobar bar. If you would copy the link to /tmp using the command cp -d /home/foo/bar /tmp what would happen? |
 |
The destination /tmp/bar is a symbolic link to /home/foo/foobar |
 |
The destination /tmp/bar is a symbolic link to /tmp/foobar |
 |
The destination /tmp/bar is a hardlink using the same inode as /home/foo/foobar |
 |
The destination /tmp/bar is a regular file with the same content as /home/foo/foobar |
 |
The destination /tmp/bar is a hardlink using the same inode as /home/foo/bar |
|
Question 55: How could you get a list of all running processes? |
 |
down |
 |
ps |
 |
top |
 |
getprocess |
 |
ps ax |
|
Question 56: How can you describe the function of the following commands? foo | bar > foobar |
 |
The command foo redirects its output to the command bar |
 |
The command foobar gets its input from the command bar |
 |
The command foo writes its output to the file bar |
 |
STDIN of foo is connected to STDOUT of bar |
 |
The command bar writes its output to the file foobar |
|