Linux is inspired by the Unix operating system which first appeared in 1969, and has been in continous use and development ever since. Many of the design conventions behind Unix also exist in Linux and are central to understanding the basics of the system.
Unix was primarily oriented towards the command line interface, and that legacy is carried on in Linux. Thus, the graphical user interface with its windows, icons and menus are built on top of a basic command line interface. Furthermore, this means that the Linux file system is structured to be easily manageable and accessible from the command line.
Linux and Unix file systems are organised in a hierarchical, tree-like structure. The highest level of the file system is the
For example,
Underneath the root (
Credit to https://help.ubuntu.com/6.06/ubuntu/desktopguide/C/linux-basics.html
Unix was primarily oriented towards the command line interface, and that legacy is carried on in Linux. Thus, the graphical user interface with its windows, icons and menus are built on top of a basic command line interface. Furthermore, this means that the Linux file system is structured to be easily manageable and accessible from the command line.
Directories and File Systems
/
or root directory. In the Unix and Linux design philosophy, everything is considered a file - including hard disks, partitions and removable media. This means that all other files and directories (including other disks and partitions) exist under the root directory. For example,
/home/jebediah/cheeses.odt
shows the correct full path to the cheeses.odt
file that exists in the jebediah
directory which is under the home
directory, which in turn, is under the root (/
) directory. Underneath the root (
/
) directory, there is a set of important system directories that are common across most Linux distributions that are used. The following is a listing of common directories that are directly under the root (/
) directory: -
/bin
- important binary applications
-
/boot
- boot configuration files
-
/dev
- the device files
-
/etc
- configuration files, startup scripts, etc...
-
/home
- local users' home directories
-
/lib
- system libraries
-
/lost+found
- provides a lost+found system for files that exist under the root (/
) directory
-
/media
- mounted (loaded) removable media such as CDs, digital cameras, etc...
-
/mnt
- mounted filesystems
-
/opt
- provides a location for optional applications to be installed
-
/proc
- special dynamic directory that maintains information about the state of the system, including currently running processes
-
/root
- root user home directory, pronounced 'slash-root'
-
/sbin
- important system binaries
-
/sys
- system files
-
/tmp
- temporary files
-
/usr
- applications and files that are mostly available for all users to access
-
/var
- variable files such as logs and databases