深入浅出Linux常用命令

Linux 命令大全

中断进程

ctrl z 和 c 有什么区别?

待完善

jar包相关命令

jar包启动

java -jar xxx.jar
java -jar xxx.jar &

nohup java -jar xxx.jar
nohup java -jar xxx.jar &

以上4种形式的启动有什么区别,带&的可以后台运行。

nohup: 忽略输入并把输出追加到"nohup.out"

查找端口情况

netstat

在这里插入图片描述
-t – 显示 TCP 端口。
-u – 显示 UDP 端口。
-n – 显示数字地址而不是主机名。
-l – 仅显示侦听端口。
-p – 显示进程的 PID 和名称。

netstat -nltp
netstat -nltp | grep 8889

netstat -tunlp
netstat -tnlp | grep :8889

ss

在这里插入图片描述

systemctl

systemctl start firewalld
systemctl stop firewalld
systemctl status firewalld

磁盘空间

df

在这里插入图片描述

df
df -h

在这里插入图片描述

du

在这里插入图片描述

history

历史命令

whereis

在这里插入图片描述

whereis nginx 

在这里插入图片描述

find

在这里插入图片描述

curl

 curl http://www.baidu.com

在这里插入图片描述

ip

在这里插入图片描述

ip a

ps

在这里插入图片描述

ps -ef|grep

ps -ef|grep redis

内存

free

free
free -h 

在这里插入图片描述

磁盘

df
df -h

在这里插入图片描述
查看当前路径下的文件大小

du -sh *

在这里插入图片描述

vmstat

在这里插入图片描述

mkdir 创建文件夹

在这里插入图片描述
重复创建文件夹
在这里插入图片描述

top

top命令可以对进程的资源占用进行一个统计,进入top命令后按 shift + m,可以按内存排序找到大内存应用。

防火墙

systemctl start firewalld
systemctl stop firewalld
systemctl status firewalld

touch

[root@localhost ~]# touch --help
用法:touch [选项]... 文件...
Update the access and modification times of each FILE to the current time.

A FILE argument that does not exist is created empty, unless -c or -h
is supplied.

A FILE argument string of - is handled specially and causes touch to
change the times of the file associated with standard output.

Mandatory arguments to long options are mandatory for short options too.
touch help.txt 如果不存在则会创建文件
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值