Linux Post Test
Linux Post Test
a) b)
c) d) e)
2. Which commands will give you information about how much disk space each file in the current directory uses?
a) b)
c) d) e)
ls -l ls -la du . ls -a ls
3. What command would send the output of cmd1 to the input of cmd2?
a)
b) c) d) e)
cmd1 | cmd2 cmd1 || cmd2 cmd1 && cmd2 cmd1 ; cmd2 cmd1 cmd2
4. Under the bash shell, when a command is running, pressing control-Z will usually
a)
b) c) d) e)
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
a)
b) c) d)
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
6.In which file might you find the following entry: root:x:0:0::/root:/bin/bash ____________________ 7.As root, what command would you type to initiate a password change for user larry? _________________________ 8. Under the bash shell which is the most appropriate place to set environment variables that apply to all users?
a)
b) c) d)
e)
/etc/bashrc
a)
b) c) d) e)
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
10. Which of the following are valid block devices on most default linux distributions?
a) b)
c) d) e)
hard disks loopback devices serial ports virtual terminals tape devices
11.How can you best see how much free space you have in your current directory?
a)
b) c) d) e)
12.Which command would you use to alter the permissions of a file (do not give any parameters) ________________________ 13. Which command will update the slocate database as a background process?
a)
b) c) d) e)
updatedb & slocate --updatedb & slocatedb slocate --start & slocate --update &
14. Having booted into run level 3, how would you change to run level 5 without rebooting?
a)
b) c) d) e)
15. which command is used to change settings on IDE hard disk drives? a) b) c) d) e) hdparm hddparm diskparm hdparam ideconfig
16. Your logfile shows repeated connections to TCP port 143. Which named service is being accessed?
a) b) c) d) e)
17. What type of packet does an IP ping use (provide acronym)? _______________________ 18. To learn more about the management of an internet site the best utility to use would be:
a)
b) c) d) e)
19. If you had a Linux system routing 3 different Networks through 3 NICs and you were having trouble with your IP-Forwarding. Where would you look to ensure that IP-Forwarding is actually enabled?
a)
b) c) d) e)
20. What file is used for associating port numbers to port names.
a)
b) c) d) e)
21. You want to make the directory /local available via NFS. All users on your local network should be allowed to read and write files. Which of the following is correct, assuming that your local network is 192.168.1.0, and your machine is part of the DNS domain foobar.com?
a)
b) c) d)
22.Which file can you create to prevent non-root users from logging into the system? (specify path and filename)
23. What command can be used to display a formatted output of the wtmp file? (no arguments) ______________
24. Which command can be executed by a user who is already logged into the system, in order to change to the root user? (type the command without any parameters) ____________________
25. To cause a particular print job to be printed next, regardless of its current position in the queue, what command would be used?
a)
b) c) d) e)
a)
b) c) d) e)
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 Keeps track of system messages and errors
27.When configuring a terminal for X what does the -fn switch do?
a)
b) c) d) e)
It sets the font size and or type for the terminal. It sets the terminal's default function. It places the terminal in the foreground on your screen. It sets the terminal's initial value to false. It sets the terminal's initial display to reverse video.
a)
b) c) d) e)
29. Type the full command you could use to decompress the file "foo.gz"
a) b)
c) d) e)
gzip -d foo.gz gunzip -d foo.gz gunzip foo.gz unzip foo.gz decompress foo.gz
30. How can you add package information from a file Packages to the database of available Debian packages?
a)
b) c) d)
31. You need to find out which package owns a file called /etc/paper.config. Which command will answer this question?
a)
b) c) d) e)
rpm -qf /etc/paper.config rpm -qa|grep /etc/paper.config rpm -Fq /etc/paper.config rpm -q /etc/paper.config rpm --requires /etc/paper.config
9. a 10 a,b 11.a 12. chmod 13.a 14.a 15.a 16 .a 17. ICMP 18.a 19.a 20.a 21.a 22. /etc/nologin 23. last 24. su 25.a 26.a 27.a 28.a 29. a,b,c 30.a 31.a