Advertisement

Basic Linux Commands Linux Quiz : 2

Basic Linux Commands Linux Quiz : 2

Question 1:
Which option with the ls command will display files in a long format?
A) -l
B) -a
C) -h
D) -r
Answer: A) -l


Question 2:
What does the mkdir command do?
A) Creates a new directory
B) Deletes a directory
C) Moves a directory
D) Renames a directory
Answer: A) Creates a new directory


Question 3:
Which command changes the ownership of a file?
A) chown
B) chmod
C) chgrp
D) chfile
Answer: A) chown


Question 4:
What does the chmod command do?
A) Changes file permissions
B) Changes file ownership
C) Moves files
D) Copies files
Answer: A) Changes file permissions


Question 5:
Which command is used to list all files, including hidden ones?
A) ls -a
B) ls -l
C) ls -h
D) ls -R
Answer: A) ls -a


Question 6:
Which command will display the current user’s process list?
A) ps
B) top
C) htop
D) jobs
Answer: A) ps


Question 7:
Which command is used to search for a specific text within files?
A) grep
B) find
C) locate
D) search
Answer: A) grep


Question 8:
Which command is used to create a symbolic link to a file?
A) ln -s
B) link
C) symlink
D) ln -l
Answer: A) ln -s


Question 9:
Which option with the rm command will prompt for confirmation before deleting each file?
A) -i
B) -f
C) -r
D) -v
Answer: A) -i


Question 10:
Which command would you use to display the disk usage of a directory?
A) du
B) df
C) ls
D) disk
Answer: A) du

Post a Comment

0 Comments