linux常用命令

查看linux操作系统用户是否被锁

[root@localhost ~]# pam_tally2 -u Urstrong2
Login Failures Latest failure From
Urstrong2 8 01/15/21 15:45:50 60.1.250.10
[root@localhost ~]# pam_tally2 -u Urstrong2 --reset
Login Failures Latest failure From
Urstrong2 8 01/15/21 15:45:50 60.1.250.10
[root@localhost ~]# pam_tally2 -u Urstrong2 --reset
Login Failures Latest failure From
Urstrong2 0

查看库文件是64位还是32位:
objdump -a *
查看端口占用
ss -lntpd | grep :5432
netstat -ntlp //查看当前所有tcp端口

查看已经删除的空间被哪些进程占用
lsof |grep -i delete

netstat -tunlp |grep 端口号,用于查看指定的端口号的进程情况


1). 通过命令: ctrl + z 来将当前的命令暂停。
2.) 通过命令:bg 来启动后台暂停的任务。


上传下载:lrzsz

问题:bash: ip command not found
解决办法: yum -y install initscripts

yum补全:yum install bash-completion
Ssh :yum install openssh-server.aarch64
Ifconfig :yum install net-tools -y
SELinux :yum install selinux-policy -y ##SELinux 表示 Security-Enhanced Linux,是内核级别的安全模块。 getenforce setenforce 0
安装iptables :yum install iptables-services -y

查看内核:cat /proc/cpuinfo | grep processor|wc -l

批量替换
sed -i "s/原字符串/新字符串/g" 文件


防火墙:
##iptables -F清除所有规则来暂时停止防火墙
(警告:这只适合在没有配置防火墙的环境中,如果已经配置过默认规则为deny的环境,此步骤将使系统的所有网络访问中断)

service iptables stop

chkconfig iptables off

 

posted on 2021-01-15 16:08  踏入IT的小贾  阅读(57)  评论(0编辑  收藏  举报

导航