linux命令行入门(一) 《The Linux Command Line》

本文作为《The Linux Command Line》的概述,介绍了为何选择命令行,书籍的主要内容,适合的读者群体,以及如何阅读。内容包括shell的基础知识,如终端仿真器、命令历史、光标编辑等,并逐步讲解了文件系统、操作系统、文件和目录的操作,如ls、cd、cp、mv、rm、ln等命令的使用,是Linux初学者的入门教程。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

大学时光过得真快,在毕业来临前,打算认真过一遍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 found

2.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% /boot

2.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.py

3.4 更改当前工作目录
        使用 cd 命令

3.5 绝对路径
        从根目录开始写,紧跟着分支。
        [seven@localhost bin]$ cd /usr/bin
        [seven@localhost bin]$ pwd
        /usr/bin
        [seven@localhost bin]$ ls

3.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 - :退回

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值