好学IT学院:IT信息技术分享交流平台
标签:Linux  来源:中国IT实验室  作者:丁丁  发布时间:2010-02-04  ★★★加入收藏〗〖手机版
摘要:对于linux新手来说,最感到迷惑的问题之一就是文件都存在哪里呢?特别是对于那些从windows转过来的新手来说,linux的目录结构看起来有些奇怪哦。所以,在这里讲一下linux下的主要目录以及它们都是用来干什么的。…

/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.

这是临时目录。对于某些程序来说,有些文件被用了一次两次之后,就不会再被用到,像这样的文件就放在这里。有些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.

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

/opt

Here’s where optional stuff is put. Trying out the latest Firefox beta? Install it to /opt where you can delete it without affecting other settings. Programs in here usually live inside a single folder whick contains all of their data, libraries, etc.

这里主要存放那些可选的程序。你想尝试最新的firefox测试版吗?那就装到/opt目录下吧,这样,当你尝试完,想删掉firefox的时候,你就可以直接删除它,而不影响系统其他任何设置。安装到/opt目录下的程序,它所有的数据、库文件等等都是放在同个目录下面。

举个例子:刚才装的测试版firefox,就可以装到/opt/firefox_beta目录下,/opt/firefox_beta目录下面就包含了运行firefox所需要的所有文件、库、数据等等。要删除firefox的时候,你只需删除/opt/firefox_beta目录即可,非常简单。

/usr/local

This is where most manually installed(ie. outside of your package manager) software goes. It has the same structure as /usr. It is a good idea to leave /usr to your package manager and put any custom scripts and things into /usr/local, since nothing important normally lives in /usr/local.

这里主要存放那些手动安装的软件,即不是通过“新立得”或apt-get安装的软件。它和/usr目录具有相类似的目录结构。让软件包管理器来管理/usr目录,而把自定义的脚本(scripts)放到/usr/local目录下面,我想这应该是个不错的主意。

/media

Some distros use this folder to mount things like usb disks, cd or dvd drives and other filesystems.

有些linux的发行版使用这个目录来挂载那些usb接口的移动硬盘(包括U盘)、CD/DVD驱动器等等。

Linux防火墙配置入门必学
  RedHatLinux为增加系统安全性提供了防火墙保护。防火墙存在于你的计算机和网络之间,用来判定网络中的远程用户有权访问你的计算…
  • 好学触屏公众号虎力全开、杨帆起航!
  • 四大名著全套小学生版注音版
  • 诗词中的科学全4册
  • 曹文轩系列儿童文学全套画本