Linux Commands Questions & Answers

Linux Questions & Answers – Linux Commands

This set of Linux / Unix multiple choice questions and answers focuses on various Linux commands and their command line options & parameters. It will be useful for anyone learning Linux Basics, Essentials and/or Fundamentals.

1. Which command is used to display the unix version
a) uname -r
b) uname -n
c) uname -t
d) kernel

2. Which command is used to print a file
a) print
b) ptr
c) lpr
d) none of the mentioned

3. Using which command you find resource limits to the session?
a) rlimit
b) ulimit
c) setrlimit
d) getrlimit

4. Which option of ls command used to view file inode number
a) –l
b) -o
c) –a
d) –i

5. Find / -name ‘*’ will
a) List all files and directories recursively starting from /
b) List a file named * in /
c) List all files in / directory
d) List all files and directories in / directory

6. The dmesg command
a) Shows user login logoff attempts
b) Shows the syslog file for info messages
c) kernel log messages
d) Shows the daemon log messages

7. The command “mknod myfifo b 4 16”
a) Will create a block device if user is root
b) Will create a block device for all users
c) Will create a FIFO if user is not root
d) None of the mentioned

8. Which command is used to set terminal IO characteristic?
a) tty
b) ctty
c) ptty
d) stty

9. Which command is used to record a user login session in a file
a) macro
b) read
c) script
d) none of the mentioned

10. Which command is used to display the operating system name
a) os
b) unix
c) kernel
d) uname
When you type the executable name (command) at the terminal prompt in Linux, which command is used to identify the location of the executable that is executed? The command looks in the folders listed in the PATH environment variable for the executable supplied as an input. In Linux commands, a symbol or operator is used. In Linux, the ‘!’ symbol or operator can be used as a Logical Negation operator, as well as to retrieve commands from history with tweaks or to rerun previously performed commands with changes.

Leave a Reply

Your email address will not be published. Required fields are marked *