Unix/Linux System Commands Quiz

Test your knowledge of Unix/Linux operating system commands including process management, file system operations, networking, and shell commands

16 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Command used to display the contents of the file in reverse order.

  1. tac
  2. cat
  3. tail -f <filename>
  4. head
Question 2 Multiple Choice (Single Answer)

Display only directories from a particular location/folder

  1. ls -d
  2. ls -l | grep "$d"
  3. ls -l | grep "^d"
  4. ls -ltr | grep -d
Question 3 Multiple Choice (Single Answer)

Command which can be used to copy the contents to file and also display on screen

  1. tee
  2. > (Redirection operator)
  3. Redirection operator (>) and Standard Ouput ($1)
  4. All
Question 4 Multiple Choice (Single Answer)

Command used to get the top 5 file / directory occupying more space.

  1. du | sort -r | head -5
  2. du | sort -nr | head -5
  3. du | sort -n | head -5
  4. du
Question 5 Multiple Choice (Single Answer)

Output of "echo $$"

  1. $$
  2. $
  3. Process ID of the current session.
  4. Process ID of the parent session
Question 6 Multiple Choice (Single Answer)

Command used to check the usage of the various file systems mounted

  1. df
  2. du
  3. 1 and 2
  4. None
Question 7 Multiple Choice (Single Answer)

Display only files with ".zip" extension from the current directory

  1. ls -ltr *.zip
  2. ls -ltr | grep "zip$"
  3. 1 and 2
  4. None
Question 8 Multiple Choice (Single Answer)

Which command would generate the ouput "Today is " eg: If today was 25th oct then the output would be "Today is 101025"

  1. echo "Today is date +%y%m%d"
  2. 1 and 2
  3. echo Today is date +%y%m%d
  4. None
Question 9 Multiple Choice (Single Answer)

Command used to verify the status of the Argon agent

  1. ps -ef | grep argon
  2. ps -ef | grep "argon"
  3. 1 and 2
  4. None
Question 10 Multiple Choice (Single Answer)

How kill the process in a single line?

  1. ps
  2. kill PID
  3. kill ps &lt;processname&gt;
  4. kill -9 "PID"
Question 11 Multiple Choice (Single Answer)

What is the default value of umask?

  1. 022
  2. 032
  3. 644
  4. 000
Question 12 Multiple Choice (Single Answer)

What is the command to see the number of fork in Linux system ?

  1. cat /proc/meminfo
  2. vmstat
  3. vmstat -f
  4. ls
Question 13 Multiple Choice (Single Answer)

How to find all the only hidden file in the dir?

  1. ls
  2. ls -s
  3. ls -a
  4. ls -a .*
Question 14 Multiple Choice (Single Answer)

How to find Kernel IP routing table ?

  1. ifconfig
  2. netstat -r
  3. ping
  4. none
Question 15 Multiple Choice (Single Answer)

How to get the info of only active internet connections in the Unix system ?

  1. netstat
  2. netstat -s
  3. netstat -t
  4. all the above
Question 16 Multiple Choice (Single Answer)

What is the default value of nice ?

  1. 3
  2. 1
  3. 11
  4. 0