Linux /home and its architecture!
Guide outline
- 1.1. Overview
- 1.2. The Root Directory
- 1.3. /bin
- 1.4. /boot
- 1.5. /dev
- 1.6. /etc
- 1.7. /home
- 1.8. /initrd
- 1.9. /lib
- 1.10. /lost+found
- 1.11. /media
- 1.12. /mnt
- 1.13. /opt
- 1.14. /proc
- 1.15. /root
- 1.16. /sbin
- 1.17. /usr
- 1.18. /var
- 1.19. /srv
- 1.20. /tm
- 2. Glossary
Additional Linux Resources
Here is a list of resources for learning Linux:
Resources for System Administrators
Linux System Admin Guide- What is Linux Operating System and how it works
Linux System Admin Guide- What are Directory Tree and Filesystem Hierarchy in Linux
Linux System Admin Guide- Introduction to Linux File Systems for System Admins
Linux System Admin Guide- Overview of Linux Virtual Memory and Disk Buffer Cache
Linux System Admin Guide- Best Practices for Monitoring Linux Systems
Linux System Admin Guide- Best Practices for Performing Linux Boots and Shutdowns
Linux System Admin Guide- Best Practices for Making and Managing Backup Operations
Resources for Linux Kernel Programmers
How Linux Operating System Memory Management works
Comprehensive Review of Linux Kernel Operating System Processes
Comprehensive Review of Linux File System Architecture and Management
What are mechanisms behind Linux Kernel task management
How Linux Kernel Sources and Functions work
Comprehensive look at how Linux Data Structures work
Hands-on Linux classes
- Linux shell and bash scripting via hybrid training
- Hands-on Linux programming for system administration via hybrid training
- Live and self-paced SQL coding and database management
- Introduction to Linux OS
- Intro to Linux Bash Scripting
- Advance Linux Bash Scripting
- Linux Management for System Admins
- Essential Linux Commands in 6 Hours by Hands-on Exercises
- Linux Bash & Shell Scripts in 6 Hour by Hands-on Exercises
Linux Operating System Distributions
Comprehensive list of all Linux OS distributions
Comprehensive list of all special purpose Linux distributions
Comprehensive list of all secure Linux distributions for cybersecurity professionals
One-to-One Live Linux Classes
Coding Bootcamps school offers One-to-One Live Linux Classes for Beginners.
1.7. /home
Linux is a multi-user environment so each user is also assigned a specific directory that is accessible only to them and the system administrator. These are the user home directories, which can be found under ‘/home/$USER’ (~/). It is your playground: everything is at your command, you can write files, delete them, install programs, etc…. Your home directory contains your personal configuration files, the so-called dot files (their name is preceded by a dot). Personal configuration files are usually ‘hidden’, if you want to see them, you either have to turn on the appropriate option in your file manager or run ls with the -a switch. If there is a conflict between personal and system wide configuration files, the settings in the personal file will prevail.
Dotfiles most likely to be altered by the end user are probably your .xsession and .bashrc files. The configuration files for X and Bash respectively. They allow you to be able to change the window manager to be startup upon login and also aliases, user-specified commands and environment variables respectively. Almost always when a user is created their dotfiles will be taken from the /etc/skel directory where system administrators place a sample file that user’s can modify to their hearts content.
/home can get quite large and can be used for storing downloads, compiling, installing and running programs, your mail, your collection of image or sound files etc.
The FSSTND states that:
/home is a fairly standard concept, but it is clearly a site-specific filesystem. Different people prefer to place user accounts in a variety of places. This section describes only a suggested placement for user home directories; nevertheless we recommend that all FHS-compliant distributions use this as the default location for home directories. On small systems, each user's directory is typically one of the many subdirectories of /home such as /home/smith, /home/torvalds, /home/operator, etc. On large systems (especially when the /home directories are shared amongst many hosts using NFS) it is useful to subdivide user home directories. Subdivision may be accomplished by using subdirectories such as /home/staff, /home/guests, /home/students, etc. The setup will differ from host to host. Therefore, no program should rely on this location. If you want to find out a user's home directory, you should use the getpwent(3) library function rather than relying on /etc/passwd because user information may be stored remotely using systems such as NIS. User specific configuration files for applications are stored in the user's home directory in a file that starts with the '.' character (a "dot file"). If an application needs to create more than one dot file then they should be placed in a subdirectory with a name starting with a '.' character, (a "dot directory"). In this case the configuration files should not start with the '.' character. It is recommended that apart from autosave and lock files programs should refrain from creating non dot files or directories in a home directory without user intervention. |