linux 的应用都安装到哪里? (Filesystem Hierarchy Standard)

本文详细解释了Linux系统中应用程序的安装位置标准(Filesystem Hierarchy Standard),包括使用RPM软件管理器安装的位置、自行编译安装的位置等,并对比了Windows系统下的安装方式。此外还介绍了硬链接与符号链接的区别。

About Linux File System

linux 的应用都安装到哪里? (Filesystem Hierarchy Standard)

看分区说明 说是 都装在 /USR下了 也有的说是在那里编译就装在哪里 那RPM软件管理器装的装在哪里? 自己下载然后MAKE INSTALL的默认装在哪里?

编译的时候./configure --prefix=/usr这样的参数可以设置目录

程序确实都是在/usr下。这里有个概念和windows不一样。linux下库文件都是共享的,也就是说可执行程序放一起,然后库文件放一起。windows下是一个程序一个目录,库文件无法共享。所以一个程序可能功能不多,但是程序很大。linux下程序可能非常小。不过依赖某种库。这就靠rpm或者apt或者pacman之类的解决了

/bin或者/usr/bin或者/usr/locale/bin下全部都是可执行程序或者脚本,/sbin,/usr/sbin,/usr/locale/sbin下也是可执行程序,不过都是不常用或者需要root权限程序,/lib,/usr/lib,/usr/locale/lib下都是运行库。

/下一级目录都是基本系统。/usr/下一级目录都是用户的程序文件。发行版不同,可能定义有点不一样,某些发行版不需要/usr/locale这个目录,有些需要。你会发现其实/usr和/下目录很象,/usr/locale也和/usr下目录结构很象

如果整个系统都是你自己编译,你甚至可以不要/usr目录,所有程序都放在/bin,/sbin下都是可以的

.rpm程序里面安装到哪里了是看编译打包的时候定义安装到何处就是何处。.deb也是一样的

有具体命令看包安装到何处了,具体man rpm或者man deb

以上: linux的应用都安装到哪里?

refer: Filesystem Hierarchy Standard/ wiki/ 百科

编译安装源码的流程, tulxgmptz 的答案

Linux中的./configure

Linux/Unix环境下的make和makefile详解

linux 是由文件组成的, 各个文件不是独立存在的, 相互之间存在依赖关系

What is the difference between a hard link and a symbolic link?

A hardlink isn't a pointer to a file, it's a directory entry (a file) pointing to the same inode. Even if you change the name of the other file, a hardlink still points to the file. If you replace the other file with a new version (by copying it), a hardlink will not point to the new file. You can only have hardlinks within the same filesystem. With hardlinks you don't have concept of the original files and links, all are equal (think of it as a reference to an object). It's a very low level concept.

On the other hand, a symlink is actually pointing to another path (a file name); it resolves the name of the file each time you access it through the symlink. If you move the file, the symlink will not follow. If you replace the file with another one, keeping the name, the symlink will point to the new file. Symlinks can span filesystems. With symlinks you have very clear distinction between the actual file and symlink, which stores no info beside the path about the file it points to.

refer: what-is-the-difference-between-a-hard-link-and-a-symbolic-link

转载于:https://my.oschina.net/xieyunzi/blog/202498

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值