linux个目录的作用是什么意思,Linux系统各个目录的作用详解

对于linux菜鸟来说,最感到迷惑的疑问之一就是文件都存在哪里呢?特别是对于那些从windows转过来的菜鸟来说,linux的目录结构看起来有些奇怪哦。所以,在这里讲一下linux下的首要目录以及它们都是用来干什么的。

/

This is the root directory. The mothership. The home field. The one and only top directory for your whole computer. Everything, and I mean EVERYTHING starts here. When you type ‘/home’ what you’re really saying is “start at / and then go to the home directory.”

/

这就是根目录。对你的计算机来说,有且只有一个根目录。所有的东西,我是说所有的东西都是从这里开始。举个例子:当你在终端里输入“/home”,你其实是在告诉计算机,先从/(根目录)开始,再进入到home目录。

/root

This is where the root user lives. The root user is the god of your system. Root can do anything, up to and including removing your entire filesystem. So be careful using root.

/root

这是系统维护员(root user)的目录。对于系统来说,系统维护员就好比是上帝,它能对系统做任何事情,甚至包括删除你的文件。因此,请注意运用 root帐号。

/bin

Here’s where your standard linux utilities(read programs) live — things like “ls” and “vi” and “more”. Generally this directory is included in your path. What this means is that if you type ‘ls’, /bin is one of the places your shell will look to see if ‘ls’ means anything.

/bin

这里存放了准则 的(或者说是缺省的)linux的工具,比如像“ls”、“vi”还有“more”等等。通常来说,这个目录已经包含在你的“path”系统变量里面了。什么意思呢?就是:当你在终端里输入ls,系统就会去/bin目录下面查找是不是有ls这个程序。

/etc

Here’s where the administrative and system configuration stuff lives. For instance, if you have samba installed, and you want to modify the samba configuration files, you’d find them in /etc/samba.

/etc

这里首要存放了系统配置方面的文件。举个例子:你安装了samba这个套件,当你想要修改samba配置文件的时候,你会发觉它们(配置文件)就在/etc/samba目录下。

/dev

Here’s where files that control peripherals live. Talking to a printer? Your computer is doing it from here. Same goes for disk drives, usb devices, and other such stuff.

/dev

这里首要存放与装备 (包括外设)相关的文件(unix和linux系统均把装备当成文件)。想连线打印机吗?系统就是从这个目录开始工作的。另外还有一些包括硬盘驱动、USB驱动等都放在这个目录。

/home

Here’s where your data is stored. Config files specific to users, your Desktop folder(whick makes your desktop what it is), and any data related to your user. Each user will have their own /home/username folder, with the exception of the root user.

/home

这里首要存放你的私人数据。细致 每个用户的配置文件,用户的桌面文件夹,还有用户的数据都放在这里。每个用户都有自己的用户目录,位置为:/home/用户名。当然,root用户除外。

/tmp

This is the Temporary folder. Think of it as a scratch directory for your Linux system. Files that won’t be needed by programs once their used once or twice are put here. Many Linux systems are set to automatically wipe the /tmp folder at certain intervals, so don’t put things you want to Keep here.

/tmp

这是临时目录。对于某些程序来说,有些文件被用了一次两次之后,就不会再被用到,像这样的文件就放在这里。有些linux系统会定期自动对这个目录执行 清理,因此,千万不要把首要 的数据放在这里。

/usr

Here’s where you’ll find extra utilities that don’t fit under /bin or /etc. Things like games, printer utilities, and whatnot. /usr is divided into sections like /usr/bin for programs, /usr/share for shared data like sound files or icons, /usr/lib for libraries whick cannot be directly run but are essential for running other programs.Your package manager takes care of the things in /usr for you.

/usr

在这个目录下,你可以找到那些不适合放在/bin或/etc目录下的额外的工具。比如像游戏阿,一些打印工具拉等等。/usr目录包含了许多子目录:/usr/bin目录用于存放程序;/usr/share用于存放一些共享的数据,比如音乐文件或者图标等等;/usr/lib目录用于存放那些无法直接运行的,但却是许多程序运行所必需的一些函数库文件。你的软件包维护器(应该是“新立得”吧)会自动帮你维护好/usr目录的。

&nbsp

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值