Linux 的软件安装目录是是有讲究的,理解它对系统管理十分有益。
|目录|作用|
|---|---|
|/usr|系统级的目录,可以理解为C:/Windows/;|
|/usr/lib|理解为C:/Windows/System32|
|/usr/local|用户级的程序目录,可以理解为C:/Progrem Files/。用户自己编译的软件默认会安装到这个目录下。|
|/opt|用户级的程序目录,可以理解为D:/Software,opt有可选的意思,这里可以用于放置第三方大型软件(或游戏),当你不需要时,直接rm -rf掉即可。在硬盘容量不够时,也可将/opt单独挂载到其他磁盘上使用。|
|/usr/src|系统级的源码目录。|
|/usr/local/src|用户级的源码目录。|
/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目录下面,应该是个不错的主意。
- 目录
- W3School
- 工具
- 手册
- 实验
- 慕课
- Linux软件安装管理
- RPM包安装
- yum安装
- Linux系统管理
- ps_mem
- uname
- CentOS版本
- Linux服务管理
- Linux权限管理
- Linux 权限控制的基本原理
- Linux网络管理
- Linux计划任务
- Crontab
- 任务启停
- 综合用例
- 间隔任务
- 一次任务
- 跨天任务
- 输出重定向
- Crontab任务权限
- 多任务
- 表达式
- 视频教程
- 不知疲倦的时间表
- 发送邮件
- nginx
- nginx入门到实践
- Nginx配置Web服务器
- 查看进程
- 配置步骤
- nginx升级
- 脚本升级
- systemctl 命令完全指南
- Linux 软件安装目录
- 查看文件安装路径
- 书籍
- 《Linux Shell脚本攻略》
- 《循序渐进Linux》
- 课程
- Linux典型应用
- 网址
- 通信
- MySQL开启远程连接
- 防火墙
- 安全组规则
- Mailx
- 介绍
- 安装
- 配置
- 发送邮件
- 163_email
- 安全
- Linux中root账号和普通账号有什么区别,root账号为什么不能删除?
- chmod改变文件权限
- SELinux入门