通用
当前文件夹下生成指定体积的文件
1 |
dd if=/dev/zero of=test.bin bs=1M count=10 |
Ubuntu
ssh配置
1 2 |
# /etc/ssh/sshd_config # service ssh restart |
修改主机名称
1 |
# hostname 新主机名 //临时修改,重登生效,重启失效. |
CentOS
查看CentOS版本:rpm -q centos-release
1 2 |
# rpm -q centos-release centos-release-6-8.el6.centos.12.3.x86_64 |
查看发行版本:cat /etc/redhat-release
1 2 |
[root@centos6 ~]# cat /etc/redhat-release CentOS release 6.8 (Final) |
查看内核:uname -r
1 2 |
[root@centos6 ~]# uname -r 2.6.32-642.6.1.el6.x86_64 |
查看内核:uname -a
1 2 |
[root@centos6 ~]# uname -a Linux centos6 2.6.32-642.6.1.el6.x86_64 #1 SMP Wed Oct 5 00:36:12 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux |
CentOS6.8 防火墙命令:
1 2 3 4 5 6 |
查询防火墙:[root@localhost ~]# service iptables status 停止防火墙:[root@localhost ~]# service iptables stop 启动防火墙:[root@localhost ~]# service iptables start 重启防火墙:[root@localhost ~]# service iptables restart 永久关闭墙:[root@localhost ~]# chkconfig iptables off 永久启用墙:[root@localhost ~]# chkconfig iptables on (永久关闭后启用) |