云计算作业

云计算作业

Linux

DAY1[08/09]

1、创建alan1用户,并使用root'用户切换用户至alan1用户。(两种方式切换【加-与不加-】,并总结其效果)

[root@localhost ~]# useradd alan1
[root@localhost ~]# su alan1
[alan1@localhost root]$ pwd
/root
[alan1@localhost root]$ exit
exit
[root@localhost ~]# su - alan1
上一次登录:三 8月  9 18:48:14 CST 2023pts/0 上
[alan1@localhost ~]$ pwd
/home/alan1
[alan1@localhost ~]$ #su 切换用户时,改变登录的用户名,不改变其家目录;su - 切换到普通用户时,不仅改变用户名,还改变了它所在的家目录
​

2、(预习看效果)查看本地时间,要求只显示分钟、小时、秒

[root@localhost ~]# date +%X
10时22分59秒

3、查看/root下的文件信息,分别简单显示、人性化显示、详细显示以及显示隐藏文件。

[root@localhost ~]# #简单显示ls,人性化显示ll -h,详细显示ll ,隐藏文件ls -a
[root@localhost ~]# ls /root
1.txt  a  anaconda-ks.cfg  b  c  qianfeng
[root@localhost ~]# ll -h /root
总用量 4.0K
-rw-r--r--. 1 root root    0 8月   8 18:31 1.txt
-rw-r--r--. 1 root root    0 8月   8 13:48 a
-rw-------. 1 root root 1.3K 8月   8 11:38 anaconda-ks.cfg
-rw-r--r--. 1 root root    0 8月   8 13:48 b
-rw-r--r--. 1 root root    0 8月   8 13:48 c
drwxr-xr-x. 3 root root   18 8月   8 18:31 qianfeng
[root@localhost ~]# ll /root
总用量 4
-rw-r--r--. 1 root root    0 8月   8 18:31 1.txt
-rw-r--r--. 1 root root    0 8月   8 13:48 a
-rw-------. 1 root root 1253 8月   8 11:38 anaconda-ks.cfg
-rw-r--r--. 1 root root    0 8月   8 13:48 b
-rw-r--r--. 1 root root    0 8月   8 13:48 c
drwxr-xr-x. 3 root root   18 8月   8 18:31 qianfeng
[root@localhost ~]# ls -a /root
.   1.txt  anaconda-ks.cfg  .bash_history  .bash_profile  c       qianfeng
..  a      b                .bash_logout   .bashrc        .cshrc  .tcshrc
​
ls -d 显示当前文件夹的家目录 ll -d 查看当前文件的详细信息和家目录;
[root@localhost ~]# ls -a /home 
.  ..  alan1  tony1  tony2  tony3  tony4
[root@localhost ~]#  ls -ahl /home
总用量 0
drwxr-xr-x.  7 root  root   71 8月   9 18:48 .
dr-xr-xr-x. 17 root  root  224 8月   8 11:37 ..
drwx------.  2 alan1 alan1  83 8月   9 18:48 alan1
drwx------.  2 tony1 tony1  92 8月   9 16:55 tony1
drwx------.  2 tony2 tony2  83 8月   9 16:49 tony2
drwx------.  2  1002  1002  62 8月   9 11:10 tony3
drwx------.  2 tony4 tony4  62 8月   9 11:10 tony4
[root@localhost ~]# ls -ahld /home
drwxr-xr-x. 7 root root 71 8月   9 18:48 /home
​
​
​

4.Linux发行版有哪些?名字

中国:centOS
西方 ubantu

5.红帽认证是什么(搜百度)?

红帽认证[技师]/系统管理员(RHCSA),红帽认证[工程师](RHCE)和红帽认证[架构师](RHCA)
​
RHCA五门课程和考试
RHS333 Red Hat Enterprise Security: Network Services(安全:网络服务)
RH401 Red Hat Enterprise Deployment, Virtualization, and Systems Management(部署和系统管理员)
RH423 Red Hat Enterprise Directory Services and Authentication(目录服务和认证)
Clusterin英/ˈklʌstərɪŋ/集群
 Red Hat Enterprise Clustering and Storage Management(存储管理)
​
RH442 Red Hat Enterprise System Monitoring and Performance Tuning(系统监控和性能调整)

6.服务器的品牌有哪些?【中关村在线搜索】

超聚变,戴尔,浪潮,H3C,华为,惠普
1超聚变FusionServer 2288H价格面议
2戴尔易安信PowerEdge R740¥21397
3浪潮英信NF5280M6¥19399
4H3C UniServer R4900 G3(¥17099
5华为FusionServer RH2288H¥11987
6HP ProLiant DL380 Gen10(¥39800
7H3C UniServer R4900 G5价格面议
8超聚变FusionServer 2288H价格面议
9浪潮英信NF5280M5¥18300
10浪潮英信NF5270M6

7.找到CentOS官网进去查看一下。

8.安装一台centos虚拟机,要求该虚拟机安装成功后安装自动补全插件(bash-completion)。

yum -y install bash-completion

9.删除用户时,必须加-r,否则邮箱和家目录无法删除掉;当删除成功时显示提示信息加-v命令例如 rm -rfv

[root@localhost ~]# useradd heihei
[root@localhost ~]# ls /home
alan1  heihei  tony1  tony2  tony4
[root@localhost ~]# userdel heihei
[root@localhost ~]# ls /home
alan1  heihei  tony1  tony2  tony4
[root@localhost ~]# ls /var/spool/mail/
alan1  heihei  tony1  tony2  tony3  tony4
[root@localhost ~]# id heihei
id: heihei: no such user
[root@localhost ~]# rm -rf /home/heiehi
[root@localhost ~]# rm -rvf /var/spool/mail/heihei
已删除"/var/spool/mail/heihei"
​

DAY2

你可能感兴趣的:(云计算)