Ubuntu 常用操作

xiaoxiao2021-02-28  42

1. 服务器配置网卡

sudo nano /etc/network/interfaces

添加

auto eth0 iface eth0 inet static address 192.168.1.100 netmask 255.255.255.0 gateway 192.168.1.1 dns-nameservers 4.4.4.4 8.8.8.8

DNS也可以修改 /etc/resolv.conf 添加,但是有可能会被自动覆盖

nameserver 202.112.125.53

重启网络服务

sudo /etc/init.d/networking restart

2. 修改控制台中文显示

sudo vi /etc/default/locale

修改默认的

LANG="zh_CN.UTF-8" LANGUAGE="zh_CN:zh"

为:

LANG="en_US.UTF-8" LANGUAGE="en_US:en"

3. 获取 root 权限

修改 root 密码:

sudo passwd root之后便可以 su root 切换至root身份

4. 修改APT源

http://blog.csdn.net/ezreal_king/article/details/72790291

5. 默认Python版本切换

http://blog.csdn.net/u011534057/article/details/51615193

6. 手动创建服务

https://blog.csdn.net/qq_14852397/article/details/71794574

转载请注明原文地址: https://www.6miu.com/read-1600270.html

最新回复(0)