Home »
Aptitude Questions and Answers »
Linux Aptitude Questions and Answers
Linux Admin Commands Aptitude Questions and Answers
Linux Admin Commands Aptitude Questions and Answers: This section contains aptitude questions and answers on Linux Admin Commands.
Submitted by Nidhi, on May 04, 2020
This section contains Aptitude Questions and Answers on Linux Admin Commands.
1) Which Linux command is used to know, how long a computer has been running?
- startup
- uptime
- startuptime
- time
Correct answer: 2
uptime
The uptime command is used to know, how long a computer has been running.
2) There are the following statements that are given below, which of them are the correct about the "service" command in the Linux system?
- The service command is used to start a service by calling the associated script.
- The service command is used to stop service by calling the associated script.
- The service command is used to pause a service by calling the associated script.
- The service command is used to restart a service by calling the associated script.
Options:
- A and B
- A, B, and D
- B, C, and D
- A, B, C, and D
Correct answer: 2
A, B, and D
Statements A, B, and D are correct about the "service" command.
3) Which of the following directory contains the scripts related to service used in the Linux operating system?
- /etc/services/
- /etc/scripts/
- /etc/init.d/
- /etc/services/scripts/
Correct answer: 3
/etc/init.d/
The "/etc/init.d/" directory contains the scripts related to service used in the Linux operating system.
4) There are the following statements that are given below, which of them are the correct about the "uptime" command in the Linux system?
- We can get the current system time using uptime command.
- We can get the number of users logged in, using uptime command.
- This command also displays CPU load average.
- This command also displays the duration for which the computer has been running.
Options:
- A and B
- B and D
- A, B, and D
- A, B, C, and D
Correct answer: 4
A, B, C, and D
All statements are correct about the "uptime" command.
5) Which option is used to know only system running time using the "uptime" command?
- -p
- -u
- -l
- -k
Correct answer: 1
-p
The option -p is used to know only system running time.
6) There are the following statements are given below, which of them are the correct about the "ps" command in the Linux system?
- This command is used to display information about processes running in the system.
- This command displays the memory occupied by a system call.
- This command displays the process id of the running processes.
- This command displays the name of the running processes.
Options:
- A and B
- A, B, and C
- A, C, and D
- A, B, C, and D
Correct answer: 3
A, C, and D
Statements A, C, and D are correct about the "ps" command.
7) Which exact command is used to display the signal names used in the Linux operating system?
- signal -all
- kill -p
- kill -l
- kill -s
Correct answer: 3
kill -l
The "kill -l" command is used to display the name of signals used in the Linux operating system.
8) There are the following options that are given below, which of them are correct signals used in the Linux?
- SIGINT
- SIGHUP
- SIGQUIT
- SIGKILL
Options:
- A and B
- A, B, and C
- A, C, and D
- A, B, C, and D
Correct answer: 4
A, B, C, and D
All given options are correct signals used in Linux.
9) Which exact command is used to kill a running process using process id?
- killall <process id>
- kill -9 <process id>
- kill -p <process id>
- kill -s <process id>
Correct answer: 2
kill -9 <process id>
10) Which exact command is used to kill a process by name?
- killall <process name>
- kill -n <process name>
- kill -p <process name>
- kill -s <process name>
Correct answer: 1
killall <process name>
11) Which of the following command is used to know about the swap memory of the system?
- swapmem
- free
- sw
- sp
12) Which of the following commands are used to kill a running process in the Linux system?
- kill
- killall
- pkill
- xkill
Options:
- A and B
- A, B, and C
- A, C, and D
- A, B, C, and D
Correct answer: 4
A, B, C, and D
All given commands are used to kill a running process in the Linux system.
13) Which of the following signal is used to PAUSE and STOP the processes?
- SIGSTOP
- SIGSTP
- SIGPAUSE
- SIGPS
Correct answer: 2
SIGSTP
The SIGSTP signal is used to PAUSE and STOP the process.
14) Which of the following command is used to display the memory map of processes in the Linux system?
- pmap
- memmap
- map
- procmap
Correct answer: 1
pmap
The "pmap" command is used to display the memory map of processes in the Linux system.
15) There are the following statements that are given below, which of them are the correct about the "last" command in the Linux system?
- This command displays the information about the last logged in timing for the user.
- The last command is used to display the last executed process in the system.
- This command displays IP address, username, and duration of logging in.
- The log information is stored in the "/var/log/wtmp" file.
Options:
- A and B
- A, B, and C
- A, C, and D
- A, B, C, and D
Correct answer: 3
A, C, and D
Statements A, C, and D are correct about "last" command in the Linux system.
16) How can we shut down the system by notifying all users?
- Using init 0 command
- Using init 6 command
- Using shutdown command
- Using turnoff command
Correct answer: 3
Using shutdown command
The shutdown command is used to shut down the system by notifying all users.
17) How can we shut down the system immediately using the "shutdown" command?
- shutdown immediate
- shutdown now
- shutdown n
- shutdown final
Correct answer: 2
shutdown now
The "shutdown now" command is used to shut down the system immediately using the "shutdown" command.
18) Which of the following commands are used to display the information about the Linux commands?
- man
- info
- infocmd
- All the above
Options:
- A and B
- A, B, and C
- A, C, and D
- A, B, C, and D
Correct answer: 1
A and B
The "man" and "info" commands are used to display the information about the Linux commands.
19) Which Linux command is used to check disk usage of files and directories?
- diskinf
- diskuse
- du
- fileinf
Correct answer: 3
du
The "du" command is used to check the disk usage of files and directories.
20) Which of the following is the first process executed by the kernel during the booting time of the system?
- crond
- init
- bootp
- none of the above
Correct answer: 2
init
The "init" command is the first process executed by the kernel during booting time.
21) Which Linux command is used to access external storage devices like pen-drive into the Linux file system?
- attach
- access
- mount
- umount
Correct answer: 3
mount
The "mount" command is used to access the external devices into some directory that exists in the Linux file system.
22) Which Linux command is used to un-mount the external storage devices from the Linux file system?
- unmount
- umount
- nmount
- None of the above
Correct answer: 2
umount
The "umount" command is used to un-mount the external storage devices from the Linux file system.
23) Which run-level is used with the "init" command to reboot the system?
- 0
- 1
- 4
- 6
Correct answer: 4
6
The run level 6 is used with the "init" command to reboot the system.
24) Which run-level is used with the "init" command to halt the system?
- 0
- 1
- 4
- 6
Correct answer: 1
0
The run level 0 is used with the "init" command to halt the system.
25) Which Linux command is used to display information regarding file systems about the total space and free space?
- file
- info
- df
- ds
Correct answer: 3
df
The "df" command is used to display information regarding file systems about the total space and free space.