Linux 软件安装到哪里合适,目录详解
2023-09-27 14:25:18 时间
文章来源:
https://blog.csdn.net/qq_22771739/article/details/83933473
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目录下面,我想这应该是个不错的主意。
相关文章
- Linux安装配置类似mac下的docky
- Linux系统中安装软件的几种方式
- 在Linux平台下每5、10或15分钟执行一次定时任务(Cron Job)
- linux安装paddlenlp报错ERROR: Command errored out with exit status 1: python
- Linux上安装软件
- Linux安装Nexus
- web安全day24:一文读懂Linux系统安装软件的几种方法
- Linux Mint(Ubuntu)上 安装 效率神器 utools
- Linux集群和自动化维3.6.1 Fabric的安装
- 怎么在Linux发行版下列出所有安装了的包
- ESXi与Linux主机配置syslog日志上传远程服务器
- CentOS/RHEL Linux安装EPEL第三方软件源
- redhat linux卸载默认的openjdk与安装sun的jdk
- 【Linux】使用 apt-get 查询并安装指定版本的软件
- 【Linux】查看软件(或文件)安装(或下载)的位置
- Kali Linux安装谷歌输入法
- Linux命令之dd
- Linux下编译安装python3
- Linux校准时间,硬件时间校准和系统时间校准
- [LINUX]ContOS7最小化安装之后出现的cmdNOTFound所需要安装的软件
- Linux-018-Centos Shell 判断软件是否已经安装
- Win或Linux中编译安装软件的命令解析: configure; make; make install
- 【Docker】Linux下Docker安装使用与Docker-compose的安装
- Linux下Nginx+Tomcat整合的安装与配置
- Linux负载均衡软件LVS之二(安装篇)[转]
- Linux学习笔记(13)linux软件安装rpm与yum--理论篇
- Linux下memcache的安装和启动(转)
- 【转载:】 查看linux下安装了哪些软件(rpm)和 rpm 常用命令
- linux 安装 MySQL5.7.19(Your password does not satisfy the current policy requirements 或 using ALTER )
- Linux CentOS 安装 VMware Tools
- Linux安装jdk的详细步骤
- Linux环境Mysql安装步骤