Unix/Linux Command Line and System Administration

Quiz covering Unix/Linux commands, vi editor usage, file operations, system calls, permissions, and printer management

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

How can I tell which version of Unix I am using?

  1. version
  2. version -a
  3. uname
  4. no command
Question 2 Multiple Choice (Single Answer)

How do I uncompress a file?

  1. gunzip/expand
  2. gzip
  3. zip
  4. winzip
Question 3 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 4 Multiple Choice (Single Answer)

How do I remove a file/directory?

  1. removedir
  2. rmdir
  3. rm
  4. None
Question 5 Multiple Choice (Single Answer)

How do I change my password and finger information?

  1. chpasswd
  2. passwd
  3. chpass
  4. password
Question 6 Multiple Choice (Single Answer)

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

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

How do I make all filenames in a directory lowercase?

  1. for i in *; do mv $i `echo $i | tr [A-Z] [a-z]`; done
  2. ls | mv $i | tr [A-Z] [a-z];
  3. ls | for I in do mv $i | tr [A-Z] [a-z]; done
  4. None
Question 8 Multiple Choice (Single Answer)

"PWD" stands for

  1. past working directory
  2. people working directory
  3. path working directory
  4. present working directory
Question 9 Multiple Choice (Single Answer)

What is VI?

  1. A application to create Unix boot immages
  2. Application to create text files
  3. Application to create animations
  4. Application to create text file as well as animations
Question 10 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 11 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 12 True/False

vi is the only text editor available in Unix?

  1. True
  2. False
Question 13 Multiple Choice (Single Answer)

vi editor works on

  1. Append, Insert and copy modes
  2. Insert Mode, delete mode
  3. Add mode, delete mode, append mode
  4. Command, Insert mode, Edit mode
Question 14 Multiple Choice (Single Answer)

To search a string at the end of the line use

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

How to convert lower case to upper case or vice versa in vi

  1. :set upper/lower on
  2. Use ~
  3. :/s lower to upper
  4. None
Question 16 Multiple Choice (Single Answer)

How to open a file in read only mode using vi

  1. vi -R <filename>
  2. vi filename readonly
  3. vi -r
  4. Not possible
Question 17 Multiple Choice (Single Answer)

What is SPOOL?

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

How to query the printer queue?

  1. Use jobs command
  2. Use print command
  3. Use lpq command
  4. Use lpc command
Question 19 True/False

Only root user can remove the jobs from printer queue

  1. True
  2. False
Question 20 Multiple Choice (Single Answer)

The right sequence shell command substitution & expansion

  1. {}, ~, $,($)
  2. {}, $, ~,($)
  3. {}, ~,$,($)
  4. None