Home »
Aptitude Questions and Answers »
Linux Aptitude Questions and Answers
Linux Commands (Mixed) Aptitude Questions and Answers
Linux Commands (Mixed) Aptitude Questions and Answers: This section contains aptitude questions and answers on Linux Commands (Mixed).
Submitted by Nidhi, on May 21, 2020
This section contains Aptitude Questions and Answers on Linux Commands (Mixed).
1) Which of the following command is used to display the list of available groups in the system?
- listgroup
- list
- getent
- groups
Correct answer: 3
getent
The getent command is used to display the list of available groups in the system.
2) Which exact command is used to remove a user from the group in the Linux system?
- delgroup –d <username> <groupname>
- remusr –d <username> <groupname>
- gpasswd -d <username> <groupname>
- rm –d <username> <groupname>
Correct answer: 3
gpasswd -d <username> <groupname>
The 3rd command is used to remove a user from the group in the Linux system.
3) Which exact command is used to change the group of a user in the Linux system?
- usermod -g <new_groupname> <username>
- usermod -g <username> <new_groupname>
- usermod -c <new_groupname> <username>
- usermod -c <username> <new_groupname>
Correct answer: 1
usermod -g <new_groupname> <username>
The 1st command is the correct command to change the group of a user in the Linux system.
4) There are the following commands that are given, which of them are correct about the "nohup" command in the Linux system?
- The "nohup" stands for No Hang-up.
- The "nohup" stands for Notify Hang-up.
- The "nohup" command is used to keeps the processes running, even the terminal gets close by the user.
- This command is used to prevent the processes from the SIGHUP signals.
Options:
- A and C
- B and C
- B, C, and D
- A, C, and D
Correct answer: 4
A, C, and D
Statements A, C, and D are correct about the nohup command in the Linux system.
5) By default, which files store output of the command that executed with "nohup" utility?
- nh.out
- nohup.out
- nohup.txt
- nh.txt
Correct answer: 2
nohup.out
The hohup.out command is used to store the output of the command that executed with nohup utility.
6) Which of the following symbol is used to run a background process?
- #
- &
- @
- $
Correct answer: 2
$
The & symbol is used to run a background process.
7) Which of the following command is used to configure a public key at the SSH server for a user?
- ssh-copy-id
- ssh-public-key
- ssh-public-id
- ssh-copy-key
Correct answer: 1
ssh-copy-id
The ssh-copy-id command is used to configure a public key at the SSH server for a user.
8) Which of the following command is used to add a key to the SSH agent?
- agent
- ssh-agent
- add-key
- ssh-add
Correct answer: 4
ssh-add
The ssh-add is used to add a key to the SSH agent.
9) Which of the following Linux command is used to transfer files to the remote computer?
- cp
- copy
- ssh-copy
- scp
Correct answer: 4
scp
The scp command is used to transfer files to the remote computer.
10) Which of the following command is used to schedule tasks in the Linux system?
- schedule
- stask
- at
- ats
Correct answer: 3
at
The at command is used to schedule the tasks in the Linux system.
11) Which of the following command is used to print pending tasks?
- ptasks
- atq
- qtasks
- atrm
Correct answer: 2
atq
The atq command is used to print pending tasks.
12) Which of the following command is used to delete scheduled tasks?
- atrm
- atdl
- atdel
- rmtask
Correct answer: 1
atrm
The atrm command is used to delete scheduled tasks.
13) Which of the following keyword is used to specify the time of "4pm" in "at" command for scheduling tasks?
- breaktime
- freetime
- midnight
- teatime
Correct answer: 4
teatime
The teatime keyword is used to specify the time of "4pm" in "at" command for scheduling tasks.
14) Which of the following command is used to perform mathematical expression and print output on the terminal?
- expr
- exp
- calexp
- calexpr
Correct answer: 1
expr
The expr command is used to perform mathematical expression and print output on the terminal.
15) Which of the following types of arguments or operators are supported by "expr" command?
- Plus '+' operator
- Modulus operator
- Regular expressions
- Set of characters in the string
Options:
- A and C
- A and B
- A, B, and C
- A, B, C, and D
Correct answer: 4
A, B, C, and D
All options are correct.
16) Which exact command is used to multiply 4 by 2 using "expr" in the Linux System?
- expr 4 * 2
- expr 4 /* 2
- expr 4 \* 2
- expr 4 ^* 2
Correct answer: 3
expr 4 \* 2
The 3rd command is correct.
17) Which of the following terminal command is used to send an email?
- email
- mail
- electronicmail
- mailcmd
Correct answer: 2
mail
The mail command is used to send an email, to use mail command we need to install the "mailutils” package in the system.
18) Which of the following command is used to extract text from binary or executable files in the Linux operating system?
- strings
- string
- str
- strbin
Correct answer: 1
strings
The strings command is used to extract text from binary or executable files in the Linux operating system.
19) Which of the following command is used to get brief information about Linux commands and functions?
- info
- incmd
- whatis
- cmddocs
Correct answer: 3
whatis
The whatis command is used to get brief information about Linux commands and functions.
20) Which of the following types of encodings are used by the "strings" command?
- 16-bit little endian
- 16-bit big endian
- 7-bit byte ASCII
- None of the above
Options:
- A and B
- B and C
- A, B, and C
- D
Correct answer: 3
A, B, and C
Options A, B, and C are correct encodings used by the strings command.