Linux Quiz
Linux is the operating system behind most servers and many developer machines. This quiz tests the command line, file system layout, permissions, processes and basic shell usage.
What this quiz covers
- Common commands
- File system structure
- Permissions and ownership
- Processes and packages
Study tip: Use a Linux terminal for a week of normal tasks; commands you use become automatic.
Questions, answers and explanations
1. What is Linux?
- An Operating System
- A Programming Language
- A Database
- A Web Browser
Answer: An Operating System
Linux is an open-source operating system based on the Unix architecture.
2. Who created Linux?
- Bill Gates
- Linus Torvalds
- James Gosling
- Guido van Rossum
Answer: Linus Torvalds
Linux was created by Linus Torvalds in 1991.
3. Which command shows the current working directory?
- pwd
- dir
- ls
- cd
Answer: pwd
The pwd command prints the current working directory.
4. Which command lists files and directories?
- ls
- dir
- list
- show
Answer: ls
The ls command lists files and folders.
5. Which command is used to change directories?
- cd
- pwd
- mv
- cp
Answer: cd
The cd command changes the current directory.
6. Which command creates a new directory?
- mkdir
- newdir
- createdir
- makedir
Answer: mkdir
mkdir creates a new directory.
7. Which command removes a file?
- rm
- delete
- erase
- remove
Answer: rm
The rm command deletes files.
8. Which command copies files?
- cp
- copy
- mv
- clone
Answer: cp
The cp command copies files and directories.
9. Which command moves or renames files?
- mv
- move
- rename
- cp
Answer: mv
The mv command moves or renames files.
10. Which command displays the contents of a file?
- cat
- show
- open
- read
Answer: cat
The cat command displays the contents of a file.
11. Which command displays the current logged-in user?
- whoami
- who
- user
- me
Answer: whoami
The whoami command displays the current logged-in username.
12. Which command shows the current date and time?
- date
- time
- clock
- calendar
Answer: date
The date command displays the current system date and time.
13. Which command is used to clear the terminal screen?
- clear
- cls
- clean
- erase
Answer: clear
The clear command clears the terminal screen.
14. Which command is used to find the location of a command?
- which
- find
- locate
- where
Answer: which
The which command shows the path of an executable.
15. Which command changes file permissions?
- chmod
- chown
- perm
- access
Answer: chmod
chmod changes file and directory permissions.
16. Which command changes the ownership of a file?
- chown
- chmod
- owner
- changeuser
Answer: chown
The chown command changes the owner of a file or directory.
17. Which command displays running processes?
- ps
- jobs
- task
- process
Answer: ps
The ps command displays currently running processes.
18. Which command is used to terminate a running process?
- kill
- stop
- exit
- terminate
Answer: kill
The kill command terminates a process using its PID.
19. Which command searches for files in a directory hierarchy?
- find
- search
- locate
- grep
Answer: find
The find command searches for files and directories.
20. Which of the following is a major advantage of Linux?
- Open Source
- Secure
- Stable
- All of the above
Answer: All of the above
Linux is open-source, secure, stable, and widely used for servers and development.