# 第四部分 命令

掌握 Linux 命令是编写有效的 shell 脚本必不可少的序曲。

本章节涉及了下列的命令：

* [`.`](/shell/part4.md)（参照 [`source`](/shell/part4.md)）
* [`ac`](/shell/part4.md)
* [`adduser`](/shell/part4.md)
* [`agetty`](/shell/part4.md)
* [`agrep`](/shell/part4.md)
* [`ar`](/shell/part4.md)
* [`arch`](/shell/part4.md)
* [`at`](/shell/part4.md)
* [`autoload`](/shell/part4.md)
* [`awk`](/shell/part4.md)（参考 [使用 `awk` 进行数学运算](/shell/part4.md)）
* [`badblocks`](/shell/part4.md)
* [`banner`](/shell/part4.md)
* [`basename`](/shell/part4.md)
* [`batch`](/shell/part4.md)
* [`bc`](/shell/part4.md)
* [`bg`](/shell/part4.md)
* [`bind`](/shell/part4.md)
* [`bison`](/shell/part4.md)
* [`builtin`](/shell/part4.md)
* [`bzgrep`](/shell/part4.md)
* [`bzip2`](/shell/part4.md)
* [`cal`](/shell/part4.md)
* [`caller`](/shell/part4.md)
* [`cat`](/shell/part4.md)
* [`cd`](/shell/part4.md)
* [`chattr`](/shell/part4.md)
* [`chfn`](/shell/part4.md)
* [`chgrp`](/shell/part4.md)
* [`chkconfig`](/shell/part4.md)
* [`chmod`](/shell/part4.md)
* [`chown`](/shell/part4.md)
* [`chroot`](/shell/part4.md)
* [`cksum`](/shell/part4.md)
* [`clear`](/shell/part4.md)
* [`clock`](/shell/part4.md)
* [`cmp`](/shell/part4.md)
* [`col`](/shell/part4.md)
* [`colrm`](/shell/part4.md)
* [`column`](/shell/part4.md)
* [`comm`](/shell/part4.md)
* [`command`](/shell/part4.md)
* [`compgen`](/shell/part4.md)
* [`complete`](/shell/part4.md)
* [`compress`](/shell/part4.md)
* [`coproc`](/shell/part4.md)
* [`cp`](/shell/part4.md)
* [`cpio`](/shell/part4.md)
* [`cron`](/shell/part4.md)
* [`crypt`](/shell/part4.md)
* [`csplit`](/shell/part4.md)
* [`cu`](/shell/part4.md)
* [`cut`](/shell/part4.md)
* [`date`](/shell/part4.md)
* [`dc`](/shell/part4.md)
* [`dd`](/shell/part4.md)
* [`debugfs`](/shell/part4.md)
* [`declare`](/shell/part4.md)
* [`depmod`](/shell/part4.md)
* [`df`](/shell/part4.md)
* [`dialog`](/shell/part4.md)
* [`diff`](/shell/part4.md)
* [`diff3`](/shell/part4.md)
* [`diffstat`](/shell/part4.md)
* [`dig`](/shell/part4.md)
* [`dirname`](/shell/part4.md)
* [`dirs`](/shell/part4.md)
* [`disown`](/shell/part4.md)
* [`dmesg`](/shell/part4.md)
* [`doexec`](/shell/part4.md)
* [`dos2unix`](/shell/part4.md)
* [`du`](/shell/part4.md)
* [`dump`](/shell/part4.md)
* [`dumpe2fs`](/shell/part4.md)
* [`e2fsck`](/shell/part4.md)
* [`echo`](/shell/part4.md)
* [`egrep`](/shell/part4.md)
* [`enable`](/shell/part4.md)
* [`enscript`](/shell/part4.md)
* [`env`](/shell/part4.md)
* [`eqn`](/shell/part4.md)
* [`eval`](/shell/part4.md)
* [`exec`](/shell/part4.md)
* [`exit`](/shell/part4.md)（相关话题：[退出状态](/shell/part4.md)）
* [`expand`](/shell/part4.md)
* [`export`](/shell/part4.md)
* [`expr`](/shell/part4.md)
* [`factor`](/shell/part4.md)
* [`false`](/shell/part4.md)
* [`fdformat`](/shell/part4.md)
* [`fdisk`](/shell/part4.md)
* [`fg`](/shell/part4.md)
* [`fgrep`](/shell/part4.md)
* [`file`](/shell/part4.md)
* [`find`](/shell/part4.md)
* [`finger`](/shell/part4.md)
* [`flex`](/shell/part4.md)
* [`flock`](/shell/part4.md)
* [`fmt`](/shell/part4.md)
* [`fold`](/shell/part4.md)
* [`free`](/shell/part4.md)
* [`fsck`](/shell/part4.md)
* [`ftp`](/shell/part4.md)
* [`fuser`](/shell/part4.md)
* [`getfacl`](/shell/part4.md)
* [`getopt`](/shell/part4.md)
* [`getopts`](/shell/part4.md)
* [`gettext`](/shell/part4.md)
* [`getty`](/shell/part4.md)
* [`gnome-mount`](/shell/part4.md)
* [`grep`](/shell/part4.md)
* [`groff`](/shell/part4.md)
* [`groupmod`](/shell/part4.md)
* [`groups`](/shell/part4.md)（相关话题：变量 [`$GROUPS`](/shell/part4.md)）
* [`gs`](/shell/part4.md)
* [`gzip`](/shell/part4.md)
* [`halt`](/shell/part4.md)
* [`hash`](/shell/part4.md)
* [`hdparm`](/shell/part4.md)
* [`head`](/shell/part4.md)
* [`help`](/shell/part4.md)
* [`hexdump`](/shell/part4.md)
* [`host`](/shell/part4.md)
* [`hostid`](/shell/part4.md)
* [`hostname`](/shell/part4.md)（相关话题：变量 [`$HOSTNAME`](/shell/part4.md)）
* [`hwclock`](/shell/part4.md)
* [`iconv`](/shell/part4.md)
* [`id`](/shell/part4.md)（相关话题：变量 [`$UID`](/shell/part4.md)）
* [`ifconfig`](/shell/part4.md)
* [`info`](/shell/part4.md)
* [`infocmp`](/shell/part4.md)
* [`init`](/shell/part4.md)
* [`insmod`](/shell/part4.md)
* [`install`](/shell/part4.md)
* [`ip`](/shell/part4.md)
* [`ipcalc`](/shell/part4.md)
* [`iptables`](/shell/part4.md)
* [`iwconfig`](/shell/part4.md)
* [`jobs`](/shell/part4.md)
* [`join`](/shell/part4.md)
* [`jot`](/shell/part4.md)
* [`kill`](/shell/part4.md)
* [`killall`](/shell/part4.md)
* [`last`](/shell/part4.md)
* [`lastcomm`](/shell/part4.md)
* [`lastlog`](/shell/part4.md)
* [`ldd`](/shell/part4.md)
* [`less`](/shell/part4.md)
* [`let`](/shell/part4.md)
* [`lex`](/shell/part4.md)
* [`lid`](/shell/part4.md)
* [`ln`](/shell/part4.md)
* [`locate`](/shell/part4.md)
* [`lockfile`](/shell/part4.md)
* [`logger`](/shell/part4.md)
* [`logname`](/shell/part4.md)
* [`logout`](/shell/part4.md)
* [`logrotate`](/shell/part4.md)
* [`look`](/shell/part4.md)
* [`losetup`](/shell/part4.md)
* [`lp`](/shell/part4.md)
* [`ls`](/shell/part4.md)
* [`lsdev`](/shell/part4.md)
* [`lsmod`](/shell/part4.md)
* [`lsof`](/shell/part4.md)
* [`lspci`](/shell/part4.md)
* [`lsusb`](/shell/part4.md)
* [`ltrace`](/shell/part4.md)
* [`lynx`](/shell/part4.md)
* [`lzcat`](/shell/part4.md)
* [`lzma`](/shell/part4.md)
* [`m4`](/shell/part4.md)
* [`mail`](/shell/part4.md)
* [`mailstats`](/shell/part4.md)
* [`mailto`](/shell/part4.md)
* [`make`](/shell/part4.md)
* [`MAKEDEV`](/shell/part4.md)
* [`man`](/shell/part4.md)
* [`mapfile`](/shell/part4.md)
* [`mcookie`](/shell/part4.md)
* [`md5sum`](/shell/part4.md)
* [`merge`](/shell/part4.md)
* [`mesg`](/shell/part4.md)
* [`mimencode`](/shell/part4.md)
* [`mkbootdisk`](/shell/part4.md)
* [`mkdir`](/shell/part4.md)
* [`mkdosfs`](/shell/part4.md)
* [`mke2fs`](/shell/part4.md)
* [`mkfifo`](/shell/part4.md)
* [`mkisofs`](/shell/part4.md)
* [`mknod`](/shell/part4.md)
* [`mkswap`](/shell/part4.md)
* [`mktemp`](/shell/part4.md)
* [`mmencode`](/shell/part4.md)
* [`modinfo`](/shell/part4.md)
* [`modprobe`](/shell/part4.md)
* [`more`](/shell/part4.md)
* [`mount`](/shell/part4.md)
* [`msgfmt`](/shell/part4.md)
* [`mv`](/shell/part4.md)
* [`nc`](/shell/part4.md)
* [`netconfig`](/shell/part4.md)
* [`netstat`](/shell/part4.md)
* [`newgrp`](/shell/part4.md)
* [`nice`](/shell/part4.md)
* [`nl`](/shell/part4.md)
* [`nm`](/shell/part4.md)
* [`nmap`](/shell/part4.md)
* [`nohup`](/shell/part4.md)
* [`nslookup`](/shell/part4.md)
* [`objdump`](/shell/part4.md)
* [`od`](/shell/part4.md)
* [`openssl`](/shell/part4.md)
* [`passwd`](/shell/part4.md)
* [`paste`](/shell/part4.md)
* [`patch`](/shell/part4.md)（相关话题：[`diff`](/shell/part4.md)）
* [`pathchk`](/shell/part4.md)
* [`pax`](/shell/part4.md)
* [`pgrep`](/shell/part4.md)
* [`pidof`](/shell/part4.md)
* [`ping`](/shell/part4.md)
* [`pkill`](/shell/part4.md)
* [`popd`](/shell/part4.md)
* [`pr`](/shell/part4.md)
* [`printenv`](/shell/part4.md)
* [`printf`](/shell/part4.md)
* [`procinfo`](/shell/part4.md)
* [`ps`](/shell/part4.md)
* [`pstree`](/shell/part4.md)
* [`ptx`](/shell/part4.md)
* [`pushd`](/shell/part4.md)
* [`pwd`](/shell/part4.md)（相关话题：变量 [`$PWD`](/shell/part4.md)）
* [`quota`](/shell/part4.md)
* [`rcp`](/shell/part4.md)
* [`rdev`](/shell/part4.md)
* [`rdist`](/shell/part4.md)
* [`read`](/shell/part4.md)
* [`readelf`](/shell/part4.md)
* [`readlink`](/shell/part4.md)
* [`readonly`](/shell/part4.md)
* [`reboot`](/shell/part4.md)
* [`recode`](/shell/part4.md)
* [`renice`](/shell/part4.md)
* [`reset`](/shell/part4.md)
* [`resize`](/shell/part4.md)
* [`restore`](/shell/part4.md)
* [`rev`](/shell/part4.md)
* [`rlogin`](/shell/part4.md)
* [`rm`](/shell/part4.md)
* [`rmdir`](/shell/part4.md)
* [`rmmod`](/shell/part4.md)
* [`route`](/shell/part4.md)
* [`rpm`](/shell/part4.md)
* [`rpm2cpio`](/shell/part4.md)
* [`rsh`](/shell/part4.md)
* [`rsync`](/shell/part4.md)
* [`runlevel`](/shell/part4.md)
* [`run-parts`](/shell/part4.md)
* [`rx`](/shell/part4.md)
* [`rz`](/shell/part4.md)
* [`sar`](/shell/part4.md)
* [`scp`](/shell/part4.md)
* [`script`](/shell/part4.md)
* [`sdiff`](/shell/part4.md)
* [`sed`](/shell/part4.md)
* [`seq`](/shell/part4.md)
* [`service`](/shell/part4.md)
* [`set`](/shell/part4.md)
* [`setfacl`](/shell/part4.md)
* [`setquota`](/shell/part4.md)
* [`setserial`](/shell/part4.md)
* [`setterm`](/shell/part4.md)
* [`sha1sum`](/shell/part4.md)
* [`shar`](/shell/part4.md)
* [`shopt`](/shell/part4.md)
* [`shred`](/shell/part4.md)
* [`shutdown`](/shell/part4.md)
* [`size`](/shell/part4.md)
* [`skill`](/shell/part4.md)
* [`sleep`](/shell/part4.md)
* [`slocate`](/shell/part4.md)
* [`snice`](/shell/part4.md)
* [`sort`](/shell/part4.md)
* [`source`](/shell/part4.md)
* [`sox`](/shell/part4.md)
* [`split`](/shell/part4.md)
* [`sq`](/shell/part4.md)
* [`ssh`](/shell/part4.md)
* [`stat`](/shell/part4.md)
* [`strace`](/shell/part4.md)
* [`strings`](/shell/part4.md)
* [`strip`](/shell/part4.md)
* [`stty`](/shell/part4.md)
* [`su`](/shell/part4.md)
* [`sudo`](/shell/part4.md)
* [`sum`](/shell/part4.md)
* [`suspend`](/shell/part4.md)
* [`swapoff`](/shell/part4.md)
* [`swapon`](/shell/part4.md)
* [`sx`](/shell/part4.md)
* [`sync`](/shell/part4.md)
* [`sz`](/shell/part4.md)
* [`tac`](/shell/part4.md)
* [`tail`](/shell/part4.md)
* [`tar`](/shell/part4.md)
* [`tbl`](/shell/part4.md)
* [`tcpdump`](/shell/part4.md)
* [`tee`](/shell/part4.md)
* [`telinit`](/shell/part4.md)
* [`telnet`](/shell/part4.md)
* [`Tex`](/shell/part4.md)
* [`texexec`](/shell/part4.md)
* [`time`](/shell/part4.md)
* [`times`](/shell/part4.md)
* [`tmpwatch`](/shell/part4.md)
* [`top`](/shell/part4.md)
* [`touch`](/shell/part4.md)
* [`tput`](/shell/part4.md)
* [`tr`](/shell/part4.md)
* [`traceroute`](/shell/part4.md)
* [`true`](/shell/part4.md)
* [`tset`](/shell/part4.md)
* [`tsort`](/shell/part4.md)
* [`tty`](/shell/part4.md)
* [`tune2fs`](/shell/part4.md)
* [`type`](/shell/part4.md)
* [`typeset`](/shell/part4.md)
* [`ulimit`](/shell/part4.md)
* [`umask`](/shell/part4.md)
* [`umount`](/shell/part4.md)
* [`uname`](/shell/part4.md)
* [`unarc`](/shell/part4.md)
* [`unarj`](/shell/part4.md)
* [`uncompress`](/shell/part4.md)
* [`unexpand`](/shell/part4.md)
* [`uniq`](/shell/part4.md)
* [`units`](/shell/part4.md)
* [`unlzma`](/shell/part4.md)
* [`unrar`](/shell/part4.md)
* [`unset`](/shell/part4.md)
* [`unsq`](/shell/part4.md)
* [`unzip`](/shell/part4.md)
* [`uptime`](/shell/part4.md)
* [`usbmodules`](/shell/part4.md)
* [`useradd`](/shell/part4.md)
* [`userdel`](/shell/part4.md)
* [`usermod`](/shell/part4.md)
* [`users`](/shell/part4.md)
* [`usleep`](/shell/part4.md)
* [`uucp`](/shell/part4.md)
* [`uudecode`](/shell/part4.md)
* [`uuencode`](/shell/part4.md)
* [`uux`](/shell/part4.md)
* [`vacation`](/shell/part4.md)
* [`vdir`](/shell/part4.md)
* [`vmstat`](/shell/part4.md)
* [`vrfy`](/shell/part4.md)
* [`w`](/shell/part4.md)
* [`wait`](/shell/part4.md)
* [`wall`](/shell/part4.md)
* [`watch`](/shell/part4.md)
* [`wc`](/shell/part4.md)
* [`wget`](/shell/part4.md)
* [`whatis`](/shell/part4.md)
* [`whereis`](/shell/part4.md)
* [`which`](/shell/part4.md)
* [`who`](/shell/part4.md)
* [`whoami`](/shell/part4.md)
* [`whois`](/shell/part4.md)
* [`write`](/shell/part4.md)
* [`xargs`](/shell/part4.md)
* [`xrandr`](/shell/part4.md)
* [`xz`](/shell/part4.md)
* [`yacc`](/shell/part4.md)
* [`yes`](/shell/part4.md)
* [`zcat`](/shell/part4.md)
* [`zdiff`](/shell/part4.md)
* [`zdump`](/shell/part4.md)
* [`zegrep`](/shell/part4.md)
* [`zfgrep`](/shell/part4.md)
* [`zgrep`](/shell/part4.md)
* [`zip`](/shell/part4.md)

## 目录

* [15. 内建命令](/shell/part4.md)
  * [15.1 任务控制命令](/shell/part4.md)
* [16. 外部筛选器，任务及命令](/shell/part4.md)
  * [16.1 基础命令](/shell/part4.md)
  * [16.2 复杂命令](/shell/part4.md)
  * [16.3 时间/日期命令](/shell/part4.md)
  * [16.4 文本处理命令](/shell/part4.md)
  * [16.5 文件与归档命令](/shell/part4.md)
  * [16.6 通信命令](/shell/part4.md)
  * [16.7 终端控制命令](/shell/part4.md)
  * [16.8 数学命令](/shell/part4.md)
  * [16.9 其他命令](/shell/part4.md)
* [17. 系统与管理命令](/shell/part4.md)
  * [17.1 分析一个系统脚本](/shell/part4.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wiki.clay-wangzhi.com/shell/part4.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
