Learn Mode

Linux Command Line Basics Quiz

#1

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

pwd
Explanation

Prints working directory

#2

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

Lists files in long format
Explanation

Displays detailed file information

#3

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

mkdir
Explanation

Makes a new directory

#4

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

cat
Explanation

Displays file content

#5

What does the 'mv' command do in Linux?

Moves files or directories
Explanation

Relocates files or directories

#6

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

man
Explanation

Shows manual pages for commands

#7

What does the 'ping' command do in Linux?

Tests network connectivity
Explanation

Checks network connectivity

#8

What does the 'rm' command do in Linux?

Removes a file
Explanation

Deletes files or directories

#9

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

grep
Explanation

Searches for patterns in files

#10

What does the 'chmod' command do in Linux?

Changes file permissions
Explanation

Modifies file permissions

#11

Which command is used to compress files in Linux?

gzip
Explanation

Compresses files

#12

What does the 'grep' command do in Linux?

Searches for text patterns in files
Explanation

Finds specified text in files

#13

What does the 'df' command do in Linux?

Displays disk usage
Explanation

Shows disk space usage

#14

What does the 'tar' command do in Linux?

Archives files
Explanation

Creates archives of files

#15

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

sed
Explanation

Searches and replaces text

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!