How to change your ubuntu default directory name to English

 

 

When you enter into default directoris of ubuntu, if thier name is Chinese, you will feel it is waste time to copy the name of them or type it. But if they are English name , you can use tab make it easy! Do you feel like me ?

 

now you can use the method below to change this problem:

 

command:

 

 

 


### 配置SSH以使用主机名连接Ubuntu系统 要通过SSH使用主机名连接到Ubuntu系统,需要确保以下几个步骤正确完成: 1. **设置主机名** 确保目标Ubuntu系统的主机名已正确配置。可以使用以下命令设置主机名: ```bash sudo hostnamectl set-hostname your-hostname ``` 该命令会将系统的主机名设置为 `your-hostname` [^3]。 2. **配置本地DNS解析** 如果没有全局DNS服务器解析该主机名,可以在本地计算机的 `hosts` 文件中添加一条静态解析记录。 - 在Linux或macOS上,编辑 `/etc/hosts` 文件: ```bash sudo nano /etc/hosts ``` 添加以下内容: ``` 192.168.x.x your-hostname ``` 其中 `192.168.x.x` 是Ubuntu系统的IP地址,`your-hostname` 是你设置的主机名。 - 在Windows上,编辑 `C:\Windows\System32\drivers\etc\hosts` 文件,并添加相同的记录。 3. **确保SSH服务运行** 确保目标Ubuntu系统上已安装并运行SSH服务。可以使用以下命令安装和启动SSH服务: ```bash sudo apt update sudo apt install openssh-server sudo systemctl start ssh sudo systemctl enable ssh ``` 4. **使用主机名连接** 完成上述配置后,可以使用以下命令通过SSH连接到Ubuntu系统: ```bash ssh username@your-hostname ``` 其中 `username` 是Ubuntu系统上的有效用户,`your-hostname` 是之前设置的主机名。 5. **(可选)配置SSH别名** 如果希望简化连接过程,可以在本地计算机的SSH配置文件中添加别名。编辑 `~/.ssh/config` 文件: ```bash nano ~/.ssh/config ``` 添加以下内容: ``` Host your-alias HostName your-hostname User username ``` 保存后,可以直接使用以下命令连接: ```bash ssh your-alias ``` 通过上述步骤,可以轻松地通过主机名使用SSH连接到Ubuntu系统。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值