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

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?

  1. An Operating System
  2. A Programming Language
  3. A Database
  4. A Web Browser

Answer: An Operating System

Linux is an open-source operating system based on the Unix architecture.

2. Who created Linux?

  1. Bill Gates
  2. Linus Torvalds
  3. James Gosling
  4. Guido van Rossum

Answer: Linus Torvalds

Linux was created by Linus Torvalds in 1991.

3. Which command shows the current working directory?

  1. pwd
  2. dir
  3. ls
  4. cd

Answer: pwd

The pwd command prints the current working directory.

4. Which command lists files and directories?

  1. ls
  2. dir
  3. list
  4. show

Answer: ls

The ls command lists files and folders.

5. Which command is used to change directories?

  1. cd
  2. pwd
  3. mv
  4. cp

Answer: cd

The cd command changes the current directory.

6. Which command creates a new directory?

  1. mkdir
  2. newdir
  3. createdir
  4. makedir

Answer: mkdir

mkdir creates a new directory.

7. Which command removes a file?

  1. rm
  2. delete
  3. erase
  4. remove

Answer: rm

The rm command deletes files.

8. Which command copies files?

  1. cp
  2. copy
  3. mv
  4. clone

Answer: cp

The cp command copies files and directories.

9. Which command moves or renames files?

  1. mv
  2. move
  3. rename
  4. cp

Answer: mv

The mv command moves or renames files.

10. Which command displays the contents of a file?

  1. cat
  2. show
  3. open
  4. read

Answer: cat

The cat command displays the contents of a file.

11. Which command displays the current logged-in user?

  1. whoami
  2. who
  3. user
  4. me

Answer: whoami

The whoami command displays the current logged-in username.

12. Which command shows the current date and time?

  1. date
  2. time
  3. clock
  4. calendar

Answer: date

The date command displays the current system date and time.

13. Which command is used to clear the terminal screen?

  1. clear
  2. cls
  3. clean
  4. erase

Answer: clear

The clear command clears the terminal screen.

14. Which command is used to find the location of a command?

  1. which
  2. find
  3. locate
  4. where

Answer: which

The which command shows the path of an executable.

15. Which command changes file permissions?

  1. chmod
  2. chown
  3. perm
  4. access

Answer: chmod

chmod changes file and directory permissions.

16. Which command changes the ownership of a file?

  1. chown
  2. chmod
  3. owner
  4. changeuser

Answer: chown

The chown command changes the owner of a file or directory.

17. Which command displays running processes?

  1. ps
  2. jobs
  3. task
  4. process

Answer: ps

The ps command displays currently running processes.

18. Which command is used to terminate a running process?

  1. kill
  2. stop
  3. exit
  4. terminate

Answer: kill

The kill command terminates a process using its PID.

19. Which command searches for files in a directory hierarchy?

  1. find
  2. search
  3. locate
  4. grep

Answer: find

The find command searches for files and directories.

20. Which of the following is a major advantage of Linux?

  1. Open Source
  2. Secure
  3. Stable
  4. All of the above

Answer: All of the above

Linux is open-source, secure, stable, and widely used for servers and development.

Take the timed quiz