一、修改主机名:
[root@rhcsa0801 ~]# hostnamectl hostname rhcsa
二、设置时区:
[root@rhcsa ~]# timedatectl set-timezone Asia/shanghai Failed to set time zone: Invalid or not installed time zone 'Asia/shanghai'
三、创建目录:
[root@rhcsa ~]# mkdir -pv /home/file1 mkdir: 已创建目录 '/home/file1' [root@rhcsa ~]# mkdir -pv /root/dir1 mkdir: 已创建目录 '/root/dir1' [root@rhcsa ~]# mkdir -pv /home/dir1 mkdir: 已创建目录 '/home/dir1' [root@rhcsa ~]# mkdir -pv /root/file1 mkdir: 已创建目录 '/root/file1
四、在file1写入内容:
[root@rhcsa ~]# echo hello, welcome to home >>/home/file1 -bash: /home/file1: 是一个目录 [root@rhcsa ~]# touch /root/file1{hello,welcome to home} [root@rhcsa ~]# cat /home/file1 cat: /home/file1: 是一个目录 [root@rhcsa ~]# echo taimedatectl status this is adminstor>> /root/file1 -bash: /root/file1: 是一个目录
五、创建新文件:
[root@rhcsa ~]# mkdir -pv /root/file1 /file2 mkdir: 已创建目录 '/file2' 其余内容同上