🧪 Linux Proficiency Test – 3 Years Experience (90 Questions)


🔹 Section 1: Command Line Basics (10 questions)
What does the command
pwd
do?How do you list all hidden files?
What is the output of
echo $HOME
?How do you view the last 20 lines of a file?
Explain the difference between
>
and>>
.How can you check your current shell?
Which command will find the absolute path of an executable?
How do you display file sizes in a human-readable format with
ls
?What does
man
do?Write a command to find the number of
.conf
files in/etc
.
🔹 Section 2: File and Directory Operations (10 questions)
How do you create a directory called
projects
?What is the command to remove a directory and all its contents?
Explain how to use
find
to locate all.log
files in/var/log
.How can you rename a file?
How do you move a file from one directory to another?
What does
du -sh *
do?How can you compress a directory using
tar
andgzip
?What’s the command to extract a
.tar.gz
file?Write a command to compare two text files.
How do you delete all
.tmp
files recursively?
🔹 Section 3: Permissions and Ownership (10 questions)
What does
chmod 755
script.sh
mean?How do you make a script executable?
What command changes file ownership?
Explain the difference between
chown
andchgrp
.What is the output of
ls -l
?What are SUID, SGID, and Sticky Bit?
How can you set default permissions using
umask
?What is the command to view ACLs of a file?
How do you grant read and write permissions to the group only?
What does
chmod o-rwx file.txt
do?
🔹 Section 4: Process Management (10 questions)
How do you list all running processes?
What is the function of
top
andhtop
?How do you kill a process by name?
What does
ps aux | grep nginx
show?Explain zombie and orphan processes.
What does the
nice
value control?How do you change the priority of a process?
What command pauses a running job?
How can you bring a background job to the foreground?
What’s the difference between
&
,nohup
, anddisown
?
🔹 Section 5: Networking (10 questions)
What does
ip a
show?How do you test if a server is reachable on port 80?
How do you display the routing table?
What is the command to download a file using the terminal?
How do you see your public IP address?
How do you open a port using
iptables
?What does
ss -tuln
do?What’s the difference between TCP and UDP?
How do you view active network interfaces?
What is the use of
/etc/hosts
?
🔹 Section 6: Package Management (10 questions)
What is the difference between
apt
andyum
?How do you update all installed packages on a Debian-based system?
How do you install a
.deb
file?What does
yum remove
do?How can you check which package provides a command?
What’s the command to list installed packages?
How do you upgrade a single package?
How can you add a PPA repository?
Explain the difference between
dpkg
andapt
.How do you remove unused dependencies?
🔹 Section 7: Users and Groups (10 questions)
How do you add a user?
What’s the command to change a user’s password?
How do you delete a user and their home directory?
How do you add a user to a group?
What’s the default shell for a new user?
How do you lock/unlock a user account?
What is stored in
/etc/passwd
?How do you list all users on the system?
How can you change a user's shell?
What command shows a user’s group memberships?
🔹 Section 8: Shell Scripting and Automation (10 questions)
What is
#!/bin/bash
?How do you pass arguments to a shell script?
What does
$1
,$2
,$@
mean?Write a script to display the current date and time.
How can you make a script run every hour?
What’s the difference between
cron
andat
?How do you debug a shell script?
What command schedules a cron job?
How do you redirect errors to a file?
Write a
for
loop to list numbers 1 to 10.
🔹 Section 9: System Monitoring & Logs (10 questions)
How do you check system load average?
Where are system logs stored?
What does
journalctl
do?How do you watch real-time logs?
What command shows memory usage?
How do you check disk usage?
What tool can you use to monitor IO activity?
What is the use of
uptime
?How do you track login attempts?
What is the purpose of
/var/log/auth.log
?
✅ Answer Key: Linux 90 Questions
🔹 Section 1: Command Line Basics
Prints current working directory
ls -a
Displays the path to the user's home directory
tail -n 20 filename
>
overwrites,>>
appendsecho $SHELL
which
ls -lh
Shows manual/help pages
find /etc -name "*.conf" | wc -l
🔹 Section 2: File and Directory Operations
mkdir projects
rm -rf directory_name
find /var/log -name "*.log"
mv oldname newname
mv file /new/location/
Shows size of each item in human-readable format
tar -czvf archive.tar.gz directory/
tar -xzvf archive.tar.gz
diff file1 file2
find . -name "*.tmp" -delete
🔹 Section 3: Permissions and Ownership
rwx for owner, rx for group, r for others
chmod +x
script.sh
chown user:group filename
chown
changes user & group,chgrp
only groupLists permissions, owner, group, size, etc.
Special permissions for exec, group files, and directories
Sets default permissions mask
getfacl filename
chmod g+rw filename
Removes all permissions from others
🔹 Section 4: Process Management
ps aux
ortop
Real-time process monitoring tools
pkill processname
Filters for processes named nginx
Zombie: finished but not reaped; Orphan: no parent
Process priority
renice
Ctrl + Z
orkill -STOP pid
fg
&
runs in background,nohup
ignores hangups,disown
removes job from shell
🔹 Section 5: Networking
Shows all IP addresses and interfaces
telnet host 80
ornc -zv host 80
ip route
orroute -n
wget
orcurl -O
curl
ifconfig.me
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
Shows listening ports and services
TCP = connection-based, UDP = connectionless
ip link show
orifconfig
Maps hostnames to IPs locally
🔹 Section 6: Package Management
Different package managers: apt = Debian, yum = RHEL
sudo apt update && sudo apt upgrade
sudo dpkg -i package.deb
Removes a package
dpkg -S /path/to/file
oryum provides
dpkg -l
oryum list installed
sudo apt install package-name
add-apt-repository ppa:name
dpkg
is low-level,apt
is higher-levelapt autoremove
🔹 Section 7: Users and Groups
adduser username
oruseradd
passwd username
userdel -r username
usermod -aG groupname username
Usually
/bin/bash
passwd -l username
/passwd -u username
Basic user info and UID/GID
cut -d: -f1 /etc/passwd
chsh -s /bin/zsh username
groups username
🔹 Section 8: Shell Scripting and Automation
Shebang – tells the shell to use Bash
./
script.sh
arg1 arg2
$0
= script name,$1
= first arg,$@
= all argsecho "Today is $(date)"
Cron:
0 * * * * /path/to/
script.sh
cron
= recurring,at
= one-timebash -x
script.sh
crontab -e
command 2> error.log
for i in {1..10}; do echo $i; done
🔹 Section 9: System Monitoring & Logs
uptime
ortop
/var/log
Views logs from
systemd
journaltail -f /var/log/syslog
free -h
df -h
iotop
oriostat
Shows uptime and load
last
orwho
Contains authentication logs
Subscribe to my newsletter
Read articles from Vaibhav Upare directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Vaibhav Upare
Vaibhav Upare
"Passionate DevOps Engineer dedicated to crafting robust, scalable, and automated solutions for seamless software delivery. With expertise in cloud technologies, CI/CD pipelines, and infrastructure as code, I thrive on optimizing workflows and driving collaboration between development and operations teams. Let's build together for continuous innovation and efficiency."