-
Linux directory structure starts from root /
-
Linux Filesystem Hierarchy Standard (FHS) : establishes how data is stored
-
programs are distributed in three-tier structure
- / is the first tire and can be necessary in single-user
- /usr contains most multi-user programs
- distribution /usr/local is used to store software that is not provided by the and has been compiled locally
-
/sbin : contains binaries for sysadmin
-
/bin : binaries for all users
- This is an important folder for system rescue; Those that were absolutely needed. This was a previous tactic but still here
- ls
- mv
- mkdir
-
/usr/sbin : binaries for system admin
-
/usr/share/bin : This is mentioned in other content material, but it is important to note if a particular program has dependent programs or other apps. like Apache
-
/usr/bin : executable files
- This is for most programs
- free
- pstree
- sudo
- man
-
/usr/local/sbin : used to sore locally installed programs for sysadmin not managed by sys pkg manager
-
/usr/local/bin : same as sbin but for user programs
- locally compiled programs that have been manually installed by the user
-
/var/log : where log files are located
- sometimes programs will have their own directory in this section with their own logs
-
/etc directory or et cetera was created as a catch-all directory to store any files that do not belong in other categories usually config files
- group - system group database
- hostname - name of host computer
- hosts - list of IP addy and their hostname translations
- passwd - system user database
- profile - system-wide config file for bash
- shadow - encrypted file for user passwords
-
bash.bashrc - system wide for interactive bash shells
-
nanorc - sample initialization file for GNU nano
-
resolve.conf - config file for the resolver - provides access to Internet Domain Name System (DNS)
-
sysctl.conf - config file to set system variables for the kernel
-
*.d directories - help to build modular, more robust configurations
-
(.) -files that are hidden start with a period/dot
- some dotfiles are bash scripts that customize the user’s shell session and are sources as soon as the user logs into the system
- .bash_history - stores command line history
- .bash_logout - includes commands to execute when leaving the login shell
- .bashrc - Bash’s initialization script for non-login shells
- .profile - Bash’s initialization script for login shells
-
Linux Kernel must be loaded into protected area of memory before any processes can run
- /sbin/init was always the first process until /lib/systemd/systemd
- PID1 sets of the chain of processes
- Linux kernel is in charge of allocating resources to things like keyboard, mouse, disks, memory..etc
- Kernel resides in /boot
- grub - configuration directory for the grub2 bootloader