thumbnail

Common Linux Commands

Type in the correct command that would do said task in the command line interface on Linux
Quiz by JRBerger
Rate:
Last updated: February 6, 2021
You have not attempted this quiz yet.
First submittedFebruary 6, 2021
Times taken217
Average score65.0%
Rating2.80
Report this quizReport
5:00
Enter answer here
0
 / 20 guessed
The quiz is paused. You have remaining.
Scoring
You scored / = %
This beats or equals % of test takers also scored 100%
The average score is
Your high score is
Your fastest time is
Keep scrolling down for answers and more stats ...
Hint
Answer
Displays contents of a text file on screen
cat
Edits contents of a text file
vi
Changes Current Directory
cd
Displays a detailed list of directory contents
ls -l
Displays contents of a text file on screen, but pauses one screen at a time
less
Displays IP Address & Subnet Mask
ifconfig
Deletes files & Directories from the file system
rm
Print Working Directory
pwd
Starts a new Bourne-again shell command
bash
Displays the first few lines of a text file
head
Hint
Answer
Copies files & Directories from one location to another
cp
Displays information about the command
info
Displays contents of directory & all subdirectories
ls -r
Displays all Files
ls -a
Shutsdown Computer Securely
shutdown
Switch User Accounts
su
Moves &/or renames files
mv
Displays a brief summary of how to use a command
--help
Displays the last few lines of a text file
tail
Displays the manual page
man
+2
Level 67
Feb 18, 2021
Thanks for that. I have a quiz on the most popular Linux distros if you want to check it out: https://www.jetpunk.com/user-quizzes/156455/name-the-top-50-linux-distros
+1
Level 23
Feb 19, 2021
I only got three right x.x, but thank you for sharing. I got a lot to learn :D
+1
Level 67
Oct 18, 2021
Unfortunately I think a lot of these would be considered the wrong answer.

(e.g. ls -r is typically not as useful as find and would be more commonly used - also edit a file should be many more options than just vi [ed/vim/emacs/cat ;)])

Still, love to see Linux quizzes, good job!

+1
Level 51
Feb 17, 2022
1. Vi isn't the only text editor

2. the command to 'display all files' is tree /. I think you meant display all files in current directory.

+1
Level 23
May 22, 2022
Thank you. I'm still learning a lot about Linux, and am not entirely sure the best way to make quizzes on it.