「bc」
安装的可执行程序
bc,is a command line calculator
dc,is a reverse-polish command line calculator
参考文献
Homepage: http://ftp.gnu.org/gnu/bc
章节列表
「bc」-[……]
「e2fsprogs」
E2fsprogs,包含了用于处理EXT2文件系统的程序。同时也支持EXT3和EXT4类型的文件系统。
安装
从发行版的源中安装
#!/bin/bash
# Ubuntu 16.04.2 LTS
apt-get install e2fsprogs
从源码中编译安装 参考LFS/E2fsprogs-1.43.1: http://www.linuxfromscratch.org/lfs/view/7.10/chapter06/e2fsprogs.html
安装的可执行程序文件
badblocks Searches a device (usually a disk partition) for bad blocks
chattr Changes the attributes of files on an ext2 file system; it also changes ext3 file systems, the journaling version of ext2 file systems
compile_et An error table compiler; it converts a table of error-code names and messages into a C source file suitable for use with the com_err library
debugfs,A file system debugger; it can be used to examine and change the state of an ext2 file system
dumpe2fs Prints the super block and blocks group information for the file system present on a given device
e2freefrag Reports free space fragmentation information
e2fsck Is used to check, and optionally repair ext2 file systems and ext3 file systems
e2image Is used to save critical ext2 file system data to a file
e2label 显示或更改给定设备上存在的ext2/ext3/ext4文件系统上的文件系统的标签。
e2undo Replays the undo log undo_log for an ext2/ext3/ext4 filesys[……]
「inetutils」
Inetutils,包含了基本的网络程序。
安装
#!/bin/bash
./configure –prefix=/usr \
–localstatedir=/var \
–disable-logger \
–disable-whois \
–disable-rcp \
–disable-rexec \
–disable-rlogin \
–disable-rsh \
–disable-servers
make
make install
包含的命令列表
dnsdomainname,Show the system’s DNS domain name ftp,ftp客户端程序。
hostname 用户报告和设置hostname。
ifconfig 管理网络接口接口。
ping Sends echo-request packets and reports how long the replies take
ping6 A version of ping for IPv6 networks
talk 用于和其他用户聊天。
telnet,TELNET协议接口。
tftp 一个简单的文件传输程序。
traceroute 用于追踪数据包到另一台主机所经过的网关。
参考文献
LFS/6.39. Inetutils-1.9.4
Inetutils Homepage
Inetutils Online Manual[……]
「lftp」
「sendmail」
editmap queries and edits sendmail map files.
hoststat prints sendmail’s persistent host status.
mailstats displays sendmail statistics.
mailq prints a summary of outbound mail messages waiting for delivery.
makemap creates sendmail map files.
newaliases rebuilds /etc/mail/aliases.db from the contents of /etc/mail/aliases.
praliases displays current sendmail aliases.
purgestat causes sendmail to clear (purge) all its host-status information.
sendmail is the sendmail mail transport agent.
smrsh is a restricted shell for sendmail.
vacation is an email auto responder.
参考文献
http://www.sendmail.org[……]
「zip」
安装的可执行程序
zip compresses files into a ZIP archive.
zipcloak is a utility to encrypt and decrypt a ZIP archive.
zipnote reads or writes comments stored in a ZIP file.
zipsplit is a utility to split ZIP files into smaller files.
参考文献
BLFS/Zip-3.0[……]
「less」
包含的可执行程序
less A file viewer or pager; it displays the contents of the given file, letting the user scroll, find strings, and jump to marks
lessecho, Needed to expand meta-characters, such as * and ?, in filenames on Unix systems
lesskey, Used to specify the key bindings for less
章节列表
「less」-[……]
「kbd」
KBD,一个软件包,包含用于管理Linux控制台、更换字体、调整文本模式虚拟控制台、键盘映射。
注意,这里的字体与X Window中的字体不是同一个概念。
命令列表
chvt:Changes the foreground virtual terminal
deallocvt:Deallocates unused virtual terminals
dumpkeys:Dumps the keyboard translation tables
fgconsole:Prints the number of the active virtual terminal
getkeycodes:Prints the kernel scancode-to-keycode mapping table
kbdinfo:Obtains information about the status of a console
kbd_mode:Reports or sets the keyboard mode
kbdrate:Sets the keyboard repeat and delay rates
loadkeys:加载键盘转换表(keyboard translation tables)
loadunimap:Loads the kernel unicode-to-font mapping table
mapscrn:An obsolete program that used to load a user-defined output character mapping table into the console driver; this is now done by setfont
openvt:Starts a program on a new virtual terminal (VT)
psfaddtable:Adds a Unicode character table to a console font
psfgettable:Extracts the embedded Unicode character table from a console font
psfstriptable:Removes the embedded Unicode character table from a console font
psfxtable:Handles Unicode character tables for console fonts
setkeycodes:Loads kernel scancode-to-keycode map[……]
「setfont」
setfont,加载EGA/VGA控制台屏幕字体。
命令行语法格式
setfont [-O font+umap.orig]
[-o font.orig]
[-om cmap.orig]
[-ou umap.orig]
[-N] [font.new …]
[-m cmap]
[-u umap]
[-C console]
[-hH]
[-v]
[-V]
命令简述(DESCRIPTION)
setfont从文件font.new读取字体并将其加载到EGA/VGA字符生成器中,并可选择输出以前的字体。它还可以加载各种映射表,并输出以前的版本。
如果没有给出任何参数(或者只有一个指定了数值的-N选项),则加载默认的(8xN)字体(见下文)。 一个可能会提供几个小字体,全部的会包含一个Unicode表,而setfont将会结合它们,并加载联合后的。
下面是一些典型的使用方法:
setfont 加载默认字体。
setfont drdos8x16 加载给定字体。这里是448-glyph drdos字体。
setfont cybercafe -u cybercafe 加载一个没有Unicode映射的字体,并明确指定一个。
setfont LatArCyrHeb-19 -m 8859-2 加载一个给定的字体(这里是结合了几个字符集的512-glyph字体),并指出一个的本地字符集是ISO 8859-2。
注意:如果字体超过256个字形,则只可以同时使用16种颜色中的8种。它可以使控制台感觉更糟(强度损失,甚至一些颜色)。
字体格式(FONT FORMATS)
标准的Linux字体格式是PSF字体。它具有描述字体属性(如字符大小)的头部,后跟「字形位图(glyph bitmap)」,后跟一个可选的Unicode映射表,给出每个字形的Unicode值。识别了其他几种(过时)字体的格式。如果输入文件具有代码页格式(可能是后缀.cp),其中包含三个字体大小,例如。 8×8,8×14和8×16,则必须使用选项-8或-14或-16之一来选择一个。原始字体文件是大小256 * N字节的二进制文件,包含256个字符,每个扫描行一个字节和每个字符N个字节(0 <N <= 32)的位图。大多数字体的宽度为8位,但是使用帧缓冲设备(fb)可以使用其他宽度。
If the input file has code page for‐ mat (probably with suffix .cp), containing three fonts with sizes e.g. 8×8, 8×14 an[……]
「showconsolefont」
showconsolefont,显示当前的EGA/VGA控制台屏幕字体。
命令行语法格式
showconsolefont [ -V ] [ -v ] [ -C console ]
命令支持的选项及含义
-v 显示附加的信息。
-C 在Linux 2.6.1及更高版本上,选项-C允许指定控制台。它的参数是一个路径名。
-V 显示版本号。
相关文档
setfont(8)
有关控制台字体的内容,参考:Console Fonts
参考文献
man 8 showconsolefont, version showconsolefont from kbd 2.0.3
https://unix.stackexchange.com/questions/321784/why-does-showconsolefont-have-different-output-in-tmux/321979[……]
「acl」
安装的可执行程序
chacl Changes the access control list of a file or directory
getfacl Gets file access control lists
setfacl Sets file access control lists
参考文献
LFS/6.22. Acl-2.2.52
访问ACL主页[……]
「chacl」-
修改文件或者目录的访问控制列表
命令语法格式
chacl acl pathname… chacl -b acl dacl pathname… chacl -d dacl pathname… chacl -R pathname… chacl -D pathname… chacl -l pathname… chacl -B pathname… chacl -r pathname…
命令描述
chacl is an IRIX-compatibility command, and is maintained for those users who are familiar with its use from either XFS or IRIX.
Refer to the SEE ALSO section below for a description of tools which conform more closely to the (withdrawn draft) POSIX 1003.1e stan‐
dard which describes Access Control Lists (ACLs).
chacl changes the ACL(s) for a file or directory. The ACL(s) specified are applied to each file in the pathname arguments.
Each ACL is a string which is interpreted using the acl_from_text(3) routine. These strings are made up of comma separated clauses
each of which is of the form, tag:name:perm. Where tag can be:
“user” (or “u”)
indicating that the entry is a user ACL entry.
“group” (or “g”)
indicating that the entry is a group ACL entry.
“other” (or “o”)
indicating that the entry is an other ACL entry.
“mask” (or[……]
「getfacl」-
获取文件的访问控制列表(ACL)
命令语法格式
getfacl [-aceEsRLPtpndvh] file …
getfacl [-aceEsRLPtpndvh] –
命令描述
For each file, getfacl displays the file name, owner, the group, and the Access Control List (ACL). If a directory has a default ACL,
getfacl also displays the default ACL. Non-directories cannot have default ACLs.
If getfacl is used on a file system that does not support ACLs, getfacl displays the access permissions defined by the traditional
file mode permission bits.
The output format of getfacl is as follows:
1: # file: somedir/
2: # owner: lisa
3: # group: staff
4: # flags: -s-
5: user::rwx
6: user:joe:rwx #effective:r-x
7: group::rwx #effective:r-x
8: group:cool:r-x
9: mask::r-x
10: other::r-x
11: default:user::rwx
12: default:user:joe:rwx #effective:r-x
13: default:group::r-x
14: default:mask::r-x
15: default:other::—
Lines 1–3 indicate the file name, owner, and owning group.
Line 4 indicates the setuid (s), setgid (s), and sticky (t) bits: either the letter representing the bit, or else a dash (-). This
line[……]
「setfacl(1)」-
设置文件的访问控制列表(ACL)
命令语法格式
setfacl [-bkndRLPvh] [{-m|-x} acl_spec] file …
setfacl [-bkndRLPvh] [{-M|-X} acl_file] file …
setfacl –restore=file
命令描述
命令setfacl设置文件和目录的“访问控制列表(ACL)”。在命令行上,一系列命令后面跟着一系列文件(后面可以跟着另一个命令序列,……)。
选项–set(–set-file)设置文件或目录的ACL。替换之前的ACL。此操作的ACL条目必须包含权限。
选项-m(–modify)和-M(–modify-file)修改文件或目录的ACL。此操作的ACL条目必须包含权限。
选项-x(–remove)和-X(–remove文件)删除ACL条目。删除不存在的条目不会产生错误。除非定义了POSIXLY_CORRECT,否则只接受没有perms字段的ACL条目作为参数。
选项-m和-x期望在命令行上使用ACL。多个ACL条目由逗号(,)分隔。选项-M和-X从文件或标准输入读取ACL。在「ACL ENTRIES」部分中描述ACL条目格式。
使用选项-M和-X从文件读取时,命令setfacl接受getfacl生成的输出。每行最多有一个ACL条目。在“#”之后,直到行尾的所有内容都被视为注释。
如果在不支持ACL的文件系统上使用setfacl,则setfacl将对文件模式权限位进行操作。如果ACL不完全适合权限位,则setfacl会修改文件模式权限位以尽可能地反映ACL,将错误消息写入标准错误,并返回退出状态大于0。
关于权限
在具有CAP_FOWNER功能的进程和文件所有者会被授予修改文件ACL的权限。这类似于访问文件模式所需的权限。 (在当前的Linux系统上,root是唯一具有CAP_FOWNER功能的用户。)
命令支持的选项及含义
-b, –remove-all 删除所有扩展ACL条目。 保留所有者、组、其他的基本ACL条目。
-k, –remove-default 删除默认ACL。 如果不存在默认ACL,则不会发出警告。
-n, –no-mask 不要重新计算有效权限掩码。 setfacl的默认行为是重新计算ACL掩码条目,除非明确给出了掩码条目。 掩码条目被设置为拥有组的所有权限以及所有已命名的用户和组条目的并集。 (这些正是受掩码条目影响的条目)。
–mask 即使明确指定了ACL掩码条目,也要重新计算有效权限掩码。 (请参阅-n选项。)
-d, –default 所有操作都适用于默认ACL。 输入[……]
「deluser」-
功能简述
deluser, delgroup – remove a user or group from the system
常用命令
将用户从组中移除:
deluser user group
语法格式
deluser [options] [–force] [–remove-home] [–remove-all-files] [–backup] [–backup-to DIR] user
deluser –group [options] group
delgroup [options] [–only-if-empty] group
deluser [options] user group
COMMON OPTIONS
[–quiet] [–system] [–help] [–version] [–conf FILE]
命令描述
deluser and delgroup remove users and groups from the system according to command line options and configuration information in /etc/deluser.conf and /etc/adduser.conf. They are friendlier front ends to the userdel and groupdel programs, removing the home directory as option or even all files on the system owned by the user to be removed, running a custom script, and other features. deluser and delgroup can be run in one of three modes:
Remove a normal user
If called with one non-option argument and without the –group option, deluser will remove a normal user.
By default, deluser will remove the user without removing the home directory, the mail spool or any other files on the system owned by the user. Removing the home directo[……]
「apt-file」
apt-file,该软件包包含了一系列的命令,用于在Debian软件包中某个的文件。
软件包简述
search for files within Debian packages apt-file is a command line tool for searching files contained in packages for the APT packaging system. You can search in which package a file is included or list the contents of a package without installing or fetching it.
软件包文件列表
/etc/apt/apt-file.conf /etc/bash_completion.d/apt-file
/usr/bin/apt-file
/usr/bin/diffindex-download /usr/bin/diffindex-rred
/usr/share/apt-file/apt-file-update.update-notifier /usr/share/apt-file/do-apt-file-update /usr/share/apt-file/is-cache-empty
/usr/share/doc/apt-file/README /usr/share/doc/apt-file/changelog.gz /usr/share/doc/apt-file/copyright
/usr/share/man/man1/apt-file.1.gz /usr/share/man/man1/diffindex-download.1.gz /usr/share/man/man1/diffindex-rred.1.gz
参考文献
apt-file list apt-file
apt-cache show apt-file[……]
「apt-utils」
「apt-sortpkgs(1)」-
排序包索引文件
命令语法格式
apt-sortpkgs [-s] [-o=config_string] [-c=config_file] filename…
命令描述
命令apt-sortpkgs将获取索引文件(源索引或包索引)并对记录进行排序,以便按包名对它们进行排序。 它还将根据内部排序规则对每个记录的内部字段进行排序。
所有输出都发送到标准输出;输入必须是可搜索文件。
命令支持的选项及含义
可以使用配置文件设置所有命令行选项,描述指示要设置的配置选项。对于布尔选项,您可以使用-f-,–no-f,-f=no或其他几种变体来覆盖配置文件。
-s, –source 使用源索引字段排序。配置项:APT::SortPkgs::Source
-c, –config-file 配置文件;指定要使用的配置文件。 程序将读取默认配置文件,然后读取此配置文件。 如果需要在解析默认配置文件之前设置配置设置,请使用APT_CONFIG环境变量指定文件。有关语法信息,请参阅apt.conf(5)手册。
-o, –option 设置配置选项;这将设置任意配置选项。 语法是-o Foo::Bar=bar。选项-o和–option可以多次使用来设置不同配置项。
-h, –help 显示简短的帮助信息。
-v, –version 显示版本信息。
退出状态
0 正常操作
100 发生错误
相关手册
apt.conf(5)
参考文献
man 1 apt-sortpkgs, Version 1.7.0
更新日志
10/24/2018 创建文章[……]
「apt」
APT,Debain中默认的软件管理器。
相关的配置文件(/etc)
/etc/apt/apt.conf.d/01-vendor-ubuntu /etc/apt/apt.conf.d/01autoremove /etc/cron.daily/apt-compat /etc/kernel/postinst.d/apt-auto-removal /etc/logrotate.d/apt
相关的命令(/usr/bin)
apt 高级的命令行界面的软件包管理系统。用于管理系统的软件包。
apt-cache
apt-cdrom
apt-config
apt-get
apt-key
apt-mark
参考文献
debian升级命令aptitude和apt-get
Wikipedia / APT
Homepage: https://wiki.debian.org/Apt
APT TEAM: https://wiki.debian.org/Teams/Apt[……]
「apt(8)」-
APT的命令接口
命令语法格式
apt [ OPTIONS ] COMMAND
OPTIONS: [-h] [-o=config_string] [-c=config_file] [-t=target_release] [-a=architecture]
COMMAND: {list | search | show | update | install pkg [{=pkg_version_number | /target_release}]… | remove pkg… | upgrade | full-upgrade | edit-sources }
命令描述
命令apt为包管理系统提供了一个高级命令行界面。它旨在作为最终用户界面,并且与更专业的APT工具(如apt-get(8)和apt-cache(8))相比,默认情况下启用一些更适合于交互式使用的选项。
就像apt本身一样,该手册页旨在作为最终用户界面,因此只提到最常用的命令和选项,部分是为了不在多个地方复制信息,部分是为了避免使用过多的选项和细节压倒读者。
命令行命令
update (apt-get(8)) 用于从所有已配置的源中下载包信息。其他命令对该数据进行操作,例如, 执行包升级、搜索、显示有关可用于安装的所有包的详细信息。
upgrade (apt-get(8)) 用于从通过sources.list(5)配置的源中安装当前安装在系统上的所有软件包的可用升级。如果需要满足依赖关系,将安装新包,但永远不会删除现有包。 如果程序包的升级需要删除已安装的程序包,则不会执行此程序包的升级。
full-upgrade (apt-get(8)) 执行类似于update的功能,但如果需要升级整个系统,则会删除当前安装的软件包。
install, remove, purge (apt-get(8)) 通过regex(7)、glob(7)、完全匹配,对指定的一个或多个包执行请求的操作。请求的操作可以被覆盖,通过在程序包名称后面添加加号(+)来安装此程序包,或者使用减号(-)删除。
通过包名后跟等号(=),再后跟版本号的形式,来选择特定版本的包进行安装。或者,可以通过使用包名后跟正斜杠(/)和代号(stretch,buster,sid …)或套件名称(stable, testing, unstable)来选择特定发布的版本。如果需要满足请求,这还将从此版本中选择此包的依赖项的版本。
删除包会删除所有打包的数据,但通常会留下小的(修改的)用户配置文件,以防删除是意外。在这种情况下,只是发出意外删除的包的安装请求将恢复其功能。另一方面,即使已经删除的包,也可以通过调用purge来清除这些剩余物。请注意,这不[……]
「apt-cache(8)」-
查询APT缓存
命令语法格式
apt-cache [-agipns] [-o=config_string] [-c=config_file] {gencaches | showpkg pkg… | showsrc pkg… | stats | dump | dumpavail | unmet | search regex… | show pkg [{=pkg_version_number | /target_release}]… | depends pkg [{=pkg_version_number | /target_release}]… | rdepends pkg [{=pkg_version_number | /target_release}]… | pkgnames [prefix] | dotty pkg [{=pkg_version_number | /target_release}]… | xvcg pkg [{=pkg_version_number | /target_release}]… | policy [pkg…] | madison pkg… }
命令描述
命令apt-cache在APT的包缓存上执行各种操作。命令apt-cache不会操纵系统的状态,但会提供的操作会从包元数据中搜索和生成有趣输出。例如通过“apt-get update”命令获取和更新元数据。如果最后一次更新太久,它可能会过时,但作为交换,apt-cache的工作独立于配置的源的可用性(例如,离线)。
命令行命令
除非给出-h或–help选项,否则必须存在以下命令之一。
搜索包名
search regex… 在所有可用包列表上,使用给定的POSIX正则表达式模式的执行全文搜索,请参阅regex(7)。它在包名、描述中搜索正则表达式的出现,并打印出包名称和简短描述,包括虚拟包名称。
如果给出–full选项,则为每个匹配的包生成与show相同的输出。如果给出–names-only选项,则不搜索长描述,只搜索包名和提供的包。
可以使用单独的参数来指定多个搜索模式,多个搜索模式以“and”的方式进行连接。
pkgnames [prefix] 此命令打印APT知道的每个包的名称。可选参数是用于过滤名称列表的前缀匹配。输出适用于Shell的Tab补全功能,输出生成非常快。此命令最好与–generate选项一起使用。
注意,APT知道的包不一定可以下载、安装、已安装,例如,虚拟包也列在生成的列表中。
包信息
show pkg… 执行类似于dpkg –print-avail的功能;它显示命名包的包记录。
showpkg pkg[……]
「apt-cdrom(8)」-
APT CD-ROM管理程序
命令语法格式
apt-cdrom [-rmfan] [-d=cdrom_mount_point] [-o=config_string] [-c=config_file] {add | ident}
命令描述
命令apt-cdrom用于将新CD-ROM添加到APT的可用源列表中。命令apt-cdrom负责确定光盘的结构以及纠正几种可能的误烧,并验证索引文件。
有必要使用apt-cdrom将CD添加到APT系统;它不能手工完成。 此外,必须单独插入和扫描多CD装置中的每个光盘,以解决可能的误烧问题。
命令行命令
除非给出-h或–help选项,否则必须存在以下命令之一。
add 用于将新光盘添加到源列表。它将卸载CD-ROM设备,提示插入光盘,然后继续扫描并复制索引文件。 如果光盘没有正确的.disk目录,系统将提示您输入描述性标题。
APT使用CD-ROM ID跟踪驱动器中当前的光盘,并在/var/lib/apt/cdroms.list中维护这些ID的数据库
ident 一种调试工具,用于报告当前光盘的标识以及存储的文件名。
命令支持的选项及含义
可以使用配置文件设置所有命令行选项,描述指示要设置的配置选项。对于布尔选项,您可以使用-f-,–no-f,-f=no或其他几种变体来覆盖配置文件。
–no-auto-detect, –cdrom 不要尝试自动检测CD-ROM路径。 通常与–cdrom选项结合使用。 配置项:Acquire::cdrom::AutoDetect
-d, –cdrom 挂点;指定安装CD-ROM的位置。 此挂载点必须在/etc/fstab中列出并正确配置。 配置项:Acquire::cdrom::mount
-r, –rename 重命名光盘;更改光盘的标签或覆盖光盘的给定标签。 此选项将导致apt-cdrom提示输入新标签。 配置项:APT::CDROM::Rename
-m, –no-mount 不挂载;阻止apt-cdrom挂载和卸载挂载点。 配置项:APT::CDROM::NoMount
-f, –fast 快速复制;假设包文件有效,不检查每个包。 仅当此光盘上已运行apt-cdrom且未检测到任何错误时,才应使用此选项。 配置项:APT::CDROM::Fast
-a, –thorough 彻底的包装扫描; 一些旧的Debian 1.1/1.2光盘在奇怪的地方有Package文件可能需要这个选项。 扫描CD需要花费更长的时间,但会将它们全部拾取。
-n, –just-print, –recon, –no-act 没有变化;不要更改source[……]
「apt-config(8)」-
APT配置查询程序
命令语法格式
apt-config [–empty] [–format ‘%f “%v”;%n’] [-o=config_string] [-c=config_file] {shell | dump | {-v | –version} | {-h | –help}}
命令描述
命令apt-config是一个内部程序,由APT套件各部分使用,用于提供一致的可配置性。它访问主配置/etc/apt/apt.conf,以易于用于脚本应用程序的方式。
命令行命令
除非给出-h或–help选项,否则必须存在以下命令之一。
shell 用于从shell脚本访问配置信息。它给出了一对参数,第一个是Shell变量,第二个是要查询的配置值。作为输出,它为每个存在的值列出了的Shell赋值命令。 在Shell脚本中,它应该如下使用:
OPTS=”-f”
RES=`apt-config shell OPTS MyApp::options`
eval $RES
这会将Shell环境变量$OPTS设置为MyApp::options的值,默认值为-f。
配置项可以后缀为/[fdbi]。f返回文件名,d返回目录,b返回true或false,i返回一个整数。 每个返回都在内部进行标准化和验证。
dump 只显示配置空间的内容。
命令行选项
可以使用配置文件设置所有命令行选项,描述指示要设置的配置选项。对于布尔选项,您可以使用-f-,–no-f,-f=no或其他几种变体来覆盖配置文件。
–empty 包含具有空值的选项。 这是默认值,因此使用–no-empty将其从输出中删除。
–format ‘%f “%v”;%n’ 定义每个配置选项的输出。%t将替换为其独自名称,%f为其完整层级名称,%v及其值。使用大写字母和值中的特殊字符将被编码,以确保它可以安全地使用RFC822定义的带引号的字符串。 此外,%n将替换为换行符,%N将替换为制表符。可以使用%%打印%。
-c, –config-file 配置文件;指定要使用的配置文件。 程序将读取默认配置文件,然后读取此配置文件。 如果需要在解析默认配置文件之前设置配置设置,请使用APT_CONFIG环境变量指定文件。有关语法信息,请参阅apt.conf(5)。
-o, –option 设置配置选项;这将设置任意配置选项。 语法是-o Foo::Bar=bar。选项-o和–option可以多次使用来设置不同配置项。
-h, –help 显示简短的帮助信息。
-v, –version 显示版本信息。
退出状态
0 正常操作[……]
「apt-get」-
apt-get – APT package handling utility — command-line interface
命令语法格式
apt-get [-asqdyfmubV] [-o=config_string] [-c=config_file] [-t=target_release] [-a=architecture] {update | upgrade | dselect-upgrade | dist-upgrade | install pkg [{=pkg_version_number | /target_release}]… | remove pkg… | purge pkg… | source pkg [{=pkg_version_number | /target_release}]… | build-dep pkg [{=pkg_version_number | /target_release}]… | download pkg [{=pkg_version_number | /target_release}]… | check | clean | autoclean | autoremove | {-v | –version} | {-h | –help}}
命令描述
apt-get is the command-line tool for handling packages, and may be considered the user’s “back-end” to other tools using the APT library. Several “front-end” interfaces exist, such as aptitude(8), synaptic(8) and wajig(1).
Unless the -h, or –help option is given, one of the commands below must be present.
update
update is used to resynchronize the package index files from their sources. The indexes of available packages are fetched from the location(s) specified in /etc/apt/sources.list. For example, when using a Debian archive, this command retrieves and sc[……]
「apt-key(8)」-
APT密钥管理程序
命令语法格式
apt-key [–keyring filename] { add filename | del keyid | export keyid | exportall | list | finger | adv | update | net-update }
命令描述
命令apt-key用于管理密钥列表,apt使用这些密钥来验证包。 使用这些密钥进行身份验证的软件包将被视为可信任。
请注意,如果需要使用apt-key,则需要额外安装GNU Privacy Guard套件(打包在gnupg中)。 仅仅因为这个原因,强烈建议不要使用程序化的用法(特别是在包维护者脚本中!)。 此外,所有命令的输出格式都是未定义的,并且只要底层命令发生变化,它就会发生变化。 在这些情况下,apt-key将尝试检测此类使用并在stderr上生成警告。
命令支持的选项及含义
请注意,选项需要在“命令”之前定义。这里的“命令”指的是下一节中描述的命令。
–keyring filename 使用此选项,可以指定命令应该操作的特定密钥环文件。 默认情况下,在trusted.gpg文件以及trusted.gpg.d目录中的所有部分上执行命令,尽管trusted.gpg是主要密钥环,这意味着例如 新密钥被添加到这个。
命令行命令
list, finger 列出带有指纹的可信密钥。
add filename 将新密钥添加到可信密钥列表中。 密钥是从参数filename给出的文件名中读取的,或者如果文件名是“-”来自标准输入。
至关重要的是,通过apt-key手动添加的密钥被验证属于他们声称的存储库的所有者,否则apt-secure(8)基础结构将被完全破坏。
注意:密钥环不应使用此命令,而应直接放在/etc/apt/trusted.gpg.d/目录中,并带有描述性名称,并以“gpg”或“asc”作为文件扩展名。
del keyid 从信任的密钥列表中删除信任的密钥。
参数keyid是gpg密钥指纹的最后8个字符,即pub下的长十六进制代码。
export keyid 将密钥keyid输出到标准输出。
exportall 将所有可信密钥输出到标准输出。
adv 将高级选项传递给gpg。例如,使用adv –recv-key,你可以从密钥服务器直接下载密钥到可信密钥集中。 请注意,没有执行检查,因此如果不小心使用,很容易完全破坏apt-secure(8)基础结构。
update (deprecated) 使用存档密钥环更新本地密钥环,并从本地密钥环中删除不再有效的存档密钥。 存档密钥环包含在您的发行版的archive-keyring包[……]
「apt-mark(8)」-
显示、设置、取消设置软件包的各种设置
命令语法格式
apt-mark {-f=filename | {auto | manual} pkg… | {showauto | showmanual} [pkg…] }
apt-mark {hold | unhold | install | remove | purge} pkg… | {showhold | showinstall | showremove | showpurge} [pkg…]
命令描述
命令apt-mark可以用作统一的前端,来设置一个软件包的各种设置。例如将包标记为自动/手动安装,或更改dpkg选项,例如hold,install,deinstall,purge,这些受到apt-get dselect-upgrade或aptitude的遵循。
命令行命令
自动和手动安装的包装
当您请求安装软件包,并因此安装其他软件包以满足其依赖关系时,依赖项将标记为自动安装,而显式安装的软件包将标记为手动安装。 一旦自动安装的软件包不再依赖于任何手动安装的软件包,就不再需要它,例如 apt-get或aptitude至少会建议删除它们。
auto 用于将程序包标记为自动安装。这将导致:在不再有手动安装的程序包依赖此程序包时,会删除程序包。
manual 用于将程序包标记为手动安装,如果没有其他程序包依赖它,将阻止程序包自动删除。
showauto 用于打印自动安装的包的列表,每个包在新行上。如果没有给出包,将列出所有自动安装的包。 如果给出包,则仅显示自动安装的包。
showmanual 可以像showauto一样使用,不同的是它将打印一个手动安装的包列表。
-f=filename, –file=filename 使用参数filename读取/写入包统计信息,而不是默认位置(由配置项:Dir::State定义的目录中的extended_status)。
防止包的变更
hold 用于将包标记为后退,这将阻止自动安装、升级、删除包。
unhold 用于hold设置的包,以便再次允许所有操作。
showhold 与其他show命令相同,用于打印hold的包列表。
安装、拆卸、清除计划包
像apt-get dselect-upgrade这样的前端可用于将先前安排的更改应用于软件包的安装状态。 可以使用install,remove(也称为deinstall),purge命令来安排此类更改。 具有特定选择的包可以分别与showinstall,showremove,showpurge一起显示。 有关这些所谓的dpkg选择的更多信息可以在dpkg(1)中找到。
命令支持的选项及含[……]
「apt-secure」
apt-secure,APT中的存档认证支持。
描述(DESCRIPTION)
从版本0.6开始,APT包含对所有存储库的发布文件进行签名检查的代码。这可以确保像档案中的软件包这样的数据不会被没有使用的人修改访问发行文件签名密钥。
从版本1.1开始,APT要求存储库提供最近的认证信息,以便不受阻碍地使用存储库。
从版本1.5以来,在发布文件中包含的关于存储库的信息的变更需要在APT从这个存储库应用更新之前需要进行确认。
注意:所有基于APT的前端软件包管理程序,如apt-get(8),aptitude(8),synaptic(8)都支持认证功能,所以本文使用APT来统称它们以简化问题。
未签名仓库(UNSIGNED REPOSITORIES)
如果一个档案有一个未签名的发行文件,或者所有当前的APT版本都没有发行文件,将拒绝在更新操作中默认下载它们的数据,即使像apt-get(8)那样被迫下载前端也需要明确的确认一个安装请求包含一个来自这个未经身份验证的档案的包。
你可以强制所有APT客户端通过设置配置选项Acquire::AllowInsecureRepositories为true来仅显示警告。个人私有的存储库也可以被允许通过不安全sources.list(5)选项allow-insecure=yes。请注意,不安全的存储库是强烈不鼓励和 所有强制apt继续支持它们的选项最终都将被删除。 用户设置也可以使用Trusted选项可以禁用警告,但是请务必理解其在sources.list(5)中列出的含义。
一个以前被认证但是在更新操作中会丢失这个状态的仓库会引发了一个在所有的APT客户端中都会出现的错误,无论是允许还是禁止使用不安全的存储库。该错误可以通过另外设置Acquire::AllowDowngradeToInsecureRepositories为true,或对于私有存储库也可以使用sources.list(5)中的allow-downgrade-to-insecure=yes选项。
已签名仓库(SIGNED REPOSITORIES)
从APT档案到最终用户的信任链由几个步骤组成。 apt-secure是这个链条的最后一步;信任一个档案并不意味着你信任它的包中不包含恶意代码,但意味着您信任存档维护者。这是档案维护者的责任确保档案的完整性得以保留。
apt-secure不会检查包级别的签名。如果需要工具来做到这一点,你应该使用debsig-verify和debsign(分别在debsig-verify和devscripts包中提供)。
Debian的信任链(例如)从一个维护者上传一个新的包或一个新版本的打包到Debian档案。为了生效,这个上传需要用key签名,该k[……]
「arj」
「arpwatch」
arp2ethers
arpfetch
arpsnmp
arpwatch
bihourly
dmassagevendor
massagevendor
参考文献
项目主页
dpkg -L arpwatch[……]
「arpwatch(8)」-
跟踪以太网/IP地址配对
命令语法格式
arpwatch [ -dN ] [ -f datafile ] [ -i interface ] [ -n net[/width] ] [ -r file ] [ -s sendmail_path ] [ -p ] [ -a ] [ -m addr ] [ -u username ] [ -R seconds ] [ -Q ] [ -z ignorenet/ignoremask ]
命令描述
命令arpwatch跟踪以太网/IP地址配对。 它使用syslogs记录活动,并通过电子邮件报告某些变化。 arpwatch使用pcap(3)在本地以太网接口上侦听arp数据包。
请注意,必须在第一次运行arpwatch之前创建一个空的arp.dat文件。
命令行选项
-d 标志用于启用调试。 这也禁止分配到后台并通过电子邮件发送报告。相反,他们被送到标准错误。
-f 标志用于设置以太网/IP地址数据库文件名。 默认为arp.dat文件。
-i 标志用于覆盖默认接口。
-n net[/width] 标志指定其他本地网络。 当在同一线路上运行多个网络时,这可以避免“bogon”警告。 如果未指定可选width,则使用该网络类(A,B,C…)的默认网络掩码。
-N 标志禁用报告任何“bogons”。
-r file 标志用于指定保存文件(可能由tcpdump(1)或pcapture(1)创建)以读取而不是从网络读取。 在这种情况下,arpwatch不会分叉。
在Debian中的选项
-s sendmail_path 标志用于指定sendmail程序的路径。任何带有选项-odi选项,然后读取来自标准输入的文本的程序都可以替换。这对于将报表重定向到日志文件而不是邮件非常有用。
-p 标志禁用混杂操作。无需接口处于混杂模式,ARP广播可通过集线器,同时节省了大量资源(这些资源将浪费在处理千兆字节的非广播流量上)。另一方面,设置混杂模式并不意味着获得与arpwatch有关的100%流量。因人而异。
-a 默认情况下,arpwatch报告与默认接口的第一个IP地址位于同一子网中的IP地址的“bogons”(除非给出-N)。如果指定了此选项,arpwatch将报告有关每个IP地址的“bogons”。
-m 选项用于指定将向其发送报告的电子邮件地址。默认情况下,报告将发送到本地计算机上的root用户。
-u username 标志指示arpwatch删除root权限,并将UID更改为username和GID更改为username的主组。出于安全原因,建议使用此方法,但用户名必须具有对默认目录的写访问权限。
-[……]