forked from jaywcjlove/linux-command
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
06c16b3
commit fee9124
Showing
80 changed files
with
5,796 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
accept | ||
=== | ||
|
||
指示打印系统接受发往指定目标打印机的打印任务 | ||
|
||
## 补充说明 | ||
|
||
**accept命令** 属于CUPS套件,用于指示打印系统接受发往指定目标打印机的打印任务。 | ||
|
||
### 语法 | ||
|
||
``` | ||
accept(选项)(参数) | ||
``` | ||
|
||
### 选项 | ||
|
||
``` | ||
-E:当连接到服务器时强制加密; | ||
-U:指定连接服务器时使用的用户名; | ||
-h:指定连接服务器名和端口号。 | ||
``` | ||
|
||
### 参数 | ||
|
||
目标:指定目标打印机。 | ||
|
||
|
||
<!-- Linux命令行搜索引擎:https://jaywcjlove.github.io/linux-command/ --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
apt-get | ||
=== | ||
|
||
Debian Linux发行版中的APT软件包管理工具 | ||
|
||
## 补充说明 | ||
|
||
**apt-get命令** 是Debian Linux发行版中的APT软件包管理工具。所有基于Debian的发行都使用这个包管理系统。deb包可以把一个应用的文件包在一起,大体就如同Windows上的安装文件。 | ||
|
||
### 语法 | ||
|
||
``` | ||
apt-get(选项)(参数) | ||
``` | ||
|
||
### 选项 | ||
|
||
``` | ||
-c:指定配置文件。 | ||
``` | ||
|
||
### 参数 | ||
|
||
* 管理指令:对APT软件包的管理操作; | ||
* 软件包:指定要操纵的软件包。 | ||
|
||
### 实例 | ||
|
||
使用apt-get命令的第一步就是引入必需的软件库,Debian的软件库也就是所有Debian软件包的集合,它们存在互联网上的一些公共站点上。把它们的地址加入,apt-get就能搜索到我们想要的软件。/etc/apt/sources.list是存放这些地址列表的配置文件,其格式如下: | ||
|
||
``` | ||
deb web或[ftp地址] [发行版名字] main/contrib/non-[free] | ||
``` | ||
|
||
我们常用的Ubuntu就是一个基于Debian的发行,我们使用apt-get命令获取这个列表,以下是我整理的常用命令: | ||
|
||
在修改`/etc/apt/sources.list`或者`/etc/apt/preferences`之后运行该命令。此外您需要定期运行这一命令以确保您的软件包列表是最新的: | ||
|
||
``` | ||
apt-get update | ||
``` | ||
|
||
安装一个新软件包: | ||
|
||
``` | ||
apt-get install packagename | ||
``` | ||
|
||
卸载一个已安装的软件包(保留配置文件): | ||
|
||
``` | ||
apt-get remove packagename | ||
``` | ||
|
||
卸载一个已安装的软件包(删除配置文件): | ||
|
||
``` | ||
apt-get –purge remove packagename | ||
``` | ||
|
||
会把已装或已卸的软件都备份在硬盘上,所以如果需要空间的话,可以让这个命令来删除你已经删掉的软件: | ||
|
||
``` | ||
apt-get autoclean apt | ||
``` | ||
|
||
这个命令会把安装的软件的备份也删除,不过这样不会影响软件的使用的: | ||
|
||
``` | ||
apt-get clean | ||
``` | ||
|
||
更新所有已安装的软件包: | ||
|
||
``` | ||
apt-get upgrade | ||
``` | ||
|
||
将系统升级到新版本: | ||
|
||
``` | ||
apt-get dist-upgrade | ||
``` | ||
|
||
定期运行这个命令来清除那些已经卸载的软件包的.deb文件。通过这种方式,您可以释放大量的磁盘空间。如果您的需求十分迫切,可以使用`apt-get clean`以释放更多空间。这个命令会将已安装软件包裹的.deb文件一并删除。大多数情况下您不会再用到这些.debs文件,因此如果您为磁盘空间不足 而感到焦头烂额,这个办法也许值得一试: | ||
|
||
``` | ||
apt-get autoclean | ||
``` | ||
|
||
|
||
<!-- Linux命令行搜索引擎:https://jaywcjlove.github.io/linux-command/ --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
apt-key | ||
=== | ||
|
||
管理Debian Linux系统中的软件包密钥 | ||
|
||
## 补充说明 | ||
|
||
**apt-key命令** 用于管理Debian Linux系统中的软件包密钥。每个发布的deb包,都是通过密钥认证的,apt-key用来管理密钥。 | ||
|
||
### 语法 | ||
|
||
``` | ||
apt-key(参数) | ||
``` | ||
|
||
### 参数 | ||
|
||
操作指令:APT密钥操作指令。 | ||
|
||
### 实例 | ||
|
||
``` | ||
apt-key list #列出已保存在系统中key。 | ||
apt-key add keyname #把下载的key添加到本地trusted数据库中。 | ||
apt-key del keyname #从本地trusted数据库删除key。 | ||
apt-key update #更新本地trusted数据库,删除过期没用的key。 | ||
``` | ||
|
||
|
||
<!-- Linux命令行搜索引擎:https://jaywcjlove.github.io/linux-command/ --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
apt-sortpkgs | ||
=== | ||
|
||
Debian Linux下对软件包索引文件进行排序的工具 | ||
|
||
## 补充说明 | ||
|
||
**apt-sortpkgs命令** 是Debian Linux下对软件包索引文件进行排序的简单工具。 | ||
|
||
### 语法 | ||
|
||
``` | ||
apt-sortpkgs(选项)(参数) | ||
``` | ||
|
||
### 选项 | ||
|
||
``` | ||
-s:使用源索引字段排序; | ||
-h:显示帮助信息。 | ||
``` | ||
|
||
### 参数 | ||
|
||
文件:指定要排序的包含debian包信息的索引文件。 | ||
|
||
|
||
<!-- Linux命令行搜索引擎:https://jaywcjlove.github.io/linux-command/ --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
aptitude | ||
=== | ||
|
||
Debian Linux系统中软件包管理工具 | ||
|
||
## 补充说明 | ||
|
||
**aptitude命令** 与apt-get命令一样,都是Debian Linux及其衍生系统中功能极其强大的包管理工具。与apt-get不同的是,aptitude在处理依赖问题上更佳一些。举例来说,aptitude在删除一个包时,会同时删除本身所依赖的包。这样,系统中不会残留无用的包,整个系统更为干净。它通过文本操作菜单和命令两种方式管理软件包。 | ||
|
||
### 语法 | ||
|
||
``` | ||
aptitude(选项)(参数) | ||
``` | ||
|
||
### 选项 | ||
|
||
``` | ||
-h:显示帮助信息; | ||
-d:仅下载软件包,不执行安装操作; | ||
-P:每一步操作都要求确认; | ||
-y:所有问题都回答“yes”; | ||
-v:显示附加信息; | ||
-u:启动时下载新的软件包列表。 | ||
``` | ||
|
||
### 参数 | ||
|
||
操作命令:用户管理软件包的操作命令。 | ||
|
||
### 实例 | ||
|
||
以下是我总结的一些常用aptitude命令,仅供参考: | ||
|
||
``` | ||
aptitude update #更新可用的包列表 | ||
aptitude upgrade #升级可用的包 | ||
aptitude dist-upgrade #将系统升级到新的发行版 | ||
aptitude install pkgname #安装包 | ||
aptitude remove pkgname #删除包 | ||
aptitude purge pkgname #删除包及其配置文件 | ||
aptitude search string #搜索包 | ||
aptitude show pkgname #显示包的详细信息 | ||
aptitude clean #删除下载的包文件 | ||
aptitude autoclean #仅删除过期的包文件 | ||
``` | ||
|
||
当然,你也可以在文本界面模式中使用 aptitude。 | ||
|
||
|
||
<!-- Linux命令行搜索引擎:https://jaywcjlove.github.io/linux-command/ --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.