Linux filesystem structures.

1. / – Root


  • Every single file and directory starts from the root directory.

  • Only root user has write privilege under this directory.

  • Please note that /root is root user’s home directory, which is not same as
    /.

2. /bin – User Binaries


  • Contains binary executables.

  • Common linux commands you need to use in single-user modes are located
    under this directory.

  • Commands used by all the users of the system are located here.

  • For example: ps, ls, ping, grep, cp.

3. /sbin – System Binaries


  • Just like /bin, /sbin also contains binary executables.

  • But, the linux commands located under this directory are used typically by
    system aministrator, for system maintenance purpose.

  • For example: iptables, reboot, fdisk, ifconfig, swapon

4. /etc – Configuration Files


  • Contains configuration files required by all programs.

  • This also contains startup and shutdown shell scripts used to start/stop
    individual programs.

  • For example: /etc/resolv.conf, /etc/logrotate.conf

5. /dev – Device Files


  • Contains device files.

  • These include terminal devices, usb, or any device attached to the
    system.

  • For example: /dev/tty1, /dev/usbmon0

6. /proc – Process Information


  • Contains information about system process.

  • This is a pseudo filesystem contains information about running process.
    For example: /proc/{pid} directory contains information about the process with
    that particular pid.

  • This is a virtual filesystem with text information about system resources.
    For example: /proc/uptime

7. /var – Variable Files


  • var stands for variable files.

  • Content of the files that are expected to grow can be found under this
    directory.

  • This includes — system log files (/var/log); packages and database files
    (/var/lib); emails (/var/mail); print queues (/var/spool); lock files
    (/var/lock); temp files needed across reboots (/var/tmp);

8. /tmp – Temporary Files


  • Directory that contains temporary files created by system and users.

  • Files under this directory are deleted when system is rebooted.

9. /usr – User Programs


  • Contains binaries, libraries, documentation, and source-code for second
    level programs.

  • /usr/bin contains binary files for user programs. If you can’t find a user
    binary under /bin, look under /usr/bin. For example: at, awk, cc, less,
    scp

  • /usr/sbin contains binary files for system administrators. If you can’t
    find a system binary under /sbin, look under /usr/sbin. For example: atd,
    cron, sshd, useradd, userdel

  • /usr/lib contains libraries for /usr/bin and /usr/sbin

  • /usr/local contains users programs that you install from source. For
    example, when you install apache from source, it goes under
    /usr/local/apache2

10. /home – Home Directories


  • Home directories for all users to store their personal files.

  • For example: /home/john, /home/nikita

11. /boot – Boot Loader Files


  • Contains boot loader related files.

  • Kernel initrd, vmlinux, grub files are located under /boot

  • For example: initrd.img-2.6.32-24-generic, vmlinuz-2.6.32-24-generic

12. /lib – System Libraries


  • Contains library files that supports the binaries located under /bin and
    /sbin

  • Library filenames are either ld* or lib*.so.*

  • For example: ld-2.11.1.so, libncurses.so.5.7

13. /opt – Optional add-on Applications


  • opt stands for optional.

  • Contains add-on applications from individual vendors.

  • add-on applications should be installed under either /opt/ or /opt/
    sub-directory.

14. /mnt – Mount Directory


  • Temporary mount directory where sysadmins can mount filesystems.

15. /media – Removable Media Devices


  • Temporary mount directory for removable devices.

  • For examples, /media/cdrom for CD-ROM; /media/floppy for floppy drives;
    /media/cdrecorder for CD writer

16. /srv – Service Data


  • srv stands for service.

  • Contains server specific services related data.

  • For example, /srv/cvs contains CVS related data.

ref:  Linux
Directory Structure (File System Structure) Explained with
Examples

Linux filesystem structures.,布布扣,bubuko.com

时间: 2024-08-02 07:02:10

Linux filesystem structures.的相关文章

buildroot linux filesystem 初探

