linux commands

  1 abrt-cli --since 1435661686          ;查看abrt捕捉的异常
  2 
  3 alias                    ;别名,alias rm='rm -i';使用“ \rm ” 使用原命令
  4 
  5 alsamixer                ;图形音量调节,q 增加左声道, w 同时增加,e 增加右声道,上下键同时增加减小音量, s 选择声卡
  6 
  7 amixer                    ; amixer set Master 40% 调节音量;alsamixer是Linux 音频架构ALSA中的Alsa工具的其中一个,用于配置音频的各个参数, amixer 是他的文本模式
  8 
  9 apachectl                ; apache 配置命令
 10 
 11 ar                    ; 创建添加 c 程序库, ar -rc libhello.a hello.o 用 hello.o 创建一个静态库 libhello.a
 12 
 13 arp                            ;地址解析协议
 14 
 15 aspell                    ; interactive spell checker
 16 
 17 at                            ;定时执行程序,默认为root用户,需要开启 atd 进程哦;查看作业:atq;删除作业:atrm 1;at -f ./hello 16:10 10292015(MMDDYY)
 18 
 19 audacity                ;音频编辑器
 20 
 21 authconfig                ; sssd 的配置工具
 22 
 23 axel                    ; A light download accelerator for Linux.
 24 
 25 basename                ;只取完整文件名的文件名;如 basename /etc/profile 输出 profile
 26 
 27 bash
 28 
 29 bluetooth-wizard            ;打开蓝牙配置框
 30 
 31 btrfs                    ; control a btrfs filesystem
 32 
 33 bypy                    ; 百度云终端客户端
 34 
 35 cal                    ;输出日历
 36 
 37 cat                    ;concatenate(连接) files and print on the standard output; -n 加上行号,编号时不忽略空行; -b 加上行号,编号时忽略空行(空行同样会输出),常通过查看 /proc 下的文件来监视系统状态
 38 
 39 cdrecord                ;write data to optical(光学的) disk media, sameas wodim; cdrecord -pad -dao -data blag-140k-i686.iso
 40 
 41 chage                    ;设置用户和其密码的日期,-E 设置过期天数,-W 设置密码过期前多久提示用户,-I 设置用户过期后锁定用户的天数;过期的用户仍然存在,但无法使用,和锁定用户一样
 42 
 43 charmap                    ;character symbols to define character encodings, 字符映射表
 44 
 45 chat                    ;Automated conversational script with a modem
 46 
 47 chattr                    ;改变文件的隐藏属性,复制粘贴会改变文件权限; -i 不能更新; -a 可以增加内容,不能改变过去的内容
 48 
 49 chcpu                    ;配置 cpu
 50 
 51 cheese                    ;tool to take pictures and videos from your webcam(网络摄像头)
 52 
 53 chfn                    ;提供在/etc/passwd中添加备注字段的标准方法,默认保存finger信息,chfn user会提示用户输入备注信息; -f :后面接完整癿大名; -o :您办公室癿房间号码; -p :办公室癿电话号码; -h :家里癿电话号码
 54 
 55 chgrp                        ;改变文件属组,chgrp group1 file
 56 
 57 chkconfig                      ;查看 SysV 开机自启动服务,chkconfig --level 5 network off
 58 
 59 chmod
 60 
 61 chown                        ;改变属主,chown root:root file
 62 
 63 chpasswd                ;批量改变用户密码,chpasswd <users.txt,user.txt中是userd:passwd的密码对
 64 
 65 chroot                    ; run command or interactive shell with special root directory
 66 
 67 chsh                    ;chsh -s /bin/bash user; -l 列出目前系统上面可用癿 shell ,其实就是 /etc/shells 癿内容; -s 训定修改自己癿 Shell 啰
 68 
 69 chvt                    ; change foreground virtual terminal, chvt 2 跳到 tty2
 70 
 71 clear                    ; 清空屏幕
 72 
 73 clear_console                ; 清空屏幕并删除缓存,保护安全,二进制文件和手册备份在网盘中; clear_console -q
 74 
 75 clock                    ; 查询和设置硬件时间
 76 
 77 convmv                      ;转换文件名的格式:convmv -f 源编码 -t 新编码 [选项] 文件名
 78 
 79 cowpatty                    ; wpa-psk 字典破解;cowpatty -d xxx.hash -r yyyyy.cap -s ESSID 
 80 
 81 crontab                      ;设置定时任务,用crontab -e 编辑,min hour dayofmonth month dayofweek username command ,在/etc/crontab中查看配置文件
 82 
 83 cp                            ;复制目录和文件,没有目录时会创建目录,文件正在使用时可能无法复制,-R递归复制目录(如果目标目录中没有给定的目录则创建之,有给定的目录则会将源目录再次拷贝到给定的目录下面,无论目录名是否相同),-r递归复制文件,-p保留时间戳、属性等,-l硬链接不创建新文件,-s软链接,-f强制删除, -t 指定目标目录; "cp src1 src2 src3 dst1" == "cp -t dst1 src1 src2 src3";使用 \cp 时就不会使用命令的别名了
 84 
 85 cpio                    ; copies files to and from archives. 可备份到磁带上,可备份任何文件,需配合其他程序使用
 86 
 87 cpp                    ; The C Preprocessor
 88 
 89 cpupower                ; Shows and sets processor power related values; frequency-info frequency-set idle-info idle-set set info monitor help
 90 
 91 ctags                    ; Generate tag files for source code
 92 
 93 curl                    ; transfer a URL, 比如下载一个网页源代码,图片,上传数据等等;curl -O http://releases.wikimedia.org/mediawiki/1.26/mediawiki-1.26.0.tar.gz
 94 
 95 cut                            ;在文件的每一行中提取片断,-b -c -f, -d -n -s
 96 -b LIST,输出这些字节(一个汉字 3 byte );-c LIST,输出这些字符(一个汉字算一个字符);-d DELIM,使用 DELIM 取代空白字符作为分隔符,和 -f 一起用;-f LIST,输出这些字段;-n,和 -b 一起用时不分开多字节字符;-s,不显示没有分隔符的行;--output-delimiter=STRING,使用 STRING 作为分隔符, 缺省(的输出分隔符) 为输入分隔符;
 97 LIST 由一个数字范围( n-m )或逗号隔开的多个范围组成,从 1 开始计数。 范围是下列形式之一:“ N ”第 N 个字节, 字符或字段;“ N- ”从第 N 个字节, 字符或字段直至行尾;“ N-M ”从第 N 到第 M(并包括第 M )个字节, 字符或字段;“ -M ”从第 1 到第 M(并包括第 M ) 个字节, 字符或字段。
 98 如果没有指定文件 FILE, 或 FILE 是 -, 就从标准输入读取数据;-b, -c, -f 参数可以使用“ -b 1 ”或“ -b1 ”;每次只能使用 -b, -c 或 -f 中的一个选项。
 99 cat /etc/passwd | cut -f 1,3 -d : | head -5        #以 : 分割文件,输出第一个字段
