Advertisement

Basic Linux Commands Linux Quiz : 1

Basic Linux Commands Linux Quiz : 1

Question 1:
Which command is used to list files and directories in the current directory?
A) list
B) ls
C) dir
D) show
Answer: B) ls


Question 2:
Which command is used to change the current working directory?
A) cd
B) ls
C) pwd
D) chdir
Answer: A) cd


Question 3:
Which command displays the contents of a file?
A) cat
B) view
C) show
D) list
Answer: A) cat


Question 4:
Which command is used to copy files or directories?
A) cp
B) mv
C) rm
D) copy
Answer: A) cp


Question 5:
What does the mv command do?
A) Moves or renames files or directories
B) Deletes files or directories
C) Copies files or directories
D) Views the contents of a file
Answer: A) Moves or renames files or directories


Question 6:
Which command removes files or directories?
A) rm
B) delete
C) remove
D) erase
Answer: A) rm


Question 7:
Which command shows the current directory's absolute path?
A) pwd
B) ls
C) cd
D) path
Answer: A) pwd


Question 8:
What does the ps command display?
A) The contents of a file
B) A list of running processes
C) Disk usage statistics
D) File permissions
Answer: B) A list of running processes


Question 9:
Which command is used to view the first 10 lines of a file?
A) head
B) tail
C) more
D) less
Answer: A) head


Question 10:
Which command is used to view the last 10 lines of a file?
A) head
B) tail
C) more
D) less
Answer: B) tail

Post a Comment

0 Comments