/****************************************************************************** * buildroot linux filesystem 初探 * 声明: * 在自己做文件系统的时候发现了这个buildroot,可以用来直接做文件系统,于是 * 下载下来自己编译了一下,发现确实是这样的,于是简单尝试一下,先看看效果如何. * * 2016-2-1 深圳 南山平山村 曾剑锋 **********************

Linux基础之文件系统简介及其系统管理工具

常见的文件系统 Linux文件系统: ext2, ext3, ext4, xfs, btrfs, reiserfs, jfs, swap swap: 交换分区 光盘:iso9660 Windows:fat32, ntfs Unix: FFS, UFS, JFS2 网络文件系统:NFS, CIFS 集群文件系统:GFS2, OCFS2 分布式文件系统:ceph, moosefs, mogilefs, GlusterFS, Lustre 实验环境CentOS7.2 Linux根据其是否支持"jour

Linux基础命令及系统设定查看

命令提示符:prompt 每个用户都有其默认shell的设定 查看当前shell的种类-->~]# echo $SHELL [[email protected] ~]# root:当前登录用户的用户名 localhost:当前主机非完整格式的hostname,完整格式为Fully Qualified Domain Name(FQDN) ~:当前用户所在的目录-->非完整格式路径,路径的基名 #:管理员命令提示符 $:普通用户命令提示符 实时管理操作:su,sudo ssh协议:secure s

(003) Linux之FHS

十年运维系列之基础篇 - Linux 作者:曾林 联系:[email protected] 网站:www.jplatformx.com 版权:文章未经同意请勿转载 一.引言 在Linux系统中,文件系统布局与其他类Unix系统很相似.实际上,一个已经发布的名为Linux文件系统层次标准(Linux Filesystem Hierarchy Standard)的标准,已经阐述了这个设计.并不是所有Linux发行版都严格符合该标准,但大部分与之接近了. 当我们浏览文件系统的时,不要担心将文件系统的布

Linux 磁盘管理基础

一.磁盘内部的相关知识 1.前言: 一些关于磁盘的英文 disk          #磁盘    head          #磁头 sector         #扇区 track          #磁道 cylinder        #柱面 units          #单元快      block          #数据块 iNode          #索引节点 2.磁盘内部的相关知识   一般来说,一块磁盘有1个到数个盘片不等,其中每个盘片的有效盘面对应一个读写磁头,从上到下从

linux 系统管理之存储管理1

Linux存储管理 磁盘的接口类型: IDE:并口,来源于ATA,133Mbps SCSI:并口, UltraSCSI320:320Mbps UltraSCSI640:640Mbps 窄带:7  14 宽带:15  30 SATA:Serial ATA,串口 SATA1 2 3 6Gbps SAS:串口 6Gbps USB: 1.0 1.1 2.0 3.0:480Mbps 3.1:10Gbps 双通道:160MBps IOPS:每秒IO次数 IDE:机械硬盘,50IOPS SCSI:机械硬盘,1

Linux系统下磁盘分区与管理

磁盘分区与管理 1.Linux系统设备文件 crw-rw----. 1 root root    253,  0 Apr 18 15:31 rtc0   #字符文件 lrwxrwxrwx. 1 root root           3 Apr 18 15:31 scd0 -> sr0 brw-rw----. 1 root disk      8,  0 Apr 18 15:31 sda    #设备文件 brw-rw----. 1 root disk      8,  1 Apr 18 15:

Linux磁盘管理基础

Linux磁盘管理基础 硬盘结构 文件系统与MBR.GTP 磁盘管理三步骤:分区.格式化.挂载 mount 硬盘结构 硬盘的基本组成材质是盘片,不同容量硬盘的盘片数不等.每个盘片有两面,都可记录信息.盘片表面上以盘片中心为圆心,不同半径的同心圆称为磁道,不同盘片相同半径的磁道所组成的圆柱称为柱面,每个磁道被分成许多扇形的区域,每个区域叫一个扇区,每个扇区可存储128×2^N 次方(N=0.1.2.3)字节信息.在DOS中每扇区是128×2^2 次方=512字节. 硬盘存储相关术语:CHS hea

Linux目录结构和常用命令

你想知道为什么某些程序位于/bin下,或者/sbin,或者/usr/bin,或/usr/sbin目录下吗?例如,less命令位于/usr/bin目录下.为什么没在/bin中,或/sbin,或/usr/sbin目录中?所有这些目录之间有什么不同? 在这篇文章中,让我们回顾一下Linux的文件系统结构,并理解各上层目录的含义. 蓝色:表示目录 青色:表示链接 黑色:表示文件 1./- 根每一个文件和目录从根目录开始.只有root用户具有该目录下的写权限.请注意,/root是root用户的主目录,这与