1.什么是Linux
Linux
操作系统
GNU
/
Linux
GUN
是开源组织
Linux
是指
Linux
内核
内核
系统核心程序
相当人的大脑
负责系统
2.
什么是
shel
shell
对外提供操作这和系统沟通借口
对内实现对内核进行保护
RHEL8
中默认使用的
shell
是
bash
3.
shell
行提示符的含义
shell
类型
rhel8
中默认使用的
shell
为
bash
bash
=
GNU Bourne
-
Again SHell
shell
打开方式
1.
右键打开
2.
Application
----
>
favorite
----
>
terminal
3.
gome
-
terminal
shell
命令行提示符
[root
@localhost
Desktop]#
[
1
] [
2
] [
3
] [
4
] [
5
]
[
1
]
:
运行
shell
的用户
[
2
]
:
分割符
[
3
]
:
系统主机短名称当前主机去掉域名部分的短名称
[
4
]
:
当前目录名称
[
5
]
:
身份提示符
#
表示当前用户为超级用户,
$
当前用户为普通用户
4.
shell
中的快捷键
1.
shell
中的快捷键使用
<
ctrl
>+<
shift
>+<
T
>
在
一
个
terminal
中开启多个窗口
<
ctrl
>+<
shift
>+<
N
>
重新打开
一
个
terminal
<
ctrl
>+<
c
>
取消命令执行
<
ctrl
>+<
d
>
关闭
shell
<
ctrl
>+<
shift
>+<
鼠标选中
>+<
c
>
复制选中字符
<
ctrl
>+<
shift
>+<
v
>
粘贴
鼠标选中为复制
鼠标滚轮下按为粘贴
2.
shell
中如何执行命令
1
)
命令执行格式
命令 参数 对象
命令就是程序
参数表示命令的特殊功能
对象就是操作目标
2
)
命令执行的方法
有些命令可以单独执行
参数可以加多个
-
a
-
b
-
c
= -
abc
= -
cba
= -
acb
命令必须在行提示符之后输入否则命令无法执行
当命令行被占用通常使用
<
ctrl
>+<
c
>
结束占用命令行的程序来释放命令行
5.
命令行获得帮助
whatis
查看命令的基本用途
查看过程中出现
rm
:
nothing appropriate.
1.
表示要查看内容没有帮助
2.
系统帮助数据未更新用
mandb
命令更新
![](https://img-blog.csdnimg.cn/20200410104405571.png)
--
help ##
查看命令的基本用法
[]
内容可加可不加
...
内容个数任意
<>
必须在命令执行时加入的元素
![](https://img-blog.csdnimg.cn/20200410104527150.png)
![](https://img-blog.csdnimg.cn/20200410104555718.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80NTkzMTQwOQ==,size_16,color_FFFFFF,t_70)
man
命令用法详解
man
是
manual
的缩写
![](https://img-blog.csdnimg.cn/20200410104657616.png)
![](https://img-blog.csdnimg.cn/20200410104720624.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80NTkzMTQwOQ==,size_16,color_FFFFFF,t_70)
man rm
进入到
rm
命令的帮助
q
退出
/
关键字
搜索关键字,
n
向下匹配,
N
向上匹配
G
快速移动到
man
的最后
g
表示快速移动到
man
的最前
6.
Linux
命令行历史调用
我们当前使用的
shell
可以记录系统中执行过的历史命令
history
查看历史命令
history
-
c
清空当前历史命令
永久清空历史需要清空文件
.bash_history
![](https://img-blog.csdnimg.cn/20200410104926308.png)