Unix/Linux Operating Systems Quiz

Test your knowledge of Unix/Linux operating system commands, concepts, and history including file management, text editing, permissions, and system operations.

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

How can you display the line numbers after opening a file in vi ?

  1. :se ic
  2. :se nu
  3. :set G
  4. ctrl+n
Question 2 Multiple Choice (Single Answer)

How can you insert a new line in vi ?

  1. Esc+O
  2. Esc+i
  3. Esc+G
  4. Esc+x
Question 3 Multiple Choice (Single Answer)

How can I remove a directory Fold1 (/home/Mydir/Fold1) which have 3 files in it .

  1. rm /home/Mydir/Fold1
  2. remove /home/Mydir/Fold1
  3. rm -r /home/Mydir/Fold1
  4. rmdir /home/Mydir/Fold1
Question 4 Multiple Choice (Single Answer)

Which command will search recursively in directories to list the file having a string “file” inside it's content.

  1. grep -l file find . -type f
  2. Find . -type f | grep file
  3. ls -1 | grep file
  4. grep file ls -1
Question 5 Multiple Choice (Single Answer)

What do you use to forward errors to a file?

  1. &> filename
  2. 1> filename
  3. 2> /dev/null
  4. 2> filename
Question 6 Multiple Choice (Single Answer)

How to create a new file without opening it

  1. vi filename
  2. touch filename
  3. cat filename
  4. more filename
Question 7 Multiple Choice (Single Answer)

How can you append the output of a command to a file

  1. command <> file
  2. command > file
  3. command | file
  4. file > command
Question 8 Multiple Choice (Single Answer)

cal command is used to

  1. date
  2. day
  3. calendar
  4. month
Question 9 Multiple Choice (Single Answer)

grep is used to

  1. search a pattern
  2. grape juice
  3. grip a file
  4. compress a file
Question 10 Multiple Choice (Single Answer)

ls -i is used to

  1. list all files
  2. list all hidden files
  3. list files with inode number
  4. list files starting with i
Question 11 Multiple Choice (Single Answer)

vi is an

  1. editor
  2. variable
  3. object
  4. class
Question 12 Multiple Choice (Single Answer)

chmod is used to

  1. change moderators
  2. change permission mode
  3. change mind set
  4. change nothing
Question 13 Multiple Choice (Single Answer)

What is UNIX?

  1. Operating system
  2. Comapny
  3. Computer Language
  4. software
Question 14 Multiple Choice (Single Answer)

Which company originally developed UNIX?

  1. NASA
  2. AT&T
  3. IBM
  4. Apple
Question 15 Multiple Choice (Multiple Answers)

Which of the following operating systems are based on the UNIX kernel?

  1. Sun Solaris
  2. MAC OS X
  3. Windows 7
  4. chrome OS
Question 16 Multiple Choice (Single Answer)

Unix is written in a..........

  1. In high level language (C)
  2. Assembly language (low level)
  3. Machine Language
  4. All of the above
Question 17 Multiple Choice (Single Answer)

What is a Unix shell?

  1. A game
  2. A command-line interperter
  3. A sound card driver
  4. A text editor
Question 18 Multiple Choice (Single Answer)

Command to create user account in unix?

  1. createuser
  2. newuser add
  3. adduser
  4. useradd
Question 19 Multiple Choice (Single Answer)

Command use to connect to the outside world in unix

  1. remote
  2. internet
  3. vpn
  4. telnet
Question 20 Multiple Choice (Single Answer)

How do you create a new directory called "flower"?

  1. newdir flower
  2. mkdir flower
  3. crdir
  4. mkdir