打印

[原创] 第二部分 Linux系统管理

本主题被作者加入到个人文集中

第二部分 Linux系统管理

第一章 Linux Shell环境
实验1、使用shell工具和命令
一、实验目标:
练习并掌握X-Windows环境中的系统管理工具、文件管理工具、网络管理工具、系统安全管理工具的使用。练习并初步掌握系统命令、文件命令、网络命令、系统安全命令的基本使用方法。

二、实验环境:

实验环境同实验1

三、实验步骤:

1、更改登录时的默认shell
使用chsh命令列出系统中可以使用的shell并更改登录的默认shell环境。
[zpeicn@x-study-as4 ~]$ chsh --list
/bin/bash
/bin/ksh
……
……
/bin/zsh
[zpeicn@x-study-as4 ~]$
[zpeicn@x-study-as4 ~]$ chsh
Changing shell for zpeicn.
Password:
New shell [/bin/bash]: /bin/ksh
Shell changed.
[zpeicn@x-study-as4 ~]$exit
退出系统后,当用户再次登陆系统时,使用的shell就变成了ksh。

2、在系统中查找指定的文件
A、根据文件名查找grub.conf文件:
[root@x-study root]#find / -name grub.conf

B、根据部分文件名查找方法包含有abvd这4个字:
[root@x-study root]#find / -name '*abvd*'

3、修改用户密码

A、root修改普通用户的密码:
[[root@x-study boot]# passwd zpeicn
Changing password for user zpeicn.
New UNIX password:
BAD PASSWORD: it does not contain enough DIFFERENT characters
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[[root@x-study boot]#

B、用户修改自己的密码:
[zpeicn@x-study-as4 ~]$ passwd
Changing password for user zpeicn.
Changing password for zpeicn
(current) UNIX password:
New UNIX password:
BAD PASSWORD: it is too simplistic/systematic
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[zpeicn@x-study-as4 ~]$
注意:
当普通用户修改密码的时候,首先需要输入当前的密码,同时新的密码必须够复杂才能够被系统接受。
四、实验难点
这章实验的难点主要是命令的使用,对于习惯于在图形环境下工作的用户来说,很难一下转变过来,因此在做试验的时候,建议能够根据教材中相关的图形工具进行对比,以便能尽快适应命令行的工作模式。
五、实验回顾
在这一章中涉及到的命令很多,仅仅通过上面的简单实验是无法完全掌握本章的内容。建议根据教材的内容,尽可能的逐个命令和工具进行试验,以便更好的掌握本章内容。

TOP