1. What is Linux?
Correct Answer ✅✅:Linux is an open-source, Unix-like operating system kernel developed
by Linus Torvalds. It is widely used in servers, desktops, mobile devices, and embedded
systems.
2. What is the difference between Linux and Unix?
Correct Answer ✅✅:Linux is an open-source Unix-like operating system kernel, while
Unix is a proprietary operating system developed by AT&T Bell Labs. Unix requires a license,
whereas Linux is free and open-source.
3. Explain the Linux file system hierarchy.
Correct Answer ✅✅:The Linux file system hierarchy is structured in a tree-like format
starting from the root directory (/). Important directories include /bin, /etc, /home, /var, /usr, and
/tmp.
4. What is the root account?
Correct Answer ✅✅:The root account is the superuser account in Linux with unrestricted
access to all commands, files, and system resources. It is used for system administration tasks.
5. How do you change file permissions in Linux?
,Correct Answer ✅✅:Use the chmod command. For example, to set read, write, and execute
permissions for the owner and read permissions for others, use:
chmod 744 filename
6. What is the difference between su and sudo?
Correct Answer ✅✅:su switches the user to the root account, requiring the root password.
sudo allows a permitted user to execute a command as the superuser or another user, requiring
the user's password.
7. How do you check the current runlevel?
Correct Answer ✅✅:Use the runlevel command:
runlevel
8. How do you list all installed packages in a Debian-based system? Correct Answer
✅✅:Use the dpkg command:
dpkg --list
9. How do you view running processes in Linux?
Correct Answer ✅✅:Use the ps or top command. For a snapshot:
ps aux
For a dynamic view:
,top
10. What is the use of the grep command?
Correct Answer ✅✅:grep searches for patterns within files. For example, to search for
"error" in a file: grep "error" filename
11. How do you display disk usage of directories?
Correct Answer ✅✅:Use the du command:
du -sh /path/to/directory
12. How do you check free disk space?
Correct Answer ✅✅:Use the df command:
df -h
13. What is a symbolic link?
Correct Answer ✅✅:A symbolic link is a type of file that points to another file or directory.
It is created using the ln -s command:
ln -s /path/to/target /path/to/link
14. How do you find files containing a specific string?
Correct Answer ✅✅:Use the grep command with -r for recursive search:
, grep -r "search_string" /path/to/directory
15. How do you compress files using tar?
Correct Answer ✅✅:Use the tar command with -czf to create a compressed archive:
tar -czf archive.tar.gz /path/to/directory
16. How do you extract files from a tar archive?
Correct Answer ✅✅:Use the tar command with -xzf to extract:
tar -xzf archive.tar.gz
17. How do you find the IP address of your system?
Correct Answer ✅✅:Use the ip or ifconfig command:
ip addr show
or
ifconfig
18. How do you view the contents of a file?
Correct Answer ✅✅:Use commands like cat, less, or more. For example:
cat filename