700字范文,内容丰富有趣,生活中的好帮手!
700字范文 > 原版英文书籍《Linux命令行》阅读记录1 | 什么是shell?

原版英文书籍《Linux命令行》阅读记录1 | 什么是shell?

时间:2019-11-07 08:49:32

相关推荐

原版英文书籍《Linux命令行》阅读记录1 | 什么是shell?

背景:

阅读英文原作只为了更好地理解书中的精髓,当然也是为了更好地掌握书中的技巧。我们会坚持阅读全书,并记录书中的精髓。

1. 理解 Linux 的 “自由”

Many people speak of "freedom" with regard to Linux. Freedom is the power to decide what your computer does and the only way to have this freedom is to know what your computer is doing. Freedom is a computer that is without any secrets, one where everything can be known if you care enough to find it.

很多人一说到Linux, 就会说自由。但是你真的而理解这种自由吗?这种自由是一种权力,能够决定你的计算机干什么,获取这种自由的唯一方式就是知道你的计算机在做什么。自由就是你的计算机没有任何㊙️,你可以从计算机那里了解一切,只要你用心去寻找。

2. 什么是 shell

We speak of the command line, we are really referring to the shell. The shell is a program that takes keyboard commands and passes them to the operating system to carry out.

一说起命令行,我们真正指的是 shell。shell 就是一个程序,把键盘的输入传递给操作系统去执行。

3. 初次相遇 shell

第一次见到 shell,你只会看到一行提示符,形如:[me@linuxbox ~]$

This is called a shell prompt and it will appear whenever the shell is ready to accept input.

这叫做 shell 提示符, 无论何时当 shell 准备好接受输入时,就会闲这样的提示符。当然,出现的形式会根据不同的 Linux 发行版有所不同。但是大体上会包含主机名用户名当前目录和一个美元符号

?另外,如果提示符最后是 # 号,而不是 $,会表示这是一个具有 super root 权限的终端。

3. 一些简单入门的小命令

命令历史:使用 ⬆️ 箭头可以浏览以往的命令,以往的命令会重新出现在提示符后面。

移动光标:使用 ⬅️ ➡️ 箭头可以移动光标,来更好地编辑命令。

时间:date 显示系统当前时间和日期

[me@linuxbox ~]$ dateSun Sep 30 10:02:00 CST

日历:cal 与上一个命令相关,默认显示当前月份的日历。

[me@linuxbox ~]$ calSeptember Su Mo Tu We Th Fr Sa12 3 4 5 6 7 89 10 11 12 13 14 1516 17 18 19 20 21 2223 24 25 26 27 28 2930

查看磁盘剩余空间:df

[me@linuxbox ~]$ dfFilesystem 512-blocksUsed Available Capacity iusedifree %iused Mounted on/dev/disk1s1 489620264 166659552 315340480 35% 945005 9223372036853830802 0% /devfs385 385 0 100%666 0 100% /dev/dev/disk1s4 489620264 6291496 3153404802% 3 9223372036854775804 0% /private/var/vmmap -hosts 0 0 0 100% 0 0 100% /netmap auto_home0 0 0 100% 0 0 100% /home/dev/disk2s15859376 378616 54807607% 28304294964449 0% /Volumes/ACDSee/dev/disk3s2310480 28344027040 92%2554294967024 0% /Volumes/Charles Proxy v4.2.7ximi:~ taoshilei$

结束终端会话:exit

Note: Don't be tempted to use Ctrl-c and Ctrl-v to perform copy and paste inside a terminal window. They don't work.

提示:不要在终端窗口使用 Ctrl-c 和Ctrl-v 来完成复制和粘贴工作。这些不起作用。这两个命令有别的含义,他们早于在微软之前就已经定义了这两个命令的含义,所以不是我们在windows下熟悉的复制粘贴。

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。