Linux文件管理
## 1.Linux系统目录结构
![1624357704872](C:\Users\slight star\AppData\Roaming\Typora\typora-user-images\1624357704872.png)
![1624357732346](C:\Users\slight star\AppData\Roaming\Typora\typora-user-images\1624357732346.png)
![1624357877063](C:\Users\slight star\AppData\Roaming\Typora\typora-user-images\1624357877063.png)
![1624357936407](C:\Users\slight star\AppData\Roaming\Typora\typora-user-images\1624357936407.png)
1.查看当前路径下所有文件
![1624358219714](C:\Users\slight star\AppData\Roaming\Typora\typora-user-images\1624358219714.png)
2.查看根目录下所有文件
![1624358271703](C:\Users\slight star\AppData\Roaming\Typora\typora-user-images\1624358271703.png)
3.跳转到etc文件夹下,查看etc下面有哪些文件
![1624358328899](C:\Users\slight star\AppData\Roaming\Typora\typora-user-images\1624358328899.png)
4.在当前目录查看passwd的所有内容
![1624358371124](C:\Users\slight star\AppData\Roaming\Typora\typora-user-images\1624358371124.png)
5.查看passwd前2行的内容
![1624358610737](C:\Users\slight star\AppData\Roaming\Typora\typora-user-images\1624358610737.png)
6.查看passwd后3行的内容
![1624358649860](C:\Users\slight star\AppData\Roaming\Typora\typora-user-images\1624358649860.png)
7.不熟悉cat 命令,用man命令
![1624358817679](C:\Users\slight star\AppData\Roaming\Typora\typora-user-images\1624358817679.png)
## 2.Linux服务与日志
#### 2.1服务的基本概念
![1624358984484](C:\Users\slight star\AppData\Roaming\Typora\typora-user-images\1624358984484.png)
#### 2.2常见的服务管理方式(systemd方式)
![1624359046110](C:\Users\slight star\AppData\Roaming\Typora\typora-user-images\1624359046110.png)
1.查看cron的运行状态
![1624359463298](C:\Users\slight star\AppData\Roaming\Typora\typora-user-images\1624359463298.png)
2.重启后再查看cron命令
![1624359639871](C:\Users\slight star\AppData\Roaming\Typora\typora-user-images\1624359639871.png)
#### 2.3 日志与日志的查询方式
![1624359671391](C:\Users\slight star\AppData\Roaming\Typora\typora-user-images\1624359671391.png)
1.查看cron的日志
![1624359787365](C:\Users\slight star\AppData\Roaming\Typora\typora-user-images\1624359787365.png)
2.查看ssh服务的日志时,发现看不了,没有这个服务
![1624360229559](C:\Users\slight star\AppData\Roaming\Typora\typora-user-images\1624360229559.png)
那么安装ssh服务,这样windows主机就可以通过ssh访问虚拟机
![1624360332485](C:\Users\slight star\AppData\Roaming\Typora\typora-user-images\1624360332485.png)
再次查看ssh服务的日志
![1624360358296](C:\Users\slight star\AppData\Roaming\Typora\typora-user-images\1624360358296.png)
3.以下内容我试了,对ubuntu系统不生效,这是Alibaba Cloud Linux下应该生效
![1624360449857](C:\Users\slight star\AppData\Roaming\Typora\typora-user-images\1624360449857.png)