Linux run levels in init process and File system hierarchy

DINESH VERMADINESH VERMA
2 min read

Run levels :

  • init 0 → Shut Down

  • init 1 → Single user mode without GUI & NFS

  • init 2 → Multi user mode without NFS

  • init 3 → Multi user mode with NFS

  • init 4 → Research Purpose

  • init 5 → Multi user mode with GUI (Linux Graphics)

  • init 6 → Reboot

Note - In systems like RHEL 7+ Run levels are replaced by targets.

File System Hierarchy :

  • / → It is the root directory.

  • It includes :

    • /bin : contains binary files of all commands.

    • /dev : all attached hardware related files.

    • /home : home directory of local users.

    • /lib64 : 64 bit program’s related all library files are their.

    • /proc : all the processes that are running in the system will be seen as files. These files are directly interacting/updating with the kernel.

    • /run : when we attach any removable device to the system, it automatically mounts at /run.

    • /tmp : for holding the temporary data which is usually deleted after reboot.

    • /srv : serving directory used for holding temporary data of a user for any server

    • /var : holds logs for mail, cron ,etc.

    • /boot : holds booting files and iso images.

    • /etc : holds system configuration files like crontab, server configure.

    • /lib : for keeping library files of 32 bit programs.

    • /media : any removable media is attached to the system then it will be mounted to media otherwise to /run.

    • /opt : used for optional software installation.

    • /root : home directory of root user, stores all the personal files and directories like Desktop, Documents, Downloads, etc.

    • /sbin : superuser/system binary, it holds the programs which are only executed by superuser, local users can’t run these programs/services.

    • /sys : system related or kernel related additional files like dev, firmware, hyperwiser, etc.

    • /usr : actual location of binaries and libraries are in /usr and has a soft link in /root.

0
Subscribe to my newsletter

Read articles from DINESH VERMA directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

DINESH VERMA
DINESH VERMA