Sample questions for Exam #1

  1. What is cron?

  2. For the Lehigh Sunlab, which level of RAID should be used and why?

  3. What are 3 basic commands to set up a new user?

  4. What is one way of appending the name of the current user to the file /home/Documents/users.log every Sunday?

  5. Does /etc/rc.d/rc5.d contain more, fewer, or the same amount of total scripts as /etc/rc.d/rc2.d?

  6. Which RAID level mirrors a set of data directly onto other disks?

  7. Why is it a good idea to put some partitions on a separate drive from other files and programs?

  8. The /etc/passwd file can be read by users, but only the superuser can write to it. However, users can run the passwd command, and the passwd command can edit the /etc/passwd file. How is this possible?

  9. Write a crontab entry that runs the script /usr/local/bin/ at 12:12 am on the 15th day of every month as user root.

  10. What does "mounting(unmounting) a filesystem" mean?

  11. Demonstrate your knowledge of each of the printing terms below by providing a brief definition of the associated functionality or defining characteristics:
    • Spooler
    • PDL
    • Bitmap
    • RIP
    • Filters
    • PostScript

  12. Why should you use the full path of su to use root?

  13. Write a script that lists the directories and files thats name contains the word test and then stores the output into a log file called dirList. Note: Your script should create the log file if it does not exist. If the log file exists, your script should REPLACE the contents.

  14. write a crontab entries to run make command at 2:30 each Monday morning

  15. Write a command to reset the owner of files restored from backup called 'restore' for the user kyle

  16. Name any 5 directories from the filesystem hierarchy, other than /usr and /var, and describe what each directory contains.

  17. Explain the process of mounting a file system. Why must mounting occur before a file system can be used?

  18. What are the benefits of soft links, and how would you create a soft link to your /var/www/html folder in your /usr/lib directory called 'webstuff'?

  19. What command is used to check and repair filesystem?

  20. Why do people use RAID and LVM together?

  21. Write a script to find all the hard links on a filesystem.

  22. What are three things that your data center should provide to its servers?

  23. What advantage does journaling provide in the unix file systems?

  24. Why shouldn't regular users have root access to a system?

  25. What are the seven file types that most filesystems implement and what is the purpose of each?

  26. Is it necessary (why or why not?) to make sure that a set of partitions on a disk is contiguous, that is each partition begins exactly where the previous partition ends?

Additional suggested questions from prior years:
  1. What is the default CentOS package manager and what would be the command to install "emacs" using it?

  2. How would one install a program through the termnal?

  3. Regular files and directories are two types of files defined by Linux. Name at least two more types.

  4. List 3 of the 7 types of files that Linux defines and what command will show the file type of a file?

  5. What does GRUB stand for, what is the filename to edit GRUB, and what does editing it allow a system to do?

  6. What is the /proc filesystem used for?

  7. How does a process go into the Zombie state?

  8. Consider the following output of ls -l:
    total 28
    -rw-rw-r-- 2 eric eric 6 2012-02-07 16:28 test
    lrwxrwxrwx 1 eric eric 4 2012-02-07 16:29 tst -> test
    -rw-rw-r-- 2 eric eric 6 2012-02-07 16:28 twinkie
    When you try to `rm twinkie` to free up disk space, you are successful (the file disappears), but but you haven't freed up any space on your disk. How is this possible?

  9. You are a Product Manager and you want to share a certain folder, called ProjectX, with your team members with whom you share a defined user group on a UNIX system. These files are management-level sensitive documents that the entire group needs to work on the project. As such, you want to share them in such a way that the group has read-only access to the files, and everyone else has no access. Because some documents were created by previous managers before you arrived, you don't have ownership of all of the files.

    Using the numeric representation of permissions, write a command that will allow you to perform this operation on the ProjectX directory that resides in /org/projects/ProjectX. Keep in mind that you do not own all of the files.

  10. What are 3 of the advantages of using the sudo command?

  11. a) What is a boot loader and what is its purpose?
    b) Give examples of some of the options a boot loader might give a user.
    c) What is the modern Linux boot loader?
    d) How is the boot loader called in the booting process?

  12. When would you want to use pvmove? Why is it important that you not just jump straight to using pvresize?

  13. List three security measures that a sys admin should take to ensure protection of their system. Also mention one way to circumvent those measures.

  14. When building a data center, what elements should be considered?

  15. What part of a UNIX file carries the map of where the data is located for that particular file?

  16. A process with PID 11235 ends with exit code 0. Describe the state of the 11235 and the actions of its parent which result in 11235 ending and its entry in the process table being removed. What changes if 11235's parent dies first?

  17. List the various runlevels and their meanings for init.

  18. What are the three typical product lines for a computer vendor and how are they different from a system administrator's perspective?

  19. Why is it more complicated to manage multiple computers with slightly different hardware configurations than to manage identical machines?

  20. Explain what a suid program does exactly, and give an example of such a program.

  21. List and briefly describe the partitions on a typical disk.

  22. What are the effective permissions on a file with the attributes 754?

  23. Name five consideration in designing a "solid service."

  24. What are some of the reasons a system admin would want to use a fully automated install procedure for new machines?

  25. What is the purpose of hdparm?

  26. Why do servers belong in a data center?

  27. What does a fork(the process, not the utensil) do?

  28. Discuss an alternative to giving users that need to make system changes root access. Describe the pros and cons of using an alternative.

  29. What is the biggest feature difference between the ext2 and ext3 filesystems?

  30. What's the difference between UNIX and Linux? Are they the same thing or are they different?

  31. Give the definition of a signal, including three of its uses. Name a signal that cannot be blocked.

  32. Write a script that is set to run once a week on Sunday at midnight as a cronjob and rotates the messages log from messages -> messages.1 -> messages.2 and then deletes the log after the second week.

  33. What are the benefits of automating the installation process?

  34. During the boot process, how does the operating system know which services it needs to run at different runlevels? How does it determine the order in which these services are started?

  35. Why is it a good idea to put some partitions (such as /var, /home, and swap) on a separate drive from other data files and programs? What about /tmp? Give specific reasons for each of the filesystems listed.

  36. When logged in as root, why is it important to use the full path of programs you run?

  37. a) What are the differences between the various 6 run levels?
    b) Generically state (without leaving out detail) the actions performed when changing between run-levels. Note: your discussion should include discussion or /etc/rc.d/

  38. Name some reasons to keep servers in a data center.

  39. Create an fstab entry that will add a hard drive connected as a slave on the second ide, and mount it to /home.

  40. Why would you want to use (or allow someone else to use) the sudo command? and what are some advantages by using sudo over su?

  41. What is n+1 redundancy and why should it be used? Give an example of n+1 redundancy.

  42. Why should you include the complete path when running su?

  43. What are the standard device file names for the third IDE device and the second SCSI device?

  44. How would you change your default editor (e.g., for use with crontab -e)?

  45. What is the difference between /bin, /usr/bin, and /usr/local/bin in terms of their usage or the files they contain?

  46. What are the differences between IDE/ATA, SCSI, and SATA?

  47. Consider a file on your / partition with two hard links to it, by the names of file1 and file2. What happens when root runs mv file1 /tmp, where /tmp is a different partition?

Last revised: 1 March 2016, Prof. Davison.