Linux system directory structure

Little Pang 2021-01-24 12:00:16
linux directory structure


stay Linux In the system , There are several directories that are more important , Usually, you need to be careful not to delete or change internal files by mistake .

/etc:  It's also mentioned above , This is the configuration file in the system , If you change a file in this directory, the system may fail to start .

/bin, /sbin, /usr/bin, /usr/sbin:  This is the system's default location directory for execution files , such as  ls  Is in the /bin/ls  In the catalog .



  • /bin:
bin yes Binaries ( Binary ) Abbreviation , This directory holds the most frequently used commands .
  • /boot:
What's stored here is startup Linux Some of the core files used , Including some connection files and image files .
  • /dev :
dev yes Device( equipment ) Abbreviation , What is stored in this directory is Linux External equipment of , stay Linux The way to access devices and files in is the same .
  • /etc:
etc yes Etcetera( wait ) Abbreviation , This directory is used to store all configuration files and subdirectories required by system management .
  • /home:
User's home directory , stay Linux in , Each user has its own directory , Generally, the directory name is named after the user's account , As shown in the figure above alice、bob and eve.
  • /lib:
lib yes Library( library ) This directory contains the most basic dynamic connection shared library of the system , Its function is similar to Windows Inside DLL file . These shared libraries are required for almost all applications .
  • /lost+found:
This directory is usually empty , When the system is shut down illegally , Here are some files .
  • /media:
linux The system will automatically identify some devices , for example U disc 、 Optical drive and so on , When identified ,Linux Will mount the identified device to this directory .
  • /mnt:
The system provides this directory for users to temporarily mount other file systems , We can mount the CD-ROM drive on /mnt/ On , Then enter the directory and you can view the contents of the CD-ROM drive .
  • /opt:
opt yes optional( Optional ) Abbreviation , This is the directory where the additional software is installed for the host . For example, you install a ORACLE The database can be placed in this directory . The default is empty .
  • /proc:
proc yes Processes( process ) Abbreviation ,/proc It's a pseudo file system ( Virtual file system ), It stores a series of special files about the running state of the current kernel , This directory is a virtual directory , It's a mapping of system memory , We can get system information by directly accessing this directory .
The contents of this directory are not on the hard disk but in memory , We can also modify some files directly , For example, you can use the following command to shield the host ping command , Make it impossible for others to ping Your machine :
echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all
  • /root:
This directory is for system administrator , Also known as the user's home directory for super users .
  • /sbin:
s Namely Super User It means , yes Superuser Binaries ( Super user binaries ) Abbreviation , Here is the system management program used by the system administrator .
  • /selinux:
  This directory is Redhat/CentOS Unique directory ,Selinux It's a security mechanism , Be similar to windows The firewall of , But this mechanism is more complicated , This directory is for storing selinux Related documents .
  • /srv:
  This directory stores some data that needs to be extracted after the service is started .
  • /sys:
This is a Linux2.6 A big change in the kernel . This directory has 2.6 A new file system in the kernel  sysfs .
sysfs The file system integrates the following 3 File system information : For process information proc file system 、 For equipment devfs File system and for pseudo terminal devpts file system .
The file system is an intuitive reflection of the kernel device tree .
When a kernel object is created , The corresponding files and directories are also created in the kernel object subsystem .
  • /tmp:
tmp yes temporary( temporary ) This directory is used to store some temporary files .
  • /usr:
 usr yes unix shared resources( Shared resources ) Abbreviation , This is a very important Directory , Many of the user's applications and files are in this directory , Be similar to windows Under the program files Catalog .
  • /usr/bin:
Applications used by system users .
  • /usr/sbin:
Super users use more advanced hypervisors and system daemons .
  • /usr/src:
The default placement directory for kernel source code .
  • /var:
var yes variable( Variable ) Abbreviation , There is something expanding in this catalog , We are used to putting the frequently modified directories in this directory . Including various log files .
  • /run:
It's a temporary file system , Information since the storage system started . When the system restarts , The files in this directory should be deleted or erased . If you have /var/run Catalog , It should point to run.

