Linux Redhat 指令

08 查看系统合法shell

[root@localhost ~]# cat /etc/shells

09 查看系统发行版版本

[root@localhost ~]# cat /etc/redhat-release

10 查看系统内核版本

[root@localhost ~]# uname -a

11 临时修改主机名

[root@localhost ~]# hostname haha

12 查看系统指令的查找路径

[root@haha ~]# echo $PATH

13 查看passwd指令的执行路径

[root@haha ~]# which passwd

14 为/yasuo/ssh_config文件在/mulu目录下创建软链接,软链接名为ssh_config.link

[root@haha ~]# ln -s /yasuo/ssh_config /mulu/ssh_config.link

15 创建目录/mulu,并将/mulu下的软链接重命名并移动/ssh_config.link

[root@haha ~]# mv /mulu/ssh_config.link  /ssh_config

16 找到你的根目录下的所有块设备文件

[root@haha ~]# find / -type b

17 将/etc/passwd和/etc/ssh/sshd_config文件复制到/root/etc目录下

[root@haha ~]# mkdir /root/etc/
[root@haha ~]# cp /etc/passwd /etc/ssh/ssh_config /root/etc/

18 复制/var/log/messages到/root目录下

[root@haha ~]# cp /var/log/messages /root

 

 

[root@haha ~]# ll /yasuo/dir1
[root@haha ~]# mkdir -p /yasuo/dir1
[root@haha ~]# cp /etc/hostname  /yasuo/dir1/
[root@haha ~]# cp /etc/hostname  /yasuo/dir1/hostname02
[root@haha ~]# cp /etc/passwd  /yasuo/dir1/
[root@haha ~]# cp /etc/ssh/ssh_config  /yasuo/dir1/sshd
[root@haha ~]# cp /yasuo/dir1/*  /yasuo/
[root@haha ~]# tree /yasuo

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值