Learn Mode

Linux File System and Commands Quiz

#1

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

pwd
Explanation

Prints the current working directory.

#2

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

mkdir
Explanation

Creates a new directory.

#3

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

cat
Explanation

Displays the contents of a file.

#4

Which command is used to list all processes in Linux?

ps
Explanation

Lists all processes.

#5

What does the command 'uname -a' display in Linux?

Kernel version and system information
Explanation

Displays kernel version and system information.

#6

What is the purpose of the command 'chmod' in Linux?

To change file permissions
Explanation

Changes file permissions.

#7

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

grep
Explanation

Searches for text patterns in a file.

#8

What is the purpose of the command 'grep' in Linux?

To search for text patterns
Explanation

Searches for text patterns.

#9

Which command is used to remove a directory in Linux?

rmdir
Explanation

Removes an empty directory.

#10

Which command is used to add a user to a group in Linux?

usermod
Explanation

Adds a user to a group.

#11

What is the purpose of the command 'tar' in Linux?

To create archives
Explanation

Creates archives.

#12

What does the command 'df' do in Linux?

Displays free disk space
Explanation

Displays free disk space.

#13

Which command is used to change the ownership of a file in Linux?

chown
Explanation

Changes the ownership of a file.

#14

Which command is used to change the priority of a process in Linux?

renice
Explanation

Changes the priority of a process.

#15

Which command is used to view a file's contents in real-time in Linux?

tail
Explanation

Views a file's contents in real-time.

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!