本文为[Little Pang]所创,转载请带上原文链接,感谢

  1. 【计算机网络 12(1),尚学堂马士兵Java视频教程
  2. 【程序猿历程,史上最全的Java面试题集锦在这里
  3. 【程序猿历程(1),Javaweb视频教程百度云
  4. Notes on MySQL 45 lectures (1-7)
  5. [computer network 12 (1), Shang Xuetang Ma soldier java video tutorial
  6. The most complete collection of Java interview questions in history is here
  7. [process of program ape (1), JavaWeb video tutorial, baidu cloud
  8. Notes on MySQL 45 lectures (1-7)
  9. 精进 Spring Boot 03:Spring Boot 的配置文件和配置管理,以及用三种方式读取配置文件
  10. Refined spring boot 03: spring boot configuration files and configuration management, and reading configuration files in three ways
  11. 精进 Spring Boot 03:Spring Boot 的配置文件和配置管理,以及用三种方式读取配置文件
  12. Refined spring boot 03: spring boot configuration files and configuration management, and reading configuration files in three ways
  13. 【递归,Java传智播客笔记
  14. [recursion, Java intelligence podcast notes
  15. [adhere to painting for 386 days] the beginning of spring of 24 solar terms
  16. K8S系列第八篇(Service、EndPoints以及高可用kubeadm部署)
  17. K8s Series Part 8 (service, endpoints and high availability kubeadm deployment)
  18. 【重识 HTML (3),350道Java面试真题分享
  19. 【重识 HTML (2),Java并发编程必会的多线程你竟然还不会
  20. 【重识 HTML (1),二本Java小菜鸟4面字节跳动被秒成渣渣
  21. [re recognize HTML (3) and share 350 real Java interview questions
  22. [re recognize HTML (2). Multithreading is a must for Java Concurrent Programming. How dare you not
  23. [re recognize HTML (1), two Java rookies' 4-sided bytes beat and become slag in seconds
  24. 造轮子系列之RPC 1:如何从零开始开发RPC框架
  25. RPC 1: how to develop RPC framework from scratch
  26. 造轮子系列之RPC 1:如何从零开始开发RPC框架
  27. RPC 1: how to develop RPC framework from scratch
  28. 一次性捋清楚吧,对乱糟糟的,Spring事务扩展机制
  29. 一文彻底弄懂如何选择抽象类还是接口,连续四年百度Java岗必问面试题
  30. Redis常用命令
  31. 一双拖鞋引发的血案,狂神说Java系列笔记
  32. 一、mysql基础安装
  33. 一位程序员的独白:尽管我一生坎坷,Java框架面试基础
  34. Clear it all at once. For the messy, spring transaction extension mechanism
  35. A thorough understanding of how to choose abstract classes or interfaces, baidu Java post must ask interview questions for four consecutive years
  36. Redis common commands
  37. A pair of slippers triggered the murder, crazy God said java series notes
  38. 1、 MySQL basic installation
  39. Monologue of a programmer: despite my ups and downs in my life, Java framework is the foundation of interview
  40. 【大厂面试】三面三问Spring循环依赖,请一定要把这篇看完(建议收藏)
  41. 一线互联网企业中,springboot入门项目
  42. 一篇文带你入门SSM框架Spring开发,帮你快速拿Offer
  43. 【面试资料】Java全集、微服务、大数据、数据结构与算法、机器学习知识最全总结,283页pdf
  44. 【leetcode刷题】24.数组中重复的数字——Java版
  45. 【leetcode刷题】23.对称二叉树——Java版
  46. 【leetcode刷题】22.二叉树的中序遍历——Java版
  47. 【leetcode刷题】21.三数之和——Java版
  48. 【leetcode刷题】20.最长回文子串——Java版
  49. 【leetcode刷题】19.回文链表——Java版
  50. 【leetcode刷题】18.反转链表——Java版
  51. 【leetcode刷题】17.相交链表——Java&python版
  52. 【leetcode刷题】16.环形链表——Java版
  53. 【leetcode刷题】15.汉明距离——Java版
  54. 【leetcode刷题】14.找到所有数组中消失的数字——Java版
  55. 【leetcode刷题】13.比特位计数——Java版
  56. oracle控制用户权限命令
  57. 三年Java开发,继阿里,鲁班二期Java架构师
  58. Oracle必须要启动的服务
  59. 万字长文!深入剖析HashMap,Java基础笔试题大全带答案
  60. 一问Kafka就心慌?我却凭着这份,图灵学院vip课程百度云