Unix/Linux Operating System Commands

Test your knowledge of Unix/Linux operating system commands, shell scripting, file management, and basic system administration tasks.

28 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

To create an empty file, what command is used?

  1. feel
  2. touch
  3. make
  4. finger
Question 2 True/False

UNIX is a multi-user operating system. (True or False)

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

To remove a NON-empty directory, this command is used.

  1. remove -all
  2. rm- a
  3. rm -r
  4. rm
Question 4 True/False

The command "mkdir" is used to make a directory?

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

"PWD" stands for?

  1. Preserve Working Directory
  2. Present Workspace Directive
  3. Preserve Workable Diskspace
  4. Present Working Directory
Question 6 True/False

There is only one distribution/version of Linux?

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

What command is used to change your password?

  1. pass -change
  2. changepword
  3. chpassword
  4. passwd
Question 8 True/False

root is to UNIX as Administrator is to Windows?

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

What is VI?

  1. An E-mail client
  2. A text editor
  3. The UNIX telnet service
  4. An FTP client
Question 10 Multiple Choice (Single Answer)

What will be the output of "echo this || echo that && echo other"?

  1. this
  2. that
  3. this that
  4. this other
Question 11 Multiple Choice (Single Answer)

How could you check if two strings are equal?

  1. test $a -eq $b
  2. test $a -equal $b
  3. test $a = $b
  4. sh -c test $a == $b
Question 12 Multiple Choice (Multiple Answers)

Which of the following would return the process ID of the sleep command?

  1. sleep 1 & echo $#
  2. test sleep 1
  3. sleep 1 & echo $?
  4. sleep 1 & echo $!
Question 13 Multiple Choice (Multiple Answers)

Which of the following will always output "xyz"?

  1. $abc=xyz; echo $abc
  2. abc=xyz ; echo $abc
  3. export abc=xyz ; echo $abc
  4. abc=xyz; export abc=xyz ; echo $abc
Question 14 Multiple Choice (Single Answer)

How do you get help about the command "cp"?

  1. help cp
  2. man cp
  3. cp ?
  4. f2 cp
Question 15 Multiple Choice (Single Answer)

How do you rename file "new" in file "old"?

  1. mv new old
  2. none
  3. cp new old
  4. rm new old
Question 16 Multiple Choice (Single Answer)

What do you use to forward errors to a file?

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

What command do you have to use to go to the parent directory?

  1. cd -
  2. cd ..
  3. cd ~
  4. cd /up
Question 18 Multiple Choice (Single Answer)

How do you delete a file?

  1. rm filename
  2. less filename
  3. touch filename
  4. dl filename
Question 19 Multiple Choice (Single Answer)

With what can you stop a process?

  1. stop
  2. kill
  3. delete
  4. shupdown
Question 20 Multiple Choice (Single Answer)

How can you display a list of all files, including the hidden files?

  1. ls -a
  2. ls -all
  3. find -all
  4. find a
Question 21 Multiple Choice (Single Answer)

What does the command ls do?

  1. isplay of the contents of a file
  2. Shows a calendar
  3. Display of files and folders, present in the folder where you are
  4. Opening a file
Question 22 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. command <> file
Question 23 Multiple Choice (Single Answer)

How to create a new file without opening it?

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

With what command you can see your user name?

  1. pwd
  2. me
  3. i
  4. whoami
Question 25 Multiple Choice (Single Answer)

With what command you can see what folder you are in?

  1. whereami
  2. place
  3. pwd
  4. trace
Question 26 Multiple Choice (Single Answer)

Which structure is found inside journal file system?

  1. mcells
  2. fragments
  3. inodes table
  4. cylinder group
Question 27 Multiple Choice (Single Answer)

The rsh command on HP-UX can be used to:

  1. execute a remote command
  2. log in and initiate a shell on a remote system
  3. This is a restricted shell on HP-UX.
  4. grant read-only access to a system
Question 28 Multiple Choice (Single Answer)

Which shell does not have history feature?

  1. Bourne shell
  2. Korn shell
  3. C shell
  4. POSIX shell