大学时光过得真快,在毕业来临前,打算认真过一遍linux知识点。
其实更重要的原因是,毕业设计需要使用到linux环境,学习linux这个大家伙的旅程就这样开始了。。。。
书本共有37章,每文概括5章内容,共8篇。
第一章1-引言
1.1 为什么使用命令行 命令行cli 可以做 比 gui 更复杂的任务 更高效
1.2 这本书讲什么
如何使用命令行为我们工作
1.3 谁应该读这本书
有windows经验 没有linux经验的用户
1.4 这本书的内容
分5大部分-循序渐进
1.5 怎样阅读这本书
从头到尾-上机体验
第二章2-shell
2.1 终端仿真器
市面上的linux封装好的终端-附带些花桥功能2.2 随意输入
提示符显示,用户名@主机名+当前目录[seven@localhost 桌面]$ 555
bash: 555: command not found2.3 命令历史
按上下箭头
2.4 移动光标编辑
按左右箭头
2.5 关于鼠标和光标
鼠标拖黑即刻复制,鼠标中键粘贴,ctrl+c\v 不可使用
2.6 简单命令
[seven@localhost 桌面]$ data
bash: data: command not found
[seven@localhost 桌面]$ date
2019年 03月 04日 星期一 19:09:08 PST
[seven@localhost 桌面]$ cal
三月 2019
日 一 二 三 四 五 六
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
[seven@localhost 桌面]$
[seven@localhost 桌面]$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda2 13498888 2780676 10025836 22% /
tmpfs 501512 444 501068 1% /dev/shm
/dev/sda1 289293 34892 239041 13% /boot2.7 结束终端会话
[seven@localhost 桌面]$ exit
2.8 幕后控制台
cli有:alt+f1-f6,gui:alt+f7
第三章3-文件系统跳转3.1 理解文件系统树
一棵树型目录又叫文件夹,windows 每个存储设备都有独立的文件系统
但是 linux 中 只有单一的文件系统树
3.2 当前工作目录
文件系统是一棵倒立的树,我们处于其中一个目录里面。
首次登陆系统后,当前工作目录是我的主目录。
普通用户的写入权限,限制在他的主目录中。
[root@localhost 桌面]# pwd
/home/seven/桌面
[root@localhost 桌面]# who am i
seven pts/0 2019-02-26 21:22 (:0.0)
[root@localhost 桌面]# su root
[root@localhost 桌面]# who am i
seven pts/0 2019-02-26 21:22 (:0.0)
[root@localhost 桌面]# su seven
[seven@localhost 桌面]$ who am i
seven pts/0 2019-02-26 21:22 (:0.0)
[seven@localhost 桌面]$ pwd
/home/seven/桌面3.3 列出目录内容
[seven@localhost 桌面]$ ls
test.py3.4 更改当前工作目录
使用 cd 命令3.5 绝对路径
从根目录开始写,紧跟着分支。
[seven@localhost bin]$ cd /usr/bin
[seven@localhost bin]$ pwd
/usr/bin
[seven@localhost bin]$ ls3.6 相对路径
. 表示当前目录 ..表示父目录
[seven@localhost bin]$ cd
[seven@localhost ~]$ pwd
/home/seven
[seven@localhost ~]$ cd /usr/bin
[seven@localhost bin]$ pwd
/usr/bin
[seven@localhost bin]$ cd /usr
[seven@localhost usr]$ pwd
/usr
[seven@localhost usr]$ cd ./bin
[seven@localhost bin]$ pwd
/usr/bin
[seven@localhost bin]$ cd bin
bash: cd: bin: 没有那个文件或目录3.7 有用的快捷键
cd :更改工作目录到主目录
cd - :退回
linux命令行入门(一) 《The Linux Command Line》
最新推荐文章于 2024-12-14 01:09:10 发布