Skip to content

Linux Administration

Master Linux Administration with 50 free flashcards. Study using spaced repetition and focus mode for effective learning in Programming.

🎓 50 cards ⏱️ ~25 min Advanced
Study Full Deck →
Share: 𝕏 Twitter LinkedIn WhatsApp

🎯 What You'll Learn

Preview Questions

12 shown

What does the ls command do in Linux?

Show ▼

The ls command lists directory contents. Common flags:
-l long format with permissions, owner, size, date
-a show hidden files (dotfiles)
-h human-readable sizes
-R recursive listing
-t sort by modification time

How does grep search for patterns in files?

Show ▼

grep searches text using patterns.
Usage: grep [options] pattern [file...]
Key flags:-i case-insensitive-r recursive search-n show line numbers-v invert match-E extended regex (same as egrep)

How do you use the find command to locate files?

Show ▼

find searches the directory tree.
Examples:
find /home -name "*.txt" — find by name
find . -type f -mtime -7 — files modified in last 7 days
find / -size +100M — files larger than 100MB
find . -perm 755 — find by permissions
find . -name "*.log" -exec rm {} \; — execute command on results

What is awk and how is it used for text processing?

Show ▼

awk is a powerful text-processing language that operates on fields and records.
Examples:
awk '{print $1, $3}' file — print columns 1 and 3
awk -F: '{print $1}' /etc/passwd — set delimiter to colon
awk '$3 > 100 {print $0}' data.txt — conditional filtering
Built-in variables: NR (record number), NF (number of fields), FS (field separator)

How does sed perform text substitution?

Show ▼

sed (stream editor) transforms text in a pipeline.
Common usage:
sed 's/old/new/' file — replace first occurrence per line
sed 's/old/new/g' file — replace all occurrences
sed -i 's/old/new/g' file — edit file in-place
sed -n '5,10p' file — print lines 5–10
sed '/pattern/d' file — delete matching lines

What are the key directories in the Linux filesystem hierarchy?

Show ▼

Key directories:/etc — system configuration files/var — variable data (logs, spools, caches)/home — user home directories/usr — user programs and read-only data/tmp — temporary files (cleared on reboot)/proc — virtual filesystem for process/kernel info/dev — device files (block and character devices)

What is the /proc filesystem in Linux?

Show ▼

/proc is a virtual filesystem that provides an interface to kernel data structures.
Key entries:/proc/cpuinfo — CPU details/proc/meminfo — memory usage/proc/[PID]/ — per-process info/proc/loadavg — system load averages/proc/filesystems — supported filesystemsIt exists only in memory, not on disk.

How do Linux file permissions work with chmod?

Show ▼

Permissions have three sets: owner, group, others, each with r(4), w(2), x(1).
Numeric: chmod 755 file → rwxr-xr-x
Symbolic: chmod u+x file → add execute for owner
chmod g-w file → remove write for group
chmod o=r file → set others to read only
chmod -R 644 dir/ → recursive

What are SUID, SGID, and the sticky bit?

Show ▼

Special permission bits:SUID (4xxx) — file executes as the file owner. Example: chmod 4755 file. Shown as -rwsr-xr-xSGID (2xxx) — file executes as the group owner; on directories, new files inherit the group. chmod 2755 dirSticky bit (1xxx) — only file owner can delete files in the directory. chmod 1777 /tmp. Shown as drwxrwxrwt

What does umask control and how do you set it?

Show ▼

umask sets the default permission mask for newly created files and directories.
It subtracts permissions from the maximum (666 for files, 777 for dirs).
Example: umask 022 → new files get 644, new dirs get 755
umask 077 → new files get 600, new dirs get 700
View current: umask or umask -S (symbolic)
Set in ~/.bashrc or /etc/profile for persistence.

How do you manage file ownership with chown and chgrp?

Show ▼

chown changes file owner and/or group:
chown user file — change owner
chown user:group file — change both
chown :group file — change group only
chown -R user:group dir/ — recursive

chgrp changes group only:
chgrp developers file
Only root can change file ownership; group members can use chgrp.

How do you view and manage processes with ps and top?

Show ▼

ps shows a snapshot of processes:
ps aux — all processes, detailed
ps -ef — full-format listing
ps -u username — processes by user

top shows a real-time dynamic view:k — kill a processM — sort by memoryP — sort by CPUq — quithtop is an enhanced interactive alternative.

🎓 Start studying Linux Administration

🎮 Study Modes Available

🔄

Flashcards

Flip to reveal

🧠

Focus Mode

Spaced repetition

Multiple Choice

Test your knowledge

⌨️

Type Answer

Active recall

📚

Learn Mode

Multi-round mastery

🎯

Match Game

Memory challenge

Related Topics in Programming

📖 Learning Resources