cat [OPTION]... [FILE]... // Concatenate ( FILE(s) to standard ouput.
chmod [OPTION]... MODE[.MODE]... FILE...// Change the mode of each FILE to MODE.
mv [OPTION]... [-T] SOURCE DEST // Rename SOURCE to DEST
mv [OPTION]... SORUCE... DIRECTORY // move SOURCE(s) to DIRECTORY
rm [OPTION]... [FILE]... // remove files or directories
touch [OPTION]... [FILE]... // change file timestamps
cp [OPTION]... [-T] SOURCE DEST // Copy SOURCE to DEST
cp [OPTION]... SOURCE... DIRECTORY // Copy multiple SOURCE(s) to DIRECTORY
文档编辑
grep [OPTION...] PATTERNS [FILE...] // searches for PATTERNS in each FILE, and grep prints each line that matches a pattern.
look [-bdf] [-t termchar] string [file ...] //The look utility displays any lines in file which contain string as a prefix.
sed [OPTION]... {script-only-if-no-other-script} [input-file]...// stream editor for filtering and transforming text.
sort [OPTION]... [FILE]... // write sorted concatenation of all FILE(s) to standard output.
sort [OPTION]... --files0-from=F // with no FILE, or when FILE is -, read standard input.
文件传输
ftp [-46pinegvd] [host [port]] // Ftp is the user interface to the Internet standard File Transfer Protocol. The program allows a user to transfer files to and from a remote network site.
磁盘管理
cd [dir] // Change the shell working directory.
mkdir [OPTION]... DIRECTORY... // Create the DIRECTORY(ies), if they do not already exist.
pwd [-LP] // Print the name of the current working directory.
ls [OPTION]... [FILE]... // list directory contents
磁盘维护
cfdisk [options] [device] // display a manipulate a disk partition table
网络通讯
ifconfig // configure a network interface, if a single -a argument is given, it displays the status of all interfaces, even those that are down.
netstat // Print network connections, routing tables, interface statistics, etc.
ping // send ICMP ECHO_REQUEST to network hosts
系统管理
date [OPTION]... [+FORMAT] // Display the current time in the given FORMAT, or set the system date.
kill [OPTIONS] <pid> [...] // send a signal to a process, the default signal for kill is term.
ps [OPTIONS] // report a snapshot of the current processes.
top // display Linux processes
who // show who is logged on
系统设置
clear // clear the terminal screen
备份压缩
gzip [OPTION]... [FILE]... // Compress or uncompress FILEs
tar [OPTION...] [FILE]... // GNU 'tar' saves many files together into a single tape or disk archive, and can restore individual files from the archive.
zip // package and compress (archive) files
unzip // test and extract compressed files in a ZIP archive
设备管理
setled // set the keyboard leds
实例
# 显示网络设备信息
ifconfig
# 启动关闭指定网卡
if config eth0 down
if config eth0 up
# 为网卡配置和删除IPv6地址
ifconfig th0 add 33fe:3240:800:1005::2/ 64
ifconfig th0 del 33fe:3240:800:1005::2/ 64
#给eth0网卡配置IP地址,加上子掩码,加上广播地址
ifconfig eth0 192.168.1.56 netmask 255.255.255.0 broadcast 192.168.1.255
# 显示详细的网络状况
netstat -a
# 显示当前户籍UDP连接状况
netstat -nu
# 显示当前户籍UDP连接状况
netstat -apu
# 显示网卡列表
netstat -i
# 显示网络统计信息
netstat -s
# 检测是否与主机联通
ping www.baidu.com
# 显示进程信息
top
# 显示指定的进程信息
top -p 139