Linux(centos)系统各个目录的作用详解

来源:网络 责任编辑:栏目编辑 发表时间:2013-07-01 06:38 点击:

文件系统的类型

LINUX有四种基本文件系统类型:普通文件、目录文件、连接文件和特殊文件,可用file命令来识别。

普通文件:如文本文件、C语言元代码、SHELL脚本、二进制的可执行文件等,可用cat、less、more、vi、emacs来察看内容,用mv来改名。

目录文件:包括文件名、子目录名及其指针。它是LINUX储存文件名的唯一地方,可用ls列出目录文件。

连接文件:是指向同一索引节点的那些目录条目。用ls来查看是,连接文件的标志用l开头,而文件面后以"->"指向所连接的文件。

特殊文件:LINUX的一些设备如磁盘、终端、打印机等都在文件系统中表示出来,则一类文件就是特殊文件,常放在/dev目录内。例如,软驱A称为/dev/fd0。LINUX无C:的概念,而是用/dev/had来自第一硬盘。

 


   对于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

    这里主要存放你的个人数据。具体每个用户的设置文件,用户的桌面文

    发表评论
    请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
    用户名: 验证码:点击我更换图片
    最新评论 更多>>

    推荐热点

    • /etc/fstab 详解
    • nginx主主集群
    •  LVS-NAT和LVS-DR模式的实现详解
    •  RHCE考试之磁盘配额
    • 学习笔记:ACL详解
    • suse linux双网卡双网关配置
    •  LVM逻辑卷管理器
    •  Nginx主主负载均衡架构
    • ubuntu学习Mysql

    快速直达

    操作系统导航

    LinuxWindows虚拟机
    网站首页 - 友情链接 - 网站地图 - TAG标签 - RSS订阅 - 内容搜索
    Copyright © 2008-2015 计算机技术学习交流网. 版权所有

    豫ICP备11007008号-1