2021年9月19日

0 hostname -I

 

1 free -h

查看内存资源

 

2 runlevel

   init 0关机

   init 3 启动文字

   init 5 启动图形

   init6 重启

 

3 gedit 图形编辑器

 

4 nano 文本编辑器

 

5 /etc/ 相当于Windows注册表

   /etc/motd 相当于欢迎词

   /etc/issue 相当于登录前提示

6

 

echo $SHELL

cat etc/shells

 

7

hostname NAME 设置主机名(临时更改)

/etc/hostname

hostnamectl set-hostname www.lijian.com

 

8

sudo -i 切换为管理员账号

 

9 whoami

   who am i

   who

 

10

echo $PS1

PS1=lijian

/etc/profile.d/env.sh (centos支持)

echo 'PS1="\[\e[1;32m\][\t \[\e[1;33m\]\u\[\e[35m\]@\h\[\e[1;31m\] \W\[\e[1;32m\]]\[\e[0m\]\\$"' > /etc/profile.d/env.sh
 
11
ctrl +a 到行首
ctrl +e 到行位
ctrl +u 光标到删除行首
ctrl +k 光标到删除行尾
posted @ 2021-09-20 00:09  远东妖刀  阅读(30)  评论(0)    收藏  举报