Advertisement

Basic Linux Commands Linux Quiz : 5

Basic Linux Commands Linux Quiz : 5

Question 1:
Which command is used to display the network configuration?
A) ifconfig
B) ipconfig
C) netstat
D) iwconfig
Answer: A) ifconfig


Question 2:
What does the df command with the -h option do?
A) Shows disk space usage in human-readable format
B) Shows free disk space
C) Shows file permissions
D) Displays the file system table
Answer: A) Shows disk space usage in human-readable format


Question 3:
Which command lists the disk partitions and their file systems?
A) lsblk
B) df
C) fdisk
D) parted
Answer: A) lsblk


Question 4:
Which command is used to display the current date and time?
A) date
B) time
C) clock
D) datetime
Answer: A) date


Question 5:
What does the history command do?
A) Displays a list of previously entered commands
B) Shows the system logs
C) Lists recent file changes
D) Displays the current process list
Answer: A) Displays a list of previously entered commands


Question 6:
Which command is used to view or edit a text file in the terminal?
A) nano
B) cat
C) vim
D) edit
Answer: A) nano


Question 7:
Which command is used to view detailed information about a file, such as its permissions and size?
A) stat
B) ls
C) file
D) info
Answer: A) stat


Question 8:
Which command will show the path of the executable file of a command?
A) which
B) whereis
C) where
D) locate
Answer: A) which


Question 9:
What does the head -n 20 command do?
A) Displays the first 20 lines of a file
B) Displays the last 20 lines of a file
C) Shows the next 20 lines of a file
D) Shows the previous 20 lines of a file
Answer: A) Displays the first 20 lines of a file


Question 10:
Which command would you use to remove all files in a directory?
A) rm *
B) rm -r
C) del *
D) erase
Answer: A) rm *

Post a Comment

0 Comments