Linux Aptitude Test - 25 MCQ Questions with Answers

This post presents a Linux aptitude test with 25 multiple-choice questions for beginners. These beginner-level MCQ questions cover the fundamentals of Linux.

1. What is Linux?

a) A database management system
b) A programming language
c) An operating system kernel
d) A web browser

2. Which command is used to list directory contents in Linux?

a) list
b) show
c) ls
d) dir

3. What is the root directory in Linux?

a) The directory at the top of the user's home directory
b) The directory where users store their personal files
c) The top-level directory of the file system
d) The directory used for temporary files

4. Which command can you use to see the manual of a command in Linux?

a) help
b) doc
c) man
d) info

5. What does the command pwd stand for?

a) Print working directory
b) Password directory
c) Past working directory
d) Print written data

6. Which command is used to copy files in Linux?

a) cp
b) mv
c) copy
d) clone

7. How do you create a new directory in Linux?

a) mkfile
b) mkdir
c) newdir
d) crdir

8. Which command changes the current directory in Linux?

a) change
b) cd
c) switch
d) move

9. What is the command to view the content of a file in Linux?

a) view
b) open
c) cat
d) show

10. How do you remove a file in Linux?

a) rm
b) delete
c) remove
d) del

11. What is the superuser account called in Linux?

a) admin
b) master
c) root
d) super

12. Which file in your home directory contains user-specific environment and startup programs?

a) .bashrc
b) .config
c) .env
d) .init

13. What does the command chmod do?

a) Changes the user's password
b) Modifies the file owner and group
c) Changes file permissions
d) Changes the file modification time

14. Which command is used to download files from the internet?

a) fetch
b) pull
c) wget
d) get

15. How do you display the first few lines of a file in Linux?

a) head
b) top
c) start
d) beginning

16. Which command shows the current date and time in Linux?

a) date
b) time
c) now
d) clock

17. What does the command df show?

a) File types
b) Disk free space
c) File differences
d) Directory functions

18. How do you display a list of currently running processes in Linux?

a) ps
b) pr
c) lsproc
d) proc

19. What is the purpose of the grep command?

a) To find text within files
b) To graph system performance
c) To manage user groups
d) To configure system settings

20. How do you update all system software to the latest versions in Linux?

a) update
b) upgrade
c) apt-get update && apt-get upgrade
d) refresh

21. How do you shut down a Linux system immediately using a command?

a) shutdown -h now
b) poweroff
c) halt
d) All of the above

22. How do you find out how long the system has been running?

a) uptime
b) runtime
c) systime
d) tick

23. Which command can change the ownership of a file or directory in Linux?

a) chown
b) own
c) chuser
d) setown

24. What is a typical file extension for a script in Linux?

a) .txt
b) .script
c) .exe
d) .sh

25. How do you check the current Linux version you are running?

a) linux -v
b) version
c) uname -r
d) checkversion