1. / – Root
· It is home directory for root user
· Only root user has written privilege under this directory
2. /bin – User Binaries
· It contains commands used by all users
· Contains binary executables
· For example: ps, ls, ping, grep, cp
3. /sbin – System Binaries
· It contains commands used by only root user
· But the Linux commands located under this directory are used typically by system administrator, for system maintenance purpose.
· For example: iptables, reboot, fdisk, ifconfig, swap
4. /boot – Boot Loader Files
· Who loads the Operating System
· Boot loader – Grub2 [Grand Unified Boot Loader – V2]
· Kernel initrd, vmlinux, grub files are located under /boot
· For example: initrd.img-2.6.32-24-generic, vmlinuz-2.6.32-24-generic
5. /dev – Device Files
· Contains device files include terminal devices, usb, or any device attached to the system.
· For example: /dev/tty1, /dev/usbmon0
6. /etc – Configuration Files
· Contains system configuration files required by all programs.
· This also contains startup and shutdown shell scripts used to start/stop individual programs.
· For example: /etc/resolv.conf, /etc/logrotate.conf
7. /home – Home Directories
· Home directory for other users to store their personal files
· For example: /home/john, /home/nikita
8. /lib – System Libraries
· Contains library files that supports the binaries located under /bin and /sbin
· Library filenames are either id* or lib*. so.*
· lib for 32 bit & lib64 for 64 bit
· For example: ld-2.11.1.so, libncurses.so.5.7
9. /tmp – Temporary Files
· Directory that contains temporary files created by system and users
· Files under this directory are deleted when system is rebooted
10. /var – Variable Files
· var stands for variable files
· Content of the files that are expected to grow can be found under this directory
· 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);
11. /media – Removable Media Devices
· Temporary mount directory for removable devices.
· For examples, /media/CD Rom for CD-ROM; /media/floppy for floppy drives; /media/CD recorder for CD writer
12. /opt – Optional add-on Applications
· Optional application software packages
· add-on applications should be installed under either /opt/ or /opt/ sub-directory.
13. /proc – Process Information
· Contains information about system process
· For example: /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: /proc/uptime
14. /srv – Service Data
· Contains server specific services related data
· For example: /srv/cvs contains CVS related data
15. /usr – User Programs
· Contains binaries, libraries, documentation, and source-code for second level programs.
· /usr/bin contains binary files for user programs. If you can’t find a user binary under /bin, look under /usr/bin. For example: at, awk, cc, less, scp
· /usr/sbin contains binary files for system administrators. If you can’t find a system binary under /sbin, look under /usr/sbin. For example: atd, cron, sshd, useradd, userdel
· /usr/lib contains libraries for /usr/bin and /usr/sbin
· /usr/local contains user’s programs that you install from source. For example, when you install Apache from source, it goes under /usr/local/apache2
16. /mnt – Mount Directory
· Temporary mount directory where sysadmins can mount filesystems
[shohan@localhost ~ ]$
·
shohan – Username/LoginName who currently logged
in
· @ - Position means in this user in which system logged in
· localhost – Hostname/Machine name/Computer name
· ~ (Tilde) – Home Directory
· $ - Local user
· # - root user
· @ - Position means in this user in which system logged in
· localhost – Hostname/Machine name/Computer name
· ~ (Tilde) – Home Directory
· $ - Local user
· # - root user
/home/student
·
/ - root filesystem/root partition
· home - directory
· / - directory Separator
· student – home directory for user
· home - directory
· / - directory Separator
· student – home directory for user
Û
shell – Command line interpreter
Û
by default, shell in Linux – Bash shell
Û
command line interface provide – shell
q Shell can have up to three parts: command, options (that begin with a - or --) and arguments.
v ls [list of files and directory of current directory]
v ls –l [long list]
v ls –la [a means all including hidden]
v ls –lh [h means human readable format size]
v ls –R [R means recursive order]
v ls –l <Directory>
v ls –l /etc
v ls –l /etc /home
v man ls
v info ls
v ls - -help
v cd [parent directory]
v cd ~ [parent directory]
v cd – [back & up location]
v mkdir dir1 dir2 dir3 dir4 dir5
v mkdir –p <dir1/dir2/dir3> [p means create parent]
v mkdir -p /home/student/Desktop/testing /tmp/testing1
v #dhaka/mdpur/lam [will be executed as comment]
v clear
v ctrl + l
v lscpu
v nproc
v lsblk
v fdisk -l
v w
v who
v whoami
v history
v !20
v history 6
v history -c
v vi /home/oracle/.bash– history [Remove permanently]
v history -r
v uname
v uname –r
v uname –a
v cal
v date
v hwclock
v uptime
v tty [Type of terminal | pts means local terminal/remote login]
v hostname
v hostnamectl
v hostnamectl set–hostname rhel
v cat /etc/os–release
v top
v free –m
v free –g
v free –h
v lastlog
v ifconfig
v ifdown [enterface--ens33]
v ifup [enterface--ens33]
v init 0 [Shutdown]
v poweroff
v shutdown –h now
v shutdown –h 5 now
v reboot
v init 6
v shutdown –r now
v shutdown –r 5 now
Tags
RHCSA