Skip to content

debarghya131/Linux-Questions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 

Repository files navigation

Linux Interview Handbook

Top 150 Linux interview questions and answers.

1. Linux Fundamentals

  1. What is Linux? - An open-source Unix-like operating system.
  2. Who created Linux? - Linus Torvalds.
  3. What is a kernel? - The core component of Linux.
  4. What is GNU/Linux? - The Linux kernel plus GNU tools.
  5. Why is Linux popular? - It is open source, stable, and secure.
  6. What is a distribution (distro)? - A packaged version of Linux.
  7. Examples of Linux distros? - Ubuntu, Arch Linux, Debian, Fedora.
  8. What is a shell? - A command-line interpreter.
  9. Popular shells? - Bash, Zsh, Fish.
  10. What is a terminal? - An interface to interact with the shell.

2. File System

  1. What is the Linux file system? - A hierarchical directory structure.
  2. Root directory? - /
  3. Home directory? - /home
  4. Root user home? - /root
  5. Configuration files? - /etc
  6. User programs? - /usr
  7. Temporary files? - /tmp
  8. Variable data? - /var
  9. Device files? - /dev
  10. Boot files? - /boot

3. Basic Commands

  1. pwd? - Print current directory.
  2. ls? - List files.
  3. cd? - Change directory.
  4. mkdir? - Create directory.
  5. rmdir? - Remove empty directory.
  6. rm? - Delete files.
  7. cp? - Copy files.
  8. mv? - Move or rename files.
  9. touch? - Create an empty file.
  10. clear? - Clear the terminal.

4. File Operations

  1. cat? - Display file content.
  2. less? - View file page by page.
  3. more? - Basic file viewer.
  4. head? - Show first lines of a file.
  5. tail? - Show last lines of a file.
  6. tail -f? - Live log monitoring.
  7. nano? - Terminal text editor.
  8. vim? - Advanced text editor.
  9. wc? - Count words and lines.
  10. file? - Identify file type.

5. User Management

  1. Who is the current user? - whoami
  2. Add user? - useradd
  3. Delete user? - userdel
  4. Change password? - passwd
  5. Switch user? - su
  6. Execute as root? - sudo
  7. List users? - cat /etc/passwd
  8. User ID? - UID
  9. Group ID? - GID
  10. Root user UID? - 0

6. Permissions

  1. What are Linux permissions? - Read, write, and execute.
  2. Read permission? - r
  3. Write permission? - w
  4. Execute permission? - x
  5. Check permissions? - ls -l
  6. Change permissions? - chmod
  7. Change ownership? - chown
  8. Change group? - chgrp
  9. Permission 777? - Full access.
  10. Permission 755? - Owner full, others read and execute.

7. Process Management

  1. What is a process? - A running program.
  2. Show running processes? - ps
  3. Detailed processes? - top
  4. Modern alternative? - htop
  5. Process ID? - PID
  6. Kill process? - kill PID
  7. Force kill? - kill -9 PID
  8. Background process? - command &
  9. Foreground process? - Active terminal process.
  10. Show jobs? - jobs

8. Networking

  1. Check IP address? - ip addr
  2. Old command? - ifconfig
  3. Test connectivity? - ping
  4. DNS lookup? - nslookup
  5. Route information? - ip route
  6. Download files? - wget
  7. Alternative download tool? - curl
  8. Open ports? - ss -tuln
  9. SSH? - Secure Shell.
  10. SSH port? - 22

9. Package Management

  1. Ubuntu package manager? - apt
  2. Update packages? - apt update
  3. Upgrade packages? - apt upgrade
  4. Install package? - apt install
  5. Remove package? - apt remove
  6. Arch package manager? - pacman
  7. Update Arch Linux? - pacman -Syu
  8. Fedora package manager? - dnf
  9. Search package? - apt search
  10. Package information? - apt show

10. Storage Management

  1. Show disk usage? - df -h
  2. Show folder size? - du -sh
  3. List partitions? - lsblk
  4. Mount file system? - mount
  5. Unmount file system? - umount
  6. What is swap? - Disk-based virtual memory.
  7. Show memory usage? - free -h
  8. Disk partition tool? - fdisk
  9. Modern partition tool? - parted
  10. What is LVM? - Logical Volume Manager.

11. Advanced Commands

  1. grep? - Search text.
  2. find? - Search files.
  3. locate? - Fast file search.
  4. awk? - Text processing.
  5. sed? - Stream editor.
  6. xargs? - Build command arguments.
  7. sort? - Sort text.
  8. uniq? - Remove duplicates.
  9. cut? - Extract columns.
  10. tr? - Translate characters.

12. Shell Scripting

  1. What is a shell script? - A file containing shell commands.
  2. Script extension? - .sh
  3. Execute script? - bash script.sh
  4. Make executable? - chmod +x
  5. Print text? - echo
  6. Read input? - read
  7. Conditional statement? - if
  8. Loop types? - for, while
  9. Function in Bash? - A reusable code block.
  10. Variables? - Store values.

13. systemd and Services

  1. What is systemd? - Linux service manager.
  2. Start service? - systemctl start
  3. Stop service? - systemctl stop
  4. Restart service? - systemctl restart
  5. Service status? - systemctl status
  6. Enable service? - systemctl enable
  7. Disable service? - systemctl disable
  8. View logs? - journalctl
  9. Boot logs? - journalctl -b
  10. List services? - systemctl list-units

14. Most Asked Interview Questions

  1. Linux vs Windows?
  2. What is kernel?
  3. What is shell?
  4. What is root user?
  5. chmod vs chown?
  6. Process vs thread?
  7. What is SSH?
  8. What is a cron job?
  9. What is systemd?
  10. What is swap memory?

15. Top 10 Commands Every Developer Must Know

  1. ls
  2. cd
  3. pwd
  4. grep
  5. find
  6. cat
  7. chmod
  8. chown
  9. ps
  10. kill

Linux Master Checklist

  • Linux basics
  • Kernel
  • Shell
  • File system
  • Commands
  • Users
  • Groups
  • Permissions
  • Processes
  • Networking
  • SSH
  • Package management
  • Disk management
  • grep
  • find
  • awk
  • sed
  • Bash scripting
  • systemd
  • Logs

End of Linux handbook.

Releases

No releases published

Packages

 
 
 

Contributors