随想

Ubuntu 基本设置

设置静态IP,进入目录:/etc/netplan/00.****.yaml,然后修改该文件

# This is the network config written by 'subiquity'
network:
  ethernets:
    enp1s0:
      dhcp4: no
      addresses: [192.168.2.10/24]
      routes:
        - to: default
          via: 192.168.2.1
      nameservers:
          addresses: [192.168.2.1,1.1.1.1]
  version: 2

最后:sudo netplan apply

系统无法启动,卡在:[ OK ] Started GNOME Display Manager.

// 需要重新安装 gnome-session
sudo apt install --reinstall gnome-session
// 安装后系统界面跟默认的不一样了,重新安装 ubuntu-desktop 可以解决
sudo apt install --reinstall ubuntu-desktop
sudo apt install unity
reboot

// 对于按键响应延迟,慢的问题,在重装 ubuntu-desktop 后,再重装一次 gnome-session

代理

// apt
// 在目录中新建文件, /etc/apt/apt.conf.d/proxy.conf
Acquire::http::Proxy "socks5h://127.0.0.1:1080";
Acquire::https::Proxy "socks5h://127.0.0.1:1080";
Acquire::socks::Proxy "socks5h://127.0.0.1:1080";

// http
vim ~/.bashrc

export http_proxy="socks5://127.0.0.1:1080"
export https_proxy="socks5://127.0.0.1:1080"
export ftp_proxy="socks5://127.0.0.1:1080"
export no_proxy="localhost,127.0.0.1,::1"

source ~/.bashrc

Leave a Reply

Your email address will not be published. Required fields are marked *