46

Linux知识:为什么要用字符~来表示home目录

 5 years ago
source link: https://www.linuxprobe.com/linux-knowledge-home.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

在Unix风格的操作系统里(包括BSD, GNU/Linux 和 Mac OS X),通常用波浪号~来表示当前用户的主目录(home目录):例如,如果当前用户的home目录是bloggsj那么,输入cdcd~cd /home/bloggsjcd $Home都是等效的。这种习惯源自于1970年代流行的Lear-Siegler ADM-3A终端机,这种机器上波浪号和“home”键(用于把光标移动到最左端)正好在同一个键上。

下面是Lear-Siegler ADM-3A终端机的一些照片:

Lear Siegler – ADM3A Terminal (ca. 1976)

本文原创地址:https://www.linuxprobe.com/linux-knowledge-home.html作者:尹慧慧,审核员:逄增宝


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK