linux 目录意思及用途

本文深入解析Linux操作系统中的主要目录及其用途,包括/bin,/sbin,/home,/etc,/lost+found,/var,/usr,/lib,/tmp,/dev,/mnt,/boot,/opt,/proc等。了解每个目录的功能,有助于提高Linux系统的管理和维护效率。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 

Directory NameUse to store this kind of files
/binAll your essential program (executable files) which can be use by most of the user are store here. For e.g. vi, ls program are store here.
/sbinAll super user executable (binaries) files are store which is mostly used by root user . As mentioned in Red Hat Linux documentation: "The executables in /sbin are only used to boot and mount /usr and perform system recovery operations."
/homeYour sweet home. Mostly you work here. All the user have their own subdirectory under this directory.
/etc

Configuration file of your Linux system are here. For e.g. smb.conf - Samba configuration file. It may contained sub directories like xinetd.d or X11 which contains more configuration files related to particular application or program. See therest of subdirectories.

/lost+foundWhen your system crashes, this is the place where you will get your files. For e.g. You have shutdown your computer without unmounting the file system. Next time when your computer starts all your 'fsck' program try to recover you file system, at that time some files may stored here and may be removed from original location so that you can still find those file here. 
/varMostly the file(s) stored in this directory changes their size i.e. variable data files. Data files including spool directories and files, administrative and logging data, and transient and temporary files etc.
/usr

Central location for all your application program, x-windows, man pages, documents etc are here. Programs meant to be used and shared by all of the users on the system. Mostly you need to export this directory using NFS in read-only mode. Some of the important sub-directories are as follows:
bin - sub-directory contains executables
sbin - sub-directory contains files for system administration i.e. binaries
include - sub-contains C header files
share - sub-contains contains files that aren't architecture-specific like documents, wallpaper etc.
X11R6 - sub-contains X Window System

/libAll shared library files are stored here. This libraries are needed to execute the executable files (binary) files in /bin or /sbin.
/tmpTemporary file location
/dev

Special Device files are store here. For e.g. Keyboard, mouse, console, hard-disk, cdrom etc device files are here.

/mntFloppy disk, CD-Rom disk, Other MS-DOS/Windows partition mounted in this location (mount points) i.e. temporarily mounted file systems are here.
/bootLinux Kernel directory
/optUse to store large software applications like star office.
/procThis directory contains special files which interact with kernel. You can gathered most of the system and kernel related information from this directory. To clear your idea try the following commands:
# cat cpuinfo
# cat meminf
# cat mounts
See the System information shell script for more information

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值