I just passed my Linux LPI 102 exam today and thought I would try to remember a few of the 60 questions in case I ever have to take a refresher – here is about half of them. I can’t remember the wording exactly for these questions so take with a pinch of salt:
1. Which of the methods below is the best way to temporarily disable a user account ?
- Change the user’s password
- Change the username in /etc/passwd
- Create a /etc/nologin file
- Use the chage command
2. The following when used in a script will generate what output “seq 1 5 20” ?
- 1 6 11 16
- 1 2 3 4 5
- 2 3 4 5
- 5 10 15 20
3. Type the full command with options to remove the default gateway from the routing table ? ______________________
4. Given the network 192.168.10.68/29 and assuming one IP address is to be used for the gateway how many IP addresses are remaining for use? _______
5. Type the full path to the file used to grant user access to crontab ? _________
6. Which file would you edit to grant users access to at and batch ? _________
7. Type the missing SQL command from the following statement ?
UPDATE tablename _______ fieldname=’value’ WHERE id=217;
8. Which of the following would select the name and address values from the contacts table:
- SELECT (name, address) FROM contacts
- SELECT (name address) FROM contacts;
- SELECT name, address FROM contacts;
- SELECT name address FROM contacts;
9. Which of the following illustrates an omitted shadow password in the /etc/passwd file ?
10. How would you set the maximum size for a core file dump for a user ?
11. Before running script myscript how would you remove an environment variable FOOBAR ?
- unset FOOBAR
- env -u FOOBAR myscript
- env -i FOOBAR myscript
- set FOOBAR=””
12. Running the netstat -a command hangs, what could explain this ?
- The netstat command has crashed
- There is a DNS problem
- There is a routing problem
- Nothing; that is normal behaviour
13. Type the full path to the configuration directory for CUPS ? _______
14. When is the script /etc/kde4/kdm/Xreset run ?
- When the user starts a session
- After a session exits
- When KDE crashes
- During installation
15. Which of the following is a popular on-screen keyboard ?
16. Type the full path to the location used to populate the home directory of a new user ? ____________
17. Which directory is used to store a user’s GPG keys ?
18. Which of the following commands would set a system’s local time to UTC ?
- echo “UTC” > /etc/localtime
- date -u UTC
- ln -s /usr/share/zoneinfo/UTC /etc/localtime
- /usr/sbin/zoneinfo -a UTC
19. A senior executive asked an administrator to change the default background of the executives machine, which uses XDM. Which of the following files would the administrator edit to achieve this?
20. Which of the following bash option will prevent an administrator from overwriting a file with a >?
- set -o safe
- set -o noglob
- set -o noclobber
- set -o append
- set -o nooverwrite
21. All of the following are Mail Transport Agents EXCEPT:
22. Complete the following command to get the dimensions of a window ? ____________ -metric
23. On a Debian system you want to edit the /etc/inittab file to disable rebooting using Control-Alt-Delete ? Complete the line: ca:12345:_______:/sbin/shutdown
24. Given the following output:
What has the command given?
- The exit status of the last command run
- The PID of the command itself
- The PID of the last job sent to the background
- The PID of the last job
25. Which of the following commands would give the exit status of the last command ?
26. Type the command to check the status of emails in the email queue ? _________
27. Which of the following uses the hosts.allow file for access restriction ?
28. According to the FHS which directory is used to store user emails – assume they are not stored in the user’s home directory ?
29. Which command is used to send a file to the default print queue ?
30. You type https://127.0.0.1 and do not get a response. You run netstat -nlt and receive the following output:
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
What port should be being used ? ______ (numerical)
31. Which of the following commands will update the software clock with the time from ntp.pangaea.org?
- ntpdate ntp.pangaea.org
- date -u ntp.pangaea.org
- hwclock ntp.pangaea.org
32. You want to send a message to the syslog. What command would you use?
33. Which command would you use to add a new group to a system. Type the command without any options or parameters ? __________
If you don’t know the answers to these you might find some answers here.