Unix/Linux and Shell Scripting Essentials

Test your knowledge of Unix/Linux system administration, shell scripting, vi editor, file management, process control, and system utilities.

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

How many run levels are available in Unix

  1. 1
  2. 2
  3. 5
  4. 6
Question 2 Multiple Choice (Single Answer)

What is the purpose of sync command?

  1. To synchronize user applications
  2. To synchronize keyboard and monitor
  3. To synchornize disk buffers
  4. To syschronize main memory and cache memory
Question 3 Multiple Choice (Single Answer)

User's with user id as 0 (Zero) are

  1. Printer users
  2. Not allowed to login using rlogin/ssh
  3. root users
  4. User id cannot be 0
Question 4 Multiple Choice (Single Answer)

"Count the number of errors in the statement if [password = password1] then echo password else password"

  1. 0
  2. 4
  3. 1
  4. 2
Question 5 Multiple Choice (Single Answer)

How do I uncompress a file?

  1. gunzip/expand
  2. gzip
  3. zip
  4. winzip
Question 6 Multiple Choice (Single Answer)

How do I tar/untar a file?

  1. tar -cvf file/tar -xvf file
  2. tar -xvf file /tar -cvf file
  3. tar -cvf file.tar <file>/tar -xvf file.tar <file>/
  4. tar -xvf file.tar <file>/tar -cvf file.tar <file>/
Question 7 Multiple Choice (Single Answer)

I know linux can multitask -- how do I switch between programs?

  1. fg,bg, &
  2. switch
  3. None
  4. Both
Question 8 Multiple Choice (Single Answer)

For some file the access permissions are modified to 764. Which of the following

  1. Every one can read, group can execute only and the owner can read and write
  2. Every one can read and write, but owner alone can execute
  3. Every one can read, group including owner can write, owner alone can execute
  4. None
Question 9 Multiple Choice (Single Answer)

What is a system call()

  1. A request by the users to access kernel functions
  2. A request by kernel to the device
  3. A request by the device to kernel
  4. None
Question 10 Multiple Choice (Single Answer)

To search a string at the end of the line use

  1. / <str>*
  2. /<str>$
  3. /<str>&
  4. None
Question 11 Multiple Choice (Single Answer)

What is SPOOL?

  1. A mechanism to connect to printer, keyboard and monitor in linux
  2. A mechanism to share printer across users
  3. A request made by the device to linux kernel
  4. None
Question 12 Multiple Choice (Single Answer)

How to sort a file in decending order

  1. sort -d
  2. sort
  3. sort -r
  4. sort -R
Question 13 Multiple Choice (Single Answer)

"Which one of the following lines is correctly formatted as the last line of a /etc/printcap file? "

  1. :mx#2:
  2. :mx#2
  3. :mx#2\
  4. None
Question 14 Multiple Choice (Single Answer)

"Which of the following describes correctly the function of GhostScript? "

  1. A free implementation of PostScript
  2. A printing management tool
  3. A program for converting files to PostScript
  4. A free interpreter of PostScript
Question 15 Multiple Choice (Single Answer)

Which of these commands finds all lines on which the word "Linux" occurs and then deletes them in vi editor

  1. g:Linux/d
  2. :g/Linux/d
  3. g/d/Linux
  4. Linux/:g/d
Question 16 Multiple Choice (Single Answer)

"What do you use the rp field in the /etc/printcap file to specify? "

  1. A remote machine address
  2. A printer on a remote machine
  3. A remote printer address
  4. Both a printer and a remote machine
Question 17 Multiple Choice (Single Answer)

"Which of the following does the .seq file in the printer spooling directories do? "

  1. Prevent two jobs being sent to the same printer simultaneously
  2. Keep track of all the print jobs in the spooling directory
  3. Assign job numbers to new print jobs
  4. Record the owners of print jobs
Question 18 Multiple Choice (Single Answer)

"Who can manipulate the order of print jobs in a print queue? "

  1. The owner of the job
  2. The root user
  3. Anyone
  4. Anyone who can submit jobs to the print queue
Question 19 Multiple Choice (Single Answer)

If the argument list is omitted from a for command, where does it take its values from?

  1. The $* shell variable
  2. The $@ shell variable
  3. Redirected input
  4. Redirected output
Question 20 Multiple Choice (Single Answer)

"Without using the shift command, what range of command-line argument variables can be referenced correctly? "

  1. $0 to $9
  2. $0 to $10
  3. $1 to $9
  4. $1 to $10