RHLCSA初步学习

RHLCSA初步学习

  • 如何在创建一个虚拟机后修改删除或修改root的密码?
1.Reboot the system.
2.Interrupt the boot loader count down by pressing anykey.
3.Move the cursor to the entry that needs to be booted.
4.Press “e” to edit the select edentry.
5.Move the cursor to the kernel command line(the line that start swith linux16.
6.Append rd.break.
7.Press Ctrl+x to start.
8.Remount /sysroot as read-write.

switch_root:/# mount -o remount,rw /sysroot 
switch_root:/# chroot /sysroot
sh-4.2# passwd [root]   (change the root password)
or
sh-4.2# passwd -d root  (delete the root password)
sh-4.2# touch /.autorelabel
sh-4.2# exit
switch_root:/# exit
  • 命令提示符的区分:#和$

$表示在普通用户之下,#表示在root用户之下

  • 一些简单的命令

cd 切换目录(其中/是指根目录,~是指家目录)

cd ~ 切换到到家目录
cd ~+用户 直接切换到指定用户的家目录
cd - 在上一个目录与当前目录之间来回切换

su 切换用户

su - haha 切换用户环境
su haha 不切换用户环境

绝对路径 cd /home/redhat
相对路径:

 cd /  
 cd home   
 cd redhat

. 当前目录
… 上级目录

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值