DotLinux.net
Toggle Menu
Home
Topics
Linux Basics
Command Line
Shell Scripting
Networking
Security
Administration
Blogs
Latest Blogs
Quizzes
Disk and Storage Management
File System and Permissions
Linux Command Line Basics
Linux Environment and Variables
Networking Fundamentals
Package Management
Process and System Monitoring
Shell Scripting Basics
System Boot and Services
User and Group Management
Tools
Online Bash Compiler
About
Linux Command Line Basics
Test your knowledge of essential Linux commands and shell usage.
1. Which command is used to list the contents of a directory?
ls
dir
list
l
2. What does 'pwd' stand for?
Print Working Directory
Path Working Directory
Present Working Directory
Print Path Directory
3. Which command creates a new directory?
mkdir
makedir
newdir
crdir
4. To change the current working directory, use the ____ command.
cd
chdir
change
dir
5. Which command is used to remove (delete) a file?
rm
delete
remove
del
6. What does the '-l' flag do when used with 'ls'?
Lists files in long format (permissions, size, etc.)
Lists only hidden files
Lists files recursively
Lists files in reverse order
7. Which command copies files or directories?
cp
copy
cpy
move
8. To move or rename a file, use the ____ command.
mv
move
ren
rename
9. What is the purpose of the 'sudo' command?
Execute a command with superuser (root) privileges
List all system users
Shutdown the system
View user permissions
10. Which command displays the contents of a text file?
cat
view
read
display
11. Which of the following are absolute paths?
/home/user/documents
../photos
./notes.txt
/etc/hosts
12. Which flags can be used with 'rm' to remove directories and their contents recursively?
-r
-f
-d
-R
13. Select all commands used to view running processes.
ps
top
process
htop
14. Which of the following are standard file permission types in Linux?
read (r)
write (w)
execute (x)
modify (m)
15. The 'ls -a' command lists all files, including hidden files (those starting with a '.').
True
False
16. The command 'cd ..' navigates to the parent directory of the current directory.
True
False
17. The 'chmod' command is used to change the ownership of a file.
True
False
18. What command is used to check the version of the Linux kernel? (abbreviation or full command)
19. What is the most common default shell for Linux systems? (name)
20. Name the command that displays the username of the current logged-in user.
Reset
Answered 0 of 0 — 0 correct