100 
101 daemon command                ; 让一个程序后台执行
102 
103 date                    ;显示和设置时间; date -s MMDDHHmm[[CC]YY][.ss]; m 月, d 天, k 时, M 分,S 秒, s UTC 秒数,N 纳秒,y 年, Y 世纪和年, D 月日年,date +%w 显示星期 %Y %m %d
104 
105 dconf                            ; A configuration system
106 
107 dconf-editor                        ; 图形界面修改系统默认设置 dconf,对应的命令行命令是 gsetting
108 
109 dd                            ;用指定大小的块拷贝一个文件,并在拷贝的同时进行指定的转换:http://www.cnblogs.com/sopost/archive/2010/08/13/2190102.html
110 dd if=/dev/zero of=/file bs=1M count=100        # 创建一个 100M 大小的文件
111 dd if=/dev/hdb of=/dev/hdd                # 将 /dev/hdb 整盘备份到 /dev/hdd
112 dd if=/dev/hdb of=/root/image                # 将 /dev/hdb 全盘数据备份到指定路径的 image 文件
113 dd if=/root/image of=/dev/hdb                # 将备份文件恢复到指定盘
114 dd if=/dev/hdb | gzip > /root/image.gz            # 备份 /dev/hdb 全盘数据,并利用 gzip 工具压缩保存到指定目录
115 gzip -dc /root/image.gz | dd of=/dev/hdb        # 将压缩的备份文件恢复到指定盘
116 增加 swap 空间大小
117 {
118     dd if=/dev/zero of=/swapfile bs=1024 count=262144    # 创建一个 256M 的文件
119     mkswap /swapfile                # 把这个文件变成 swap 文件
120     swapon /swapfile                # 启用这个文件
121     /swapfile swap swap default 0 0            # 编辑 /etc/fstab 开机自动挂载它
122 }
123 dd if=/dev/urandom of=/dev/hdb1                # 销毁磁盘数据
124 测试硬盘读写性能
125 {
126     dd if=/dev/zero of=/root/1Gb.file bs=1024 count=1000000    # 计算这两个命令的执行时间,计算出硬盘的读写速度
127     dd if=/root/1Gb.file bs=64k | dd of=/dev/null
128 }
129 确定硬盘的最佳块大小
130 {
131     dd if=/dev/zero of=/root/1Gb.file bs=1024 count=1000000        # 根据每个命令执行的时间确定最佳块大小
132     dd if=/dev/zero of=/root/1Gb.file bs=2048 count=500000
133     dd if=/dev/zero of=/root/1Gb.file bs=4096 count=250000
134     dd if=/dev/zero of=/root/1Gb.file bs=8192 count=125000
135 }
136 
137 debuginfo-install            ; install debuginfo packages and their dependencies
138 
139 debugfs                      ;恢复删除的文件 first: open /dev/sda then: ls /home/C++
140 
141 declare                        declare命令用于声明和显示已存在的shell变量。当不提供变量名参数时显示所有shell变量。declare命令若不带任何参数选项,则会显示所有shell变量及其值。declare的功能与typeset命令的功能是相同的。
142 
143 df                          ;挂载的磁盘; -T 查看文件系统类型; -k 大小以 K 显示; -m 大小以 M 显示
144 
145 diff                          ;比较两个文件
146 
147 dig                    ; DNS lookup utility
148 
149 dmesg                         ;用于检测和控制内核环缓冲(print or control the kernel ring buffer)。程序用来帮助用户了解系统的启动信息,硬件,硬盘,cpu; dmesg | grep -i eth 查看网卡信息
150 
151 dirname                    ; 提取文件的完整路径,不包括文件名; dirname /etc/profile 输出 /etc
152 
153 dmidecode                ;以一种可读的方式dump出机器的DMI(Desktop Management Interface)信息; -q 查看所有信息,可查看机器型号
154 
155 dmidecode -t bios            ;查看 bios 信息
156 
157 dmidecode -t memory            ;查看内存硬件信息
158 
159 dmsetup                    ;low level logical volume management; dmsetup ls
160 
161 domainname                ; 暂时设置本机的领域名,永久设置需要修改 /etc/sysconfig/network,通 nisdomainname, ypdomainname
162 
163 doxygen                    ; documentation system for various programming languages;     doxygen doc/doxygen.config
164 
165 du                          ;estimate(估计) disk usage of each FILE, recursively for directories; -h(human readable); -a(默认只列出目录); -b(bytes); -k(default); -m ; -d 指定最大层次; -s 列出指定目录或文件的大小
166 
167 echo $PATH                ; -n 不自动添加换行符(默认自动添加换行符), -e 识别转义字符,-E 不识别转义字符(默认)
168 
169 enable                    ; 用于临时关闭或者激活指定的shell内部命令(内建);若要执行的文件名称与shell内建命令相同,可用enable -n来关闭shell内建命令。若不加-n选项,enable可重新启动关闭的命令
170 
171 enca                          ;查看和转换文件编码,有时会出错
172 
173 enchant                        ;a spellchecker, an ispell-compatible spellchecker,查看 aspell ispell
174 
175 env                          ;run a program in a modified environment,默认输出环境参数;env LANG=C /usr/bin/mrtg
176 
177 evince                    ; pdf 文档浏览器
178 
179 eog                    ; gnome 图像查看器
180 
181 ether-wake                ; A tool to send a Wake-On-LAN "Magic Packet"
182 
183 ethtool enp2s0                ;query or control network driver and hardware settings 网卡的一些底层信息
184 
185 exit                    ; 输出退出状态码
186 
187 export                        ;将局部环境变量设置为全局环境变量
188 
189 dos2unix                ;DOS/Mac to Unix and vice versa text file format converter
190 
191 fc -l 100 102              ; fix command. 查看bash中输入的第100-102历史命令,也会将最近的历史命令修复出来
192 
193 fcrackzip                ; zip crack; fcrackzip --length 7 -c a  o1.zip
194 
195 fdisk                    ; fdisk /dev/sda 分区
196 
197 fg  +  num                      ;运行停止的服务
198 
199 find                            ;在指定目录下查找指定特征的文件; -name ;
200 
201 finger                    ;简单查看linux系统中的用户信息,多被管理员禁用(或没有预装),finger user;-s 仅列出用户癿账号、全名、终端机代号不登入时间等等;-m 列出不后面接癿账号相同者,而丌是刟用部分比对 (包括全名部分)
202 
203 file                          ;检查文件类型, -s 表示查看块设备,file -s sda{,1,2,3}
204 
205 flex                    ;the fast lexical analyser generator
206 
207 free                           ;查看内存使用情况; -m 以 M 显示
208 
209 fsck                          ;检查修复损坏的磁盘
210 
211 fuser                    ; 由文件名找出正在使用文件的程序,vim 编辑时是使用的 swp 文件哦; -u 列出用户名, -v 列出指令相关信息, -m 会列出操作文件系统或目录中文件的所有程序
212 
213 gawk                        ;流文件编辑
214 
215 gcc                            ;编译程序
216 
217 gdb                            ;调试程序
218 
219 genpmk                        ; 生成 hask 字典;genpmk -f 字典 -d 要生成的hash table -s ssid
220 
221 getconf LONG_BIT                  ;Posix
222 
223 getenforce                ; get the current mode of SELinux
224 
225 git
226 
227 gnome-abrt
228 
229 gnome-boxes
230 
231 gnome-calculator
232 
233 gnome-character-map            ;字符映射表
234 
235 gnome-clocks                   ;时钟
236 
237 gnome-contacts                 ;联系人
238 
239 gnome-control-center            ;设置
240 
241 gnome-dictionary            ;字典
242 
243 gnome-disk-image-mounter        ;选择要挂载的磁盘映像
244 
245 gnome-disks                  ;磁盘管理
246 
247 gnome-documents                ;文档管理器
248 
249 gnome-screenshot             ;截屏
250 
251 gnome-shell
252 
253 gnome-terminal
254 
255 gnome-text-editor            ; gedit
256 
257 gnome-tweak-tool
258 
259 gnome-system-monitor            ;进程管理、文件系统、内存、交换分区、CPU、网络流量统计
260 
261 gnome-weather
262 
263 gpg                    ;OpenPGP encryption and signing tool; --gen-key; gpg --verify file.sig file; --list-keys; --armor --export PubID/GPGKEYID
264 
265 grep                        ;匹配 -L 参数输出所有没有匹配的文件名,grep -L phrase file1 file2 file3 ……( grep -nilr * ); -l 参数表示如果一个文件中有多个匹配则之显示一次匹配; -n 显示行号(忽略空白行,但编号不忽略); -i 忽略大小写; -r 目录递归搜索; -b 显示行首字母是文档中的第几个字节,中文占两个字符,中文字符后的换行符占两个字节;“ * ”表示当前目录下的所有文件,“ . ” 表示匹配输出的所有字符; -E 匹配多个匹配符( '(rpc|nfs)'266 
267 groff                    ;front-end for the groff document formatting system
268 
269 groupadd                ;添加新组
270 
271 groupdel
272 
273 groupmod                ;修改组,-g修改组id,-n修改组名,也可以编辑/etc/group修改组名
274 
275 gsetting                ;gnome 相关的设置;gsettings set org.gnome.desktop.interface cursor-blink false
276 
277 gpasswd                  ; 管理 /etc/group 和 /etc/gshadow 文件,管理用户组;-d 从组中删除用户
278 
279 gvfsd-mtp                ; mtp 媒体传输协议
280 
281 halt                    ; halt会先呼叫shutdown,而shutdown最后会呼叫halt,不过,shutdown可以依据目前已启动的服务来逐次关闭各服务后才关机;至于halt却能够在不理会目前系统状况下, 进行硬件关机的特殊功能
282 
283 hciconfig                ;configure Bluetooth devices (hciX is the name of a Bluetooth device installed in the system, 属于 bluez-utils).
284 
285 head                    ;-20 输出前 20286 
287 hexedit                    ; 以十六进制编辑文件
288 
289 hdparm                      ;查看硬盘信息
290 
291 hg                    ; Mercurial source code management system
292 
293 hostname
294 
295 hostnamectl                ; 修改静态主机名时可永久修改主机名(Centos7); hostnamectl status|set-hostname [--static|--pretty|---transient] ;“静态”主机名也称为内核主机名,是系统在启动时从 /etc/hostname 自动初始化的主机名。“瞬态”主机名是在系统运行时临时分配的主机名,例如,通过DHCP或mDNS服务器分配。静态主机名和瞬态主机名都遵从作为互联网域名同样的字符限制规则。而另一方面,“灵活”主机名则允许使用自由形式(包括特殊/空白字符)的主机名,以展示给终端用户(如Dan's Computer)。
296 
297 htop                    ; 交互式的进程浏览器,替代 top
298 
299 history                    ;bash 内建指令,查看命令历史 /home/usr/.bash_history;历史命令是被保存在内存中的,当退出或者登录shell时,会自动保存或读取。在内存中,历史命令仅能够存储1000条历史命令,该数量是由环境变量HISTSIZE进行控制。-a 立刻将历史命令写入文件中
300 
301 hwclock                    ;query or set the hardware clock (RTC); hwclock --hctosys 让系统时间和硬件时间同步
302 
303 iconv                        ;codeset conversion,可以转换文本格式:iconv -f GBK -t UTF-8 ./Hello.c > Hello.c.temp
304 
305 id                          ;查看用户信息,-g显示用户组id号,-gn显示组名;-u显示用户id,-un显示用户名
306 
307 ifconfig                        ;查看本机ip地址
308 
309 ifdown                    ; take a network interface down
310 
311 ifup                    ; bring a network interface up
312 
313 info                    ; 类似 man 手册
314 
315 init                    ;设置运行级别, init 5 进入图形界面
316 
317 insmod                    ;加载内核模块
318 
319 install                    ; copy files and set attributes; -c (ignore); -d 安装的目录是否存在,不存在则创建
320 
321 iostat                    ;Report Central Processing Unit (CPU) statistics(统计数据) and input/output statistics for devices and partitions
322 
323 ip                           ;network device configuration;ip link set wls3p0 up;ip link show
324 
325 ipcs                    ;provide information on IPC facilities; -m 查看系统上的当前共享内存页面
326 
327 iptables                ;iptables/ip6tables — administration tool for IPv4/IPv6 packet filtering and NAT
328 
329 iw                            ;show / manipulate wireless devices and their configuration
330 
331 iwconfig                        ;配置无线网卡信息, configure a wireless network interface, 在 CentOS7 中已经被 iw 替代了
332 
333 jobs                            ;显示 ctrl z 停止的任务
334 
335 join                    ; join [选项]... 文件1 文件2;针对每一对具有相同内容的输入行,整合为一行写到标准输出,默认的内容连接区块是由第一个空白符代表的分界符号。当文件 1 或文件 2 被指定为"-"时,程序将从标准输入读取数据。
336 -a 文件编号,值可以是 12,分别对应文件 1 和文件 2,此选项用于根据指定文件编号输出不成对的行目;-e 字符,将缺失的输入区块替换为指定字符;-i, --ignore-case 比较时忽略大小写;-j 域,等于"-1 域 -2 域";-o 格式,按照指定格式构造输出行;-t 字符,使用指定字符作为输入和输出的分隔符;-v 文件编号,类似 -a 文件编号,但禁止组合输出行;-1 域,在文件1 的此域组合;-2 域,在文件2 的此域组合;--check-order,检查输入行是否正确排序,即使所有输入行均是成对的;--nocheck-order 不检查输入是否正确排序;--header 将首行视作域的头部,直接输出而不对其进行匹配;--help 显示此帮助信息并退出;--version 显示版本信息并退出
337 除非使用了"-t 字符串" 选项,否则前导空格分隔的域将被忽略,如果指定了字符串,则使用指定字符串分隔任意的域并从1 开始计数的域编号。可以指定的格式是由一个或多个逗号活空格所分隔的描述,其形式为"文件编号.域"或者"0"。默认的格式输出合并后的域、文件1 和文件2 剩下的域,均由该指定字符串分隔。
338 重要提示:文件1 和文件2 必须在合并域中排序;例如,如果"join"后没有选项,使用"sort -k 1b,1"。注意,所进行的比较遵从"LC_COLLATE"所指定的的规则。如果输入没有被排序并导致某些行无法合并,将会显示警告信息。
339 join data1 data2 -a 1 -a 2
340 
341 journalctl                ;Query the systemd journal; journalctl file 日志; flushing journal
342 
343 kill                          ;给进程发信号,kill -l 列出所有的系统信号,不能用进程名
344 
345 killall                          ;用进程名杀死所有相关进程,kill all http*
346 
347 lame                    ; create mp3 audio files; lame --decode music.mp3 music.wav
348 
349 last                    ;查看最近登陆过的用户,它查看的是 /var/log/wtmp 文件, wtmp 文件是以二进制格式进行存储的,如果直接使用文本编辑器查看,查看的会是一堆乱
350 
351 lastb                    ; 查看最近登陆过的用户,包括登陆失败的
352 
353 ldconfig                ; configure dynamic linker run-time bindings
354 
355 ldd                    ;查看可执行文件的库依赖
356 
357 less                  ;分页显示文件或缓冲区内容,如果数据改变了其也会实时改变数据; -N 显示行号
358 
359 lex                    ; 词法分析程序生成器 the fast lexical analyser generator
360 
361 ln  sourcefile  targetfile                 ;默认创建硬链接,-s 创建软链接,第一个参数是源文件
362 
363 locale                    ;get locale-specific information;区域设置,如语言等; export LANG=zh_CN.UTF-8 LC-ALL=zh_CN.UTF-8
364 
365 locate                    ; locate part_string, 在建立的资料库中搜索文件名, CentOS7 资料库每天更新一次,用 updatedb 手动更新,搜索没有权限设置哦
366 
367 loginctl                ; Control the systemd login manager; loginctl list-session/show-session/session-status/list-users 登陆会话
368 
369 lpr                    ; 通过打印机打印文件 printer
370 
371 ls                    ; -R 递归列出文件; -S 按大小排序输出,常用-sail; –ul 列出文件的访问时间(一般列出修改时间); -h 文件大小人性化;-l 列出文件访问权限、硬链接数,属主,属组,文件大小/设备号,最后修改时间,文件名
372 
373 lsblk                    ;硬盘和分区信息
374 
375 lsb_release                ; prints certain LSB (Linux Standard Base) and Distribution information 发行版信息
376 
377 lscpu                    ;查看 cpu 信息
378 
379 lsmod                    ;列出内核加载的模块(包括驱动),显示内核模块的状态
380 
381 lsof                    ;列出打开的文件,可用来找回删除的文件; lsof -i:port
382 
383 lspci                    ;PCI是Peripheral Component Interconnect(外围设备互联),主板所有硬件槽信息; -v 详细信息; -vvv 更详细的信息; lspci | grep -i "eth" 查看网卡硬件信息
384 
385 lsusb                    ;列出 usb 设备
386     
387 luit                             ;改变终端的字符编码,luit -encoding gbk
388 
389 mail                    ; mailx 程序
390 
391 make                    ; make install
392 
393 man                          ;查看shell命令,程序库(c/c++),系统函数,工具等的手册; -f 简短描述( whatis );有需要将手册导入到 less 中查看(行号)
394 
395 md5sum                        ;查看md5值
396 
397 mesg                    ; control write access to your terminal; mesg y 接收所有, n 不接受所有
398 
399 mii-tool                ;查看网卡
400 
401 minicom                    ;串口通信( windows 下的超级终端);minicom -s 配置串口
402 
403 mkdir                    ;创建目录; -p 创建父级目录
404 
405 modinfo                    ;查看内核加载的模块详细信息
406 
407 modprobe                ;加载内核模块; modprobe e1000
408 
409 more                          ;查看文件或缓冲区内容,s 上一页,d 下一页,文件浏览到末尾会自动退出
410 
411 mount                    ;挂载设备如果没有给出目录,会使用/etc/fstab中的文件
412 
413 mkbootdisk
414 
415 mkdir
416 
417 mkfifo                    ;新建有名管道文件,mknod -m 666 fifo_test p 7 8
418 
419 mkfs.ext2                ;mkfs.cramfs mkfs.ext3 mkfs.ext4 mkfs.fat mkfs.vfat mkfs.minix mkfs.msdos mkfs.xfs
420 
421 mknod                    ;mknod - make block or character special files; mknod -m 666 test b 6 3  建了一个块设备文件,主设备号是 6 ,次设备号是 3 ,权限是 666
422 
423 mkswap                    ;set up a Linux swap area
424 
425 mktemp                        ;在当前文件夹创建临时文件,TEMPFILE.XXXX
426 
427 mtr                    ;网络诊断工具,将 traceroute 和 ping 集成一块; p 暂停, n 下一个, q 退出
428 
429 mv                    ; 移动目录时默认合并目录
430 
431 mysql
432 
433 nali                    ; 显示 IP 地址的地理位置,本地运行,须自己安装软件;可以对标准输出的 ip,附加上地理信息,可将其他程序的 IP 地址重定向到 nali
434 
435 nali-dig                ; nali-dig google.com
436 
437 nali-nslookup                ; nali-nslookup google.com
438 
439 nali-traceroute
440 
441 nali-tracepath
442 
443 nali-ping
444 
445 nali-update                 ; 更新数据
446 
447 nano                     ;Nano's ANOther editor, an enhanced free Pico clone
448 
449 nautilus                ; the GNOME File Manager 文件管理器
450 
451 net
452 
453 netcat
454 
455 netstat                        ;查看端口信息
456 
457 nice                           ;进程执行的优先级( -20~19 ),nice -n 5 command,调整用renice +10 -u username,也可以在top命令中输入r,优先级值越小越高
458 
459 nl                    ;查看文件时添加行号
460 
461 nload                    ; A tool can monitor network traffic and bandwidth usage in real time 即时网速
462 
463 nm                    ;list symbols from object files( .o ),显示对象文件、可执行文件或对象文件库里的符号信息
464 
465 nmtui                          ;centos7编辑网络连接
466 
467 nslookup                          ;query Internet domain name servers,参数为域名
468 
469 ntpdate                    ; 同步系统时间; ntpdate 0.centos.pool.ntp.org;需要修改 /etc/localtime
470 
471 od                    ;将文档读取为 16 进制,例如读取二进制文件; -t oCc 的選項與參數來將資料內的字元以 ASCII 類型的字元來顯示
472 
473 openssl rand                ; generate pseudo-random bytes 产生随即数; openssl rand [option] n
474 
475 package-cleanup                ; clean up locally installed, duplicate, or orphaned packages
476 
477 parted                    ; partition manipulation program,可查看分区详细信息
478 
479 partprobe                ; inform the OS of partition table changes
480 
481 PATH=$PATH:/home/user/test          ;设置 PATH 路径,不要在 /etc/environment 中设置,会出错哦
482 
483 perror                    ; explain error codes; perror EXIT_SUCCESS; perror 1 2 3
484 
485 pic                    ; compile pictures for troff or TeX
486 
487 piconv                    ; perl version of iconv, a character encoding converter widely
488 
489 pidof                    ; 列出程序名对应的 pid; pidof systemd
490 
491 play                    ;播放音乐, sox 插件, play *.mp3 (安装 sox-devel sox-plugins-freeworld)
492 
493 poweroff                ;关闭计算机
494 
495 powertop                ;查看电脑中耗电量大的进程,关闭它
496 
497 pgrep                    ;查看运行程序相关的pid,pgrep systemd查看运行程序路径中包含 systemd 的程序pid
498 
499 pkg-config                ; Return metainformation about installed libraries 软件信息
500 
501 pkill                    ; 基于用户或属性查看信号或进程; pkill -KILL -t pts/0 踢出登陆的用户
502 
503 pppoe-setup                ; 拨号上网
504 
505 printenv                        ;输出全局环境变量,单个输出使用 echo $HOME ,系统环境变量都是大写区别用户环境变量
506 
507 ps                          ;查看所有进程详细信息用 -ef 和 -ax 参数, -ef 不会列出进程状态
508 
509 pstree                        ;系统进程的层次
510 
511 pwd                    ;查看当前工作目录
512 
513 pyrit                    ; 破解无线密码工具,采用 GPU 加速
514 
515 quota                    ; 显示磁盘使用情况和限制
516 
517 readelf                    ; 查看 elf 文件内容, readelf -a test | grep so; 查看 elf 文件使用库文件
518 
519 readlink                ; 打印符号链接或标准文件路径; readlink -f file
520 
521 rename                    ;重命名文件,替换文件名中出现的字符;rename ja ii jaca.com
522 
523 reboot                    ;重启计算机
524 
525 restorecon                ;restore file(s) default SELinux security contexts
526 
527 rkhunter                ; rootkit 扫描程序; rkhunter --check
528 
529 rm -r                        ;删除目录,最好不用-f参数
530 
531 rmdir                        ;remove empty directories
532 
533 rmmod                    ;移除内核模块; rmmod e1000
534 
535 rpm                    ;安装软件
536 
537 rpm2cpio                ; Extract  cpio  archive from RPM Package Manager (RPM) package
538 
539 rpmbuild
540 
541 runlevel                ;查看运行级别
542 
543 sa                    ; summarizes information about previously executed commands as recorded in the acct file
544 
545 safe_finger                ; finger client wrapper that protects against nasty stuff from finger servers,需要 finger 命令
546 
547 sar                    ; 最为全面的系统性能分析工具之一;sar [options] [-A] [-o file] t [n], t为采样间隔,n为采样次数,默认值是1; sar -n DEV 1 100 每秒统计即时网速流量 1 次,共 100548 
549 scp                    ; 本地和远程主机相互传文件; scp -P 58022 htons root@42.123.77.14://root 端口 58022 必须是打开的
550 
551 sed                          ;流文件编辑根據『PATH』這個環境變數所規範的路徑,去搜尋『執行檔』的檔名
552 
553 selinux                    ; enable/disable selinux; 
554 
555 sensors                    ;查看 cpu 温度
556 
557 seq                    ; print a sequence of numbers; seq 1 99
558 
559 sestatus                ;selinux 的状态
560 
561 set                          ;输出这个进程的所有环境变量,包括 printenv 输出的全局变量; 环境变量的设置是“ name=string562 
563 setenforce                ; setenforce 0 to put selinux in permissive mode; setenforce 1 to put SELinux in enforcing mode.
564 
565 setenv                         ;change or add an environment variable:  setenv VISUAL vim
566 
567 setterm                        ;调节屏幕,例如背景颜色
568 
569 sh
570 
571 sha1sum                    ;compute and check SHA1 message digest
572 
573 shutdown                ;关闭计算机,需要 root 权限,shutdown [-t 秒] [-arkhncfF] 时间 [警告信息],会通知其他用户和程序; shutdown 23:00, 2300 关闭计算机; -t sec 延时,-k 发送警告信息不关机,-h 关机前将系统服务关掉( poweroff ),-H halt the machine, -n 不经过 init 程序直接用 shutdown 关机,-r 将系统服务关掉后就重启,-f 关机重启后强制不进行 fsck 检查,-F 关机重启后强制进行 fsck 检查, -c cancel
574 
575 skill                          ;冻结进程,冻结:skill -STOP 133;唤醒: skill -CONT 133
576 
577 sl                    ; error of 'ls'
578 
579 sleep                    ; second
580 
581 slurm                    ;查看网络流量
582 
583 smartctl                        ;查看硬盘信息
584 
585 snice                            ;降低进程优先级,snice +4 -u username
586 
587 sort                          ;排序; -k 3,5 从第三个字符开始排序,第五个字符结束
588 
589 source                    ;在当前 bash 环境中读取并执行 file 中的命令。source file.sh,通常用‘.’代替。
590 
591 sox                    ;音频编辑
592 
593 speedtest-cli                ; 自定义的网络测试工具;–list 列出所有可用的 Speedtest.net 服务器;–share 分享;https://raw.github.com/sivel/speedtest-cli/master/speedtest_cli.py
594 
595 split                    ; 将一个文件分成许多小文件,可用 cat/join 连接起来;-l 指定按多少行分割(默认 1000 );-a 指定分割后的文件名长度(默认为 2,如 xaa, xab );-d 分割后的文件名使用数字前缀(如 x00001 );-b 每个文件大小(如 3, 3K/M/G/T/P/E/Z/Y( powers of 1024 ),3KB/MB/GB/TB/PB/EB/ZB/YB( powers of 1000 ) );split -b 3M -a 5 -d data.dat
596 
597 ssh                    ;ssh -l username ip_addr/dn
598 
599 startx                          ;进入 X 图形界面
600 
601 stat                    ;显示文件(系统)状态,最近访问时间 atime ( ls stat 等命令不改变访问时间),创建时间(linux文件系统中没有创建时间概念),更改时间(不更改文件内容的其他更改,文件内容更改时同时改变) ctime 用 ls -cl 查看,修改时间(更改文件内容) mtime
602 
603 strace                    ; trace system calls and signals 查看命令执行时具体的过程; strace -s 数量 -o 输出文件 command [args]
604 
605 stty                    ; 改变和打印终端行设定;stty raw; 一次一个字符结束; stty cooked; 一次一行结束
606 
607 su                    ;run a command with substitute user and group ID. 切换用户 su - username
608 
609 sucrack                    ; sucrack -a -w 20 -s 10 -u root -rl a dict.txt
610 
611 sudo                    ;使超级用户的权限; -i 表示作为登陆 shell 使用,重新加载登陆时的文件( /etc/profile 等)
612 
613 switch_root                ; switch to another filesystem as the root of the mount tree
614 
615 symlink                    ;管理系统符号链接,软件包 symlinks
616 
617 sync                    ; flush file system buffers 刷新文件系统缓冲,将内存中改写的数据同步写入磁盘中,最好多运行机次,虽然关机时会自动调用它
618 
619 synclient                ; commandline utility to query and modify Synaptics driver options;synclient touchpadoff=1 开机禁用触摸板
620 
621 syndaemon                ; syndaemon -i 3 -d  打字时暂停触摸板 3秒
622 
623 sysctl                    ; linux 核心配置命令,sysctl -p 使配置立即生效
624 
625 systemd-analyze                ; blame 参数查看启动时各个进程用的时间
626 
627 system-config-printer            ; 打印机
628 
629 systemctl                ;Control the systemd system and service manager
630 
631 setup                    ;系统配置
632 
633 svn                    ; Subversion command line client tool
634 
635 tac                    ; 和 cat 输出顺序相反
636 
637 tail                    ; 显示文件的后10行;-n 显示最后多少行,-c 显示最后多少 k,
638 
639 tar                    ;打包工具
640 
641 tcpdump
642 
643 tee                            ;重定向标准输入输出到多个文件和标准输出,类似 T 型接头; -a 追加文件内容; tee file.c file_1.c ...
644 
645 telnet                        ;远程控制;telnet 192.168.1.2 33
646 
647 tftp                    ; 登陆到 tftp 服务器,tftp 192.168.1.2
648 
649 time                    ;测试程序运行多长时间
650 
651 timedatectl                ; Control the system time and date; timedatectl | gawk -F': ' ' $1 ~ /Time zone/ {print $2}' 显示时区
652 
653 tmux                    ;A terminal multiplexer, 分割屏幕,可在字符界面使用
654 
655 top                          ;动态查看系统进程,系统负载:15,15min,界限是1.00.7正常; -n 表示变化几次退出 top; -b 输出文本模式; -d 输出间隔
656 
657 touch                        ;创建文件,文件已存在时更新时间戳为当前时间; -t 更改时间戳为指定时间,早于1970年1月1日的时间是错误的,格式 [yyyy]MMDDhhmm[.ss] : touch -t 10112200 old_file; -r 更改时间戳和其他文件一样:touch -r source_file targert_file; -c 只修改文件时间戳文件不存在时不创建文件,; -m 修改文件的时间(默认)
658 
659 tr                    ; translate or delete characters from  stdin; 支持正则; cat winfile | tr -d "\r" > linuxfile
660 
661 tshark                    ;wireshark
662 
663 type                    ;命令的位置,命令怎样解释的
664 
665 typeset                    ; 和 declare 一样,用于声明和显示变量
666 
667 ulimit                    ; 打印或设置系统的限制,如最大进程数
668 
669 umask
670 
671 uname                        ;查看系统信息
672 
673 uniq                          ;合并相邻的相同行,常和sort一起用
674 
675 unix2dos                    ; 把 linux 文件格式转换成 windows 文件格式
676 
677 unset                        ;删除环境变量,注意不用$来引用环境变量
678 
679 updatedb                    ; 更新 locate 命令的数据
680 
681 uptime                        ; Tell how long the system has been running
682 
683 useradd                    ;-M不创建用户 home (默认);-m创建用户目录 useradd -m user_test;-d指定主目录名字;-r创建系统用户;-p指定用户密码;-c添加用户备注;-D后跟一个要修改的值的参数;-b更改默认home目录的位置;-e 更改用户的过期日期;-g更改默认的组名;-s更改默认登陆shell
684 
685 userdel                    ;默认只删除/etc/passwd中的信息,-r会删除用户目录和mail目录
686 
687 usermod                        ;-g参数改变默认组,usermod -G shared user;-l改变用户登陆名;-L锁定用户;-U解锁用户;-p修改密码,修改后有点bug; usermod -l NewUser -d /home/NewUser -m OldUser 修改用户名,登陆后使用的路径,登陆名称( groupmod -n NewUser OldName 修改组名称)
688 
689 usleep                    ; sleep some number of microseconds
690 
691 uuencode                ; encode a file into email friendly text; 配合 mail 发送附件,uuencode /home/Wizard/a.dat a.dat | mail -s test 123@qq.com
692 
693 vim
694 
695 vimtutor                ;vim 基本介绍
696 
697 w                    ;Show who is logged on and what they are doing
698 
699 wash                    ; wifi protected setup scan tool;判断目标网络是否开启 wps
700 
701 wc                          ;print newline, word, and byte counts for each file, 不能计算汉语的字数
702 
703 wget                    ;wget http://releases.wikimedia.org/mediawiki/1.26/mediawiki-1.26.0.tar.gz
704 
705 watch                    ;监测一个命令的运行结果,周期性的执行; -n 指定间隔的时间,watch缺省每2秒运行一下程序; -d 高亮显示刚刚变化的区域,-d=cumulative 会把所有变动过的地方都高亮显示; -t 关闭watch命令在顶部的时间间隔; watch -n 1 -d 'pstree|grep http 每隔一秒高亮显示http链接数的变化情况
706 
707 whatis                          ;只列出一行描述命令的信息。
708 
709 whereis                          ;查看文件的位置
710 
711 which                          ;命令的位置,根据 PATH 路径寻找执行档文件
712 
713 who                    ;show who is logged on
714 
715 whois                    ; client for the whois directory service,查询域名的拥有者信息,目前因为网络安全问题这个 whois 所查询到的信息已经不见得是完全正确的
716 
717 wodim                    ;write data to optical disk media
718 
719 wpa_supplicant                  ; Wi-Fi  Protected  Access client and IEEE 802.1X supplicant,wpa_supplicant -B -i wlp3s0 -c<(wpa_passphrase "SSID"  "PASSWD")
720 
721 write                    ;send a message to another user, write username, 作为回答,使用 ctrl d 或者 delete 退出对话,不接收消息用 mesg 命令
722 
723 xclock                    ; 简单的时钟
724 
725 xeyes                    ;娱乐
726 
727 xfs_admin                ;xfs_growfs xfs_repair(修复 XFS 文件系统)
728 
729 xhost                    ; server access control program for X; xhost +
730 
731 xkill                    ; kill a client by its X resource
732 
733 xxd                    ;creates  a  hex  dump  of a given file or standard input and reverse; -r 恢复; -b 二进制
734 
735 zsh
736 
737 
738 
739 tips
740 
741 
742 使用 sudo 执行命令时不会提示确认信息。
743 非 root 用户也可以使用 poweroff 命令关闭计算机。
744 "--" in some commands means the rest of command is not option.

 

posted @ 2015-06-24 16:03  little-snake  阅读(580)  评论(0编辑  收藏  举报