0% found this document useful (0 votes)
19 views

Linux Directories Quick Reference

The document describes the essential Linux directories and their common uses and operations. It outlines the purpose and typical contents and tasks for directories like /bin, /sbin, /etc, /home, /var, /usr, /tmp, /opt, /boot, /dev, /proc, /sys, /lib, /mnt, /media, /srv, /run and /root.

Uploaded by

sreepadh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

Linux Directories Quick Reference

The document describes the essential Linux directories and their common uses and operations. It outlines the purpose and typical contents and tasks for directories like /bin, /sbin, /etc, /home, /var, /usr, /tmp, /opt, /boot, /dev, /proc, /sys, /lib, /mnt, /media, /srv, /run and /root.

Uploaded by

sreepadh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

#_ Essential Linux Directories Quick Reference

● 🗂️ /bin
○ Usage: Essential command binaries.
○ Common Operations:
■ Listing commands: ls /bin.
■ Using basic commands like cp, mv, rm, echo, etc.
■ Finding binary paths: which command.
● 🔧 /sbin
○ Usage: System binaries.
○ Common Operations:
■ Managing network: ifconfig, route.
■ Shutting down: shutdown -h now.
■ Rebooting: reboot.
■ Managing services: service start/stop.
● ⚙️ /etc
○ Usage: Configuration files.
○ Common Operations:
■ Editing user info: sudo vi /etc/passwd, sudo vi
/etc/group.
■ Configuring network: sudo vi /etc/network/interfaces, sudo
vi /etc/hostname, /etc/resolv.conf.
■ Managing scheduled tasks: crontab -e.
■ Configuring firewalls: sudo vi /etc/iptables.
● 🏠 /home
○ Usage: User home directories.
○ Common Operations:
■ Changing user directories: cd /home/username.
■ Managing user files: mkdir, rm, cp.
■ Setting up user environment: .bashrc, .profile.
■ Securely copying files between servers: scp.

By: Waleed Mousa


● 📊 /var
○ Usage: Variable data like logs.
○ Common Operations:
■ Viewing logs: tail /var/log/syslog.
■ Clearing logs: truncate -s 0 /var/log/syslog.
■ Managing mail queue: mailq.
■ Managing print jobs: /var/spool.
■ Hosting websites in /var/www.
● 📚 /usr
○ Usage: User utilities and applications.
○ Common Operations:
■ Installing software: Package managers like apt, yum.
■ Managing local binaries in /usr/local/bin.
■ Managing man pages: /usr/share/man.
■ Shared libraries: /usr/lib.
● 🚮 /tmp
○ Usage: Temporary files.
○ Common Operations:
■ Storing temp files: mktemp.
■ Clearing old files: tmpwatch.
■ Storing session data: session.save_path in php.ini.
■ Cleaning old files: tmpwatch.
● ➕ /opt
○ Usage: Optional software.
○ Common Operations:
■ Installing third-party software./opt/package_name.
■ Managing software links to /opt.
■ Symlinking: ln -s.
● 🚀 /boot
○ Usage: Boot configuration and kernel files.
○ Common Operations:
■ Updating kernel: sudo apt-get dist-upgrade.
■ Configuring GRUB: update-grub.
■ Managing bootloader: update-grub.

By: Waleed Mousa


● 📟 /dev
○ Usage: Device files.
○ Common Operations:
■ Creating file systems: mkfs.
■ Disk management: fdisk, lsblk.
■ Serial port communication: screen /dev/ttyUSB0.
● 🧠 /proc
○ Usage: Info about system resources.
○ Common Operations:
■ Checking CPU: cat /proc/cpuinfo.
■ Viewing processes: top.
■ Checking memory: cat /proc/meminfo.
■ Kernel tuning: /proc/sys.
● 🎛️ /sys
○ Usage: Kernel's view of the system.
○ Common Operations:
■ Changing kernel parameters: echo value >
/sys/path/to/parameter.
■ Modifying kernel parameters: sysctl.
■ Managing subsystems and devices.
● 📖 /lib
○ Usage: Library files.
○ Common Operations:
■ Updating library cache: ldconfig.
■ Checking library version: ldd.
● 📀 /mnt
○ Usage: Mount point for external devices.
○ Common Operations:
■ Mounting: mount /dev/sdx /mnt/point.
■ Unmounting: umount /mnt/point.
● 🎥 /media
○ Usage: Removable media.
○ Common Operations:
■ Mounting CD-ROM: mount /dev/cdrom /media/cdrom.
■ Ejecting media: eject.

By: Waleed Mousa


● 🖥️ /srv
○ Usage: Data for system services.
○ Common Operations:
■ Managing FTP data.
■ Managing web server content.
● 🌐 /run - Run-time Variable Data
○ Common Operations:
■ Managing PID files.
■ Temporary sockets.
● 💼 /root - Root User's Home Directory
○ Common Operations:
■ Storing system administration scripts.
■ Root user's settings and files.

By: Waleed Mousa

You might also like