Linux 从入门到放弃

Linux常用命令总结

***.deb 软件的安装,卸载

dpkg -i path/FILE_NAME.deb					// 安装
dpkg -l | grep FILE_NAME					// 过滤已经安装的软件信息
dpkg apt-get remove --purge FILE			// 卸载软件,依赖于上面过滤出的软件信息,一般无法根据安装包的名称进行卸载
文件管理
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

Note

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值