LPIC exam 101 trainer

By Pygmalion  
 
These questions are intended to help you train for the LPI exam. Please note that they are not official exam questions. 
 
1. An administrator has issued the following command: # grub-install --root-directory=/custom-grub /dev/sda In which directory will the new menu.lst file be found?
 
/boot/grub
/root/grub
/custom-grub/boot/grub
/custom-grub/root/grub
/etc/grub
/etc/init.d/grub
 
2. How would you list all PCI devices on your system?
 
pcimodules
lspci
cat /proc/pci
pci-info -l
 
3. How can you turn off the group quota in /pub ?
 
quotaoff /pub
quotaoff -gv /pub
quotadown /pub
rm /pub/quota.group
 
4. How can you check the number of free inodes on partition /dev/sda2?
 
du -i /dev/sda2
df -i /dev/sda2
ls -i /dev/sda2
free -i /dev/sda2
 
5. Which of the following can be used to alter the priority of a running process?
 
top
renice
nice
cprio
kill
 
6. You logged in as user tux1, but now you want to switch users to tux2 with tux2's environment. How would you do this?
 
su tux2
su -e tux2
su -l tux2
su -m tux2
su -f tux2
 
7. What commands can be used to find files on your system?
 
locate
search
find
which
file
whereis
 
8. On a Debian system, what command will update all installed packages to the latest available version?
 
apt-cache update
apt-get install
apt-get update
apt-cache install
dpkg -i
dpkg -u
 
9. In GRUB's configuration file you find the line 'root (hd1,4)'. What is the corresponding device name on a Linux system?
 
/dev/hda4
/dev/hda5
/dev/hdb4
/dev/hdb5
 
10. Your system is becoming a bit unreponsive due to a program with PID 9519. You don't want to kill it. What other option do you have?
 
nice +10 -p 9519
nice -10 -p 9519
renice +10 -p 9519
renice -10 -p 9519