Linux 系统信息查看与链接操作任务

作业内容:

#08查看系统合法shell

cat /etc/shells

#09查看系统发行版版本

cat /etc/redhat-release

#10查看系统内核版本

uname -r


#11临时和永久修改主机名

临时:

hostname haha

永久:

hostnamectl hostname haha
查看hostnamectl


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

echo $PATH


#13查看passwd指令的执行路径

which passwd


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

mkdir /mulu
ln -s /yasuo/ssh_config /mulu/ssh_config.link


#15创建目录/mulu ,重命名并移动/ssh_config.link

 mv /mulu/ssh_config.link /root/ssh_cfg.link  ---移动root目录下,然后改名为ssh_cfg.link


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

find /dev -type b


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

cp /etc/passwd /etc/ssh/sshd__config /root/etc


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

cp /var/log/messages /root

[root@haha /]# mkdir -p /yasuo/dir1
[root@haha /]# touch /yasuo/dir1/hostname
[root@haha /]# touch /yasuo/dir1/hostname02
[root@haha /]# touch /yasuo/dir1/passwd
[root@haha /]# touch /yasuo/dir1/ssh_config
[root@haha /]# touch /yasuo/dir1/sshd
[root@haha /]# touch /yasuo/hostname
[root@haha /]# touch /yasuo/passwd
[root@haha /]# touch /yasuo/hostname02
[root@haha /]# touch /yasuo/ssh_config
[root@haha /]# touch /yasuo/sshd
 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值