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

本文介绍了在Unix及类Unix系统中波浪号(~)的含义及其使用方式,通常它代表当前用户的家目录。此外还提到了这一符号的历史来源——Lear-Siegler ADM-3A终端,并解释了vim编辑器中的一些快捷键起源。

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

On Unix-like operating systems (including BSD, GNU/Linux and Mac OS X), tilde often indicates the current user's home directory: for example, if the current user's home directory is /home/bloggsj, then cdcd ~cd /home/bloggsj or cd $HOME are equivalent. This practice derives from the Lear-Siegler ADM-3A terminal in common use during the 1970s, which happened to have the tilde symbol and the word "Home" (for moving the cursor to the upper left) on the same key.

Photo of Lear-Siegler ADM-3A keyboard you can find on this site.

This terminal is also the source of shortcuts used in the vim editor: hjkl for left, down, up, right.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值