Linux Command Line Basics Quiz

Challenge yourself with 25 questions on Linux commands. From navigating directories to managing files, assess your command line proficiency.

#1

Which command is used to display the current directory in Linux?

pwd
ls
cd
dir
2 answered
#2

What does the command 'ls -l' do in Linux?

Lists files in long format
Lists all files including hidden ones
Lists only directories
Lists files with their permissions
2 answered
#3

Which command is used to create a new directory in Linux?

mkdir
touch
cp
mv
1 answered
#4

Which command is used to view the contents of a file in Linux?

cat
ls
head
tail
1 answered
#5

What does the 'mv' command do in Linux?

Moves files or directories
Copies files or directories
Deletes files or directories
Creates a new file or directory
1 answered
#6

Which command is used to display the manual of a Linux command?

man
help
info
manual
1 answered
#7

What does the 'ping' command do in Linux?

Tests network connectivity
Pings remote servers
Deletes files
Displays system time
1 answered
#8

Which command is used to list running processes in Linux?

ps
top
proc
list
#9

Which command is used to display the current date and time in Linux?

date
time
datetime
now
#10

Which command is used to rename a file or directory in Linux?

mv
rename
cp
rn
#11

Which command is used to delete a directory in Linux?

rm
rmdir
delete
del
#12

Which command is used to search for files in Linux?

find
search
locate
query
#13

What does the 'head' command do in Linux?

Displays the first part of a file
Displays the last part of a file
Edits a file
Counts the number of lines in a file
#14

What does the 'rm' command do in Linux?

Removes a file
Removes a directory
Renames a file
Reads metadata of a file
1 answered
#15

Which command is used to search for a pattern within a file in Linux?

grep
find
locate
search
1 answered
#16

What does the 'chmod' command do in Linux?

Changes file ownership
Changes file permissions
Copies files
Moves files
1 answered
#17

Which command is used to compress files in Linux?

zip
tar
gzip
compress
1 answered
#18

What does the 'grep' command do in Linux?

Searches for text patterns in files
Copies files
Moves files
Deletes files
1 answered
#19

What does the 'df' command do in Linux?

Displays disk usage
Deletes files
Searches for files
Displays file permissions
1 answered
#20

What does the 'tar' command do in Linux?

Compresses files
Archives files
Moves files
Deletes files
2 answered
#21

What does the 'ssh' command do in Linux?

Securely connects to a remote server
Starts a new shell
Shuts down the system
Sends a signal to a process
#22

What does the 'grep -v' command do in Linux?

Excludes lines that match the pattern
Includes lines that match the pattern
Counts the number of occurrences of the pattern
Searches for the pattern recursively
#23

What does the 'grep -r' command do in Linux?

Searches for the pattern recursively in directories
Displays only the filenames containing the pattern
Performs a case-insensitive search
Counts the number of occurrences of the pattern
#24

What does the 'uptime' command do in Linux?

Displays the system uptime
Updates the system packages
Starts a new shell
Shows the current user's login time
#25

Which command is used to find and replace text in a file in Linux?

sed
awk
replace
rep
2 answered

Quiz Questions with Answers

Forget wasting time on incorrect answers. We deliver the straight-up correct options, along with clear explanations that solidify your understanding.

Test Your Knowledge

Craft your ideal quiz experience by specifying the number of questions and the difficulty level you desire. Dive in and test your knowledge - we have the perfect quiz waiting for you!

Similar Quizzes

Other Quizzes to Explore