1 / 17

Linux Administration – Finding You Way on the Command Line

Linux Administration – Finding You Way on the Command Line. The Linux File Directory or Tree. Linux Administration – Finding You Way on the Command Line. The Linux File Directory or Tree. root directory - /. Every single file and directory starts from the root directory.

rtrudy
Download Presentation

Linux Administration – Finding You Way on the Command Line

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Linux Administration – Finding You Way on the Command Line The Linux File Directory or Tree

  2. Linux Administration – Finding You Way on the Command Line The Linux File Directory or Tree • root directory - / • Every single file and directory starts from the root directory. • Only root user has write privilege • “/root” is root user’s home directory -- not same as “/”

  3. Linux Administration – Finding You Way on the Command Line The Linux File Directory or Tree • /bin directory – user binaries • Contains binary executables. • Common commands you need to use in single-user modes are located under this directory. • Commands used by all the users of the system are located here. • /bin subdirectory • For example: ps, ls, ping, grep, cp. • Note:Binaries are files that contain compiled source code (or machine code).

  4. Linux Administration – Finding You Way on the Command Line The Linux File Directory or Tree • /sbin directory – system binaries • Just like /bin, /sbin also contains binary executables. • The linux commands located under this directory are used typically by system aministrator, for system maintenance purpose. • Contains binaries to configure the OS • Require “root” privilege • For example: iptables, reboot, fdisk, ifconfig, swapon • Note:Binaries are files that contain compiled source code (or machine code).

  5. Linux Administration – Finding You Way on the Command Line The Linux File Directory or Tree • /etc directory – Configuration files • Contains configuration files required by all programs. • startup and shutdown shell scripts used to start/stop individual programs. • For example: /etc/resolv.conf, /etc/logrotate.conf • Note:Binaries are files that contain compiled source code (or machine code).

  6. Linux Administration – Finding You Way on the Command Line The Linux File Directory or Tree • /device directory – Device files • Contains device files. • These include terminal devices, usb, or any device attached to the system. • Appear to be ordinary files • For example: ls /dev/sd* • Note:Binaries are files that contain compiled source code (or machine code).

  7. Linux Administration – Finding You Way on the Command Line The Linux File Directory or Tree • /proc directory – Process Info • Contains information about system process. • This is a pseudo filesystem contains information about running process. For example: ls/proc/{pid} directory contains information about the process with that particular pid. • This is a virtual filesystem with text information about system resources. For example: ls/proc/uptime • Note:Binaries are files that contain compiled source code (or machine code).

  8. Linux Administration – Finding You Way on the Command Line The Linux File Directory or Tree • /var directory – Variable files • var stands for variable files. • Content of the files that are expected to grow can be found under this directory. • This includes — system log files (/var/log); packages and database files (/var/lib); emails (/var/mail); print queues (/var/spool); lock files (/var/lock); temp files needed across reboots (/var/tmp); • Note:Binaries are files that contain compiled source code (or machine code).

  9. Linux Administration – Finding You Way on the Command Line The Linux File Directory or Tree • /tmp directory – Temporary files • Directory that contains temporary files created by system and users. • Files are deleted when system is rebooted. • Never store data here that is important • Note:Binaries are files that contain compiled source code (or machine code).

  10. Linux Administration – Finding You Way on the Command Line The Linux File Directory or Tree • /usr directory – User Programs • “usr” stands for Unix System Resources • Contains binaries, libraries, documentation, and source-code for second level programs. • /usr/bin contains binary files for user programs. • /usr/sbin contains binary files for system administrators. For example: atd, cron, sshd, useradd, userdel • /usr/lib contains libraries for /usr/bin and /usr/sbin • /usr/local contains users programs that you install from source. For example: when you install apache from source, it goes under /usr/local/apache2 • Note:Binaries are files that contain compiled source code (or machine code).

  11. Linux Administration – Finding You Way on the Command Line The Linux File Directory or Tree • /home directory – Home Directories • Home directories for all users to store their personal files. • Common to name users home directory after user name • For example: /home/john, /home/nikita • Note:Binaries are files that contain compiled source code (or machine code).

  12. Linux Administration – Finding You Way on the Command Line The Linux File Directory or Tree • /boot directory – Boot loader files • Contains boot loader related files. • All files needed to boot the computer • Don’t change very often • Kernel initrd, vmlinux, grub files are located under /boot • Note:Binaries are files that contain compiled source code (or machine code).

  13. Linux Administration – Finding You Way on the Command Line The Linux File Directory or Tree • /lib directory – System Libraries • Contains library files that supports the binaries located under /bin and /sbin • Library filenames are either ld* or lib*.so.* • Note:Binaries are files that contain compiled source code (or machine code).

  14. Linux Administration – Finding You Way on the Command Line The Linux File Directory or Tree • /opt directory – Optional add-on Apps • opt stands for optional. • Contains add-on applications from individual vendors. • add-on applications should be installed under either /opt/ or /opt/ sub-directory • Software outside the distribution repository • Note:Binaries are files that contain compiled source code (or machine code).

  15. Linux Administration – Finding You Way on the Command Line The Linux File Directory or Tree • /mnt directory – Mount directory • Temporary mount directory where sysadmins can mount filesystems • Should be empty and only used for temporary mount points • Note:Binaries are files that contain compiled source code (or machine code).

  16. Linux Administration – Finding You Way on the Command Line The Linux File Directory or Tree • /media directory – Removable Media Devices • Temporary mount directory for removable devices. • For examples: /media/cdrom for CD-ROM; /media/floppy for floppy drives; /media/cdrecorder for CD writer • Note:Binaries are files that contain compiled source code (or machine code).

  17. Linux Administration – Finding You Way on the Command Line The Linux File Directory or Tree • /srv directory – Service Data • srv stands for service. • Use /srv for data that is served by your system • FHS allows locating cvs, rsync, ftp and www data • Note:Binaries are files that contain compiled source code (or machine code).

More Related