Unix/Linux Operating System Commands
Test your knowledge of Unix/Linux operating system commands, shell scripting, file management, and basic system administration tasks.
Questions
To create an empty file, what command is used?
- feel
- touch
- make
- finger
UNIX is a multi-user operating system. (True or False)
- True
- False
To remove a NON-empty directory, this command is used.
- remove -all
- rm- a
- rm -r
- rm
The command "mkdir" is used to make a directory?
- True
- False
"PWD" stands for?
- Preserve Working Directory
- Present Workspace Directive
- Preserve Workable Diskspace
- Present Working Directory
There is only one distribution/version of Linux?
- True
- False
What command is used to change your password?
- pass -change
- changepword
- chpassword
- passwd
root is to UNIX as Administrator is to Windows?
- True
- False
What is VI?
- An E-mail client
- A text editor
- The UNIX telnet service
- An FTP client
What will be the output of "echo this || echo that && echo other"?
- this
- that
- this that
- this other
How could you check if two strings are equal?
- test $a -eq $b
- test $a -equal $b
- test $a = $b
- sh -c test $a == $b
Which of the following would return the process ID of the sleep command?
- sleep 1 & echo $#
- test sleep 1
- sleep 1 & echo $?
- sleep 1 & echo $!
Which of the following will always output "xyz"?
- $abc=xyz; echo $abc
- abc=xyz ; echo $abc
- export abc=xyz ; echo $abc
- abc=xyz; export abc=xyz ; echo $abc
How do you get help about the command "cp"?
- help cp
- man cp
- cp ?
- f2 cp
How do you rename file "new" in file "old"?
- mv new old
- none
- cp new old
- rm new old
What do you use to forward errors to a file?
- 2> filename
- 1> filename
- &> filename
- 2> /dev/null
What command do you have to use to go to the parent directory?
- cd -
- cd ..
- cd ~
- cd /up
How do you delete a file?
- rm filename
- less filename
- touch filename
- dl filename
With what can you stop a process?
- stop
- kill
- delete
- shupdown
How can you display a list of all files, including the hidden files?
- ls -a
- ls -all
- find -all
- find a
What does the command ls do?
- isplay of the contents of a file
- Shows a calendar
- Display of files and folders, present in the folder where you are
- Opening a file
How can you append the output of a command to a file?
- command < file
- command >> file
- command << file
- command <> file
How to create a new file without opening it?
- pico filename
- cat filename
- more filename
- touch filename
With what command you can see your user name?
- pwd
- me
- i
- whoami
With what command you can see what folder you are in?
- whereami
- place
- pwd
- trace
Which structure is found inside journal file system?
- mcells
- fragments
- inodes table
- cylinder group
The rsh command on HP-UX can be used to:
- execute a remote command
- log in and initiate a shell on a remote system
- This is a restricted shell on HP-UX.
- grant read-only access to a system
Which shell does not have history feature?
- Bourne shell
- Korn shell
- C shell
- POSIX shell