{"id":233,"date":"2018-08-14T14:13:04","date_gmt":"2018-08-14T11:13:04","guid":{"rendered":"https:\/\/blog.arcak.net\/?p=217"},"modified":"2018-08-15T11:25:00","modified_gmt":"2018-08-15T08:25:00","slug":"linux-file-system-hierarchy","status":"publish","type":"post","link":"https:\/\/blog.arcak.net\/index.php\/2018\/08\/14\/linux-file-system-hierarchy\/","title":{"rendered":"Linux File System Hierarchy"},"content":{"rendered":"<p>It can be a bit tricky to detect and understand the Linux file system for years using the Microsoft operating system.<\/p>\n<p>Basically, the Linux\/Unix operating systems include hardware resources, but the <strong>&#8220;everything&#8221;<\/strong> is considered a file.<\/p>\n<p>For example<strong>, &#8220;\/proc\/partitions&#8221;<\/strong> specifies the partitions on the disk, whereas <strong>&#8220;\/dev\/eth0&#8221;<\/strong> specifies the connected network adapter.<\/p>\n<p>The following diagram shows the file system hierarchy of a Linux operating system based on Redhat\/Centos.<\/p>\n<p>Now let&#8217;s try to explain the structure one by one.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-222 aligncenter\" src=\"https:\/\/blog.arcak.net\/wp-content\/uploads\/2018\/08\/linux-fs-hierarchy-300x107.png\" alt=\"\" width=\"443\" height=\"158\" srcset=\"https:\/\/blog.arcak.net\/wp-content\/uploads\/2018\/08\/linux-fs-hierarchy-300x107.png 300w, https:\/\/blog.arcak.net\/wp-content\/uploads\/2018\/08\/linux-fs-hierarchy-768x273.png 768w, https:\/\/blog.arcak.net\/wp-content\/uploads\/2018\/08\/linux-fs-hierarchy-660x235.png 660w, https:\/\/blog.arcak.net\/wp-content\/uploads\/2018\/08\/linux-fs-hierarchy.png 792w\" sizes=\"(max-width: 443px) 100vw, 443px\" \/><\/p>\n<p><!--more--><\/p>\n<ul>\n<li>Switch to desktop view to see the tables if you&#8217;re using mobile device.<\/li>\n<\/ul>\n<table style=\"border-collapse: collapse; width: 100.557%; height: 432px;\" border=\"1\">\n<tbody>\n<tr style=\"height: 24px;\">\n<td style=\"width: 16.574%; text-align: center; height: 24px;\"><strong>Folder<\/strong><\/td>\n<td style=\"width: 83.7588%; text-align: center; height: 24px;\"><strong>Definition<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 16.574%; text-align: left; height: 24px;\">\/<\/td>\n<td style=\"width: 83.7588%; height: 24px;\">The root directory at the top of the hierarchy, the rest of it, branches from here.<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 16.574%; height: 24px;\">\/boot<\/td>\n<td style=\"width: 83.7588%; height: 24px;\">Contains the files required for the Boot process. <strong>e.g. \/boot\/grub\/grub.conf<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 16.574%; height: 24px;\">\/etc<\/td>\n<td style=\"width: 83.7588%; height: 24px;\">Contains the configuration files that contain the system settings. <strong>e.g. \/etc\/resolv.conf<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 16.574%; height: 24px;\">\/proc<\/td>\n<td style=\"width: 83.7588%; height: 24px;\">It is a virtual folder and on the fly that hosts the process and kernel details.<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 16.574%; height: 24px;\">\/dev<\/td>\n<td style=\"width: 83.7588%; height: 24px;\">The folder where the required device files are located. <span style=\"font-size: 10pt;\"><strong>e.g. Physical devices, 0 and random data generators)<\/strong><\/span><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 16.574%; height: 24px;\">\/home<\/td>\n<td style=\"width: 83.7588%; height: 24px;\">Hosts the user&#8217;s directories. <strong>e.g. \/home\/user 1,\/home\/user 2<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 16.574%; height: 24px;\">\/root<\/td>\n<td style=\"width: 83.7588%; height: 24px;\">is the user directory for Root.<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 16.574%; height: 24px;\">\/var<\/td>\n<td style=\"width: 83.7588%; height: 24px;\">The variable is the directory where the system files reside. <strong>e.g. \/var\/log\/messages<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 16.574%; height: 24px;\">\/usr<\/td>\n<td style=\"width: 83.7588%; height: 24px;\">A directory where files that are shared among system-wide users are kept.<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 16.574%; height: 24px;\">\/usr\/bin<\/td>\n<td style=\"width: 83.7588%; height: 24px;\">Non-essential command binaries, for all users. <strong>(not required in singular user mode)<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 16.574%; height: 24px;\">\/usr\/sbin<\/td>\n<td style=\"width: 83.7588%; height: 24px;\">Non-essential binary files. <strong>e.g. Programs for various network services<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 16.574%; height: 24px;\">\/mnt<\/td>\n<td style=\"width: 83.7588%; height: 24px;\">The Linux file system is a port for temporary environments. <strong>e.g. CD-ROM, USB-memory<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 16.574%; height: 24px;\">\/opt<\/td>\n<td style=\"width: 83.7588%; height: 24px;\">The directory where external applications are installed.<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 16.574%; height: 24px;\">\/run<\/td>\n<td style=\"width: 83.7588%; height: 24px;\">The run-time variable is the directory where the data is kept. <strong>e.g. Connected users, running services<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 16.574%; height: 24px;\">\/tmp<\/td>\n<td style=\"width: 83.7588%; height: 24px;\">The directory where temporary files are kept.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>When we switch to <strong>&#8220;Shell&#8221;<\/strong>, which is the user interface of the<strong> Linux<\/strong> operating system, I will elaborate on the issues.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It can be a bit tricky to detect and understand the Linux file system for years using the Microsoft operating system. Basically, the Linux\/Unix operating systems include hardware resources, but the &#8220;everything&#8221; is considered a file. For example, &#8220;\/proc\/partitions&#8221; specifies the partitions on the disk, whereas &#8220;\/dev\/eth0&#8221; specifies the connected network adapter. The following diagram [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[161,159],"tags":[112],"class_list":["post-233","post","type-post","status-publish","format-standard","hentry","category-linux","category-open-source","tag-linux-en"],"_links":{"self":[{"href":"https:\/\/blog.arcak.net\/index.php\/wp-json\/wp\/v2\/posts\/233"}],"collection":[{"href":"https:\/\/blog.arcak.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.arcak.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.arcak.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.arcak.net\/index.php\/wp-json\/wp\/v2\/comments?post=233"}],"version-history":[{"count":10,"href":"https:\/\/blog.arcak.net\/index.php\/wp-json\/wp\/v2\/posts\/233\/revisions"}],"predecessor-version":[{"id":323,"href":"https:\/\/blog.arcak.net\/index.php\/wp-json\/wp\/v2\/posts\/233\/revisions\/323"}],"wp:attachment":[{"href":"https:\/\/blog.arcak.net\/index.php\/wp-json\/wp\/v2\/media?parent=233"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.arcak.net\/index.php\/wp-json\/wp\/v2\/categories?post=233"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.arcak.net\/index.php\/wp-json\/wp\/v2\/tags?post=233"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}