Skip to content

Commit

Permalink
Introduce shell
Browse files Browse the repository at this point in the history
  • Loading branch information
AIboy996 committed Nov 15, 2023
1 parent 077dc3d commit bf3d998
Show file tree
Hide file tree
Showing 8 changed files with 100 additions and 8 deletions.
12 changes: 8 additions & 4 deletions docs/About/devices.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ tags:

## 平板电脑

> 平板电脑是大学阶段我学习和娱乐的主战场
> 平板电脑是我学习和娱乐的主战场
- `2019-2021`:<s>Apple iPad 2018 + Apple Pencil 1</s>
- `2021-202?`:Apple iPad Air 4 + Apple Pencil 2
Expand Down Expand Up @@ -60,12 +60,13 @@ tags:
> 游戏玩的不多,手柄倒是不少
- `2019-2021`:<s>PS4手柄控制器(送人了,拿来打原神不错)</s>
- `2021-2021`:<s>Nintendo Switch Pro手柄(同校二手,已坏)</s>
- `2020-202?`:北通阿修罗2(电脑上好用,2.4G传输很稳定)
- `2020-202?`:Nintendo Switch Joy Con(买机器自带的,红蓝,红手柄已经快坏了
- `2020-202?`:Nintendo Switch Joy Con x 2(红蓝 & 黄蓝
- `2021-202?`:Xbox无线控制器(2020款,天下第一的手柄)
- `2021-2021`:<s>Nintendo Switch Pro手柄(同校二手,已坏)</s>
- `2023-202?`Nintendo Switch Pro手柄(又买了个新的!)
- `2022-202?`:八位堂Pro2有线(NS专用)
- `2023-202?`Nintendo Switch Pro手柄(NS专用
- `2023-202?`PS5 DualSense(黑科技拉满!

## 键鼠
> 几乎只玩LOL和办公
Expand All @@ -77,6 +78,7 @@ tags:
- `2021-202?`:罗技K580
- `2021-202?`:罗技M330静音鼠标(一个已经用坏了,第二个正在坏)
- `2021-202?`:罗技G304游戏鼠标
- `2023-202?`:罗技M650静音鼠标(主要为了蓝牙,330不支持蓝牙😭)

## 耳机
> 我不是六耳猕猴,但我真的有六只耳机。
Expand All @@ -102,6 +104,8 @@ tags:
## NS卡带/PS光碟

> 虽然这不是电子设备,但姑且列在这里(欢迎来换游戏玩

- NS
- 八方旅人1
- 怪物猎人XX
Expand Down
7 changes: 6 additions & 1 deletion docs/About/links.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,9 @@ hide:
- [mkdocs-material的配置文档](https://github.com/squidfunk/mkdocs-material/blob/master/mkdocs.yml)
- [GitHub仓库小卡片生成](https://gh-card.dev/)
- [CS自学指南](https://csdiy.wiki/)
- [David Lippman的主页:超好用的graphing tools](http://dlippman.imathas.com/)
- [David Lippman的主页:超好用的graphing tools](http://dlippman.imathas.com/)

## Special
- TJUPT:

[![](https://tjupt.org/mybar.php?userid=125498.png)](https://tjupt.org/promotionlink.php?key=1dff7324687a78a924366b15ea7fce7f)
Binary file added docs/Note/Shell/assets/2023-11-15-11-24-18.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/Note/Shell/assets/shell.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions docs/Note/Shell/less.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
tags:
- Shell
- Linux
hide:
- math
---

# less

TBD:less
74 changes: 72 additions & 2 deletions docs/Note/Shell/man.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,80 @@
---
tags:
- Shell
- Shell
- Linux
hide:
- math
---

# man

## 什么是Shell

!!! cite "Wikipedia"
A Unix shell is a command-line interpreter or shell that provides a command line user interface for Unix-like operating systems. The shell is both an interactive command language and a scripting language, and is used by the operating system to control the execution of the system using shell scripts.

简而言之,Shell是Unix-like操作系统(包括各种Linux、MacOS等)的交互界面,是一个最基本的应用程序,是一种命令行语言,同时也可以作为脚本语言。

### 各种版本的Shell

使用`cat /etc/shells`来查看所有可用的Shell。

<div class="console">

```console
$ cat /etc/shells
# List of acceptable shells for chpass(1).
# Ftpd will not allow users to connect who are not using
# one of these shells.

/bin/bash
/bin/csh
/bin/dash
/bin/ksh
/bin/sh
/bin/tcsh
/bin/zsh
```

</div>

使用`echo $SHELL`查看当前使用的Shell。

<div class="console">

```console
$ echo $SHELL
/bin/zsh
```

</div>

下图展示了Shell在操作系统中的地位。

<figure markdown>
![Shell](./assets/shell.png){width=200}
</figure>

## 必备技能:RTFM

如果你想要学习Shell(学习Unix-like系统的使用),那么首先要学会的就是RTFM(read the fucking manual)。

使用`man`命令来查看**manual page**

<div class="console">

```console
$ man
What manual page do you want?
```

</div>

例如,查看`man`自己的手册:

<div class="console">

```console
$ man man
MAN(1) General Commands Manual MAN(1)

Expand All @@ -31,4 +93,12 @@ SYNOPSIS
...
```

</div>
</div>

通常,终端会进入这样一个**互动的浏览页面**

![](assets/2023-11-15-11-24-18.png)

你可以按下方向键++arrow-up++和++arrow-down++(或者++j++和++k++)来上下滑动页面,按下++q++来退出这个页面。

这个页面的更多功能详见[less](/Note/Shell/less)
2 changes: 2 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ nav:
- SAS的统计应用: Note/SAS/SAS_application.md
- Shell:
- Note/Shell/man.md
- Note/Shell/less.md
- Blog:
- Blog/index.md
- 2022:
Expand Down Expand Up @@ -268,6 +269,7 @@ markdown_extensions:
- pymdownx.details
- pymdownx.tasklist
- pymdownx.inlinehilite
- pymdownx.keys
- pymdownx.superfences:
custom_fences:
- name: mermaid
Expand Down
2 changes: 1 addition & 1 deletion overrides/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

{% block announce %}
<!-- Add announcement here, including arbitrary HTML -->
最近更新(๑•ᴗ•๑)♡ : <a href="/Blog/2023/name">称呼zy的20种方法</a>
最近更新(๑•ᴗ•๑)♡ : <a href="/Note/Shell/man">RTFM</a>
{% endblock %}


Expand Down

0 comments on commit bf3d998

Please sign in to comment.