Ubuntu 常见问题

初始化

  • 修改时区

    cp /usr/share/zoneinfo/Asia/Shanghai  /etc/localtime
    
    timedatectl set-timezone Asia/Shanghai
    
  • 修改字符集

    添加到 /etc/profile

     export LC_ALL=en_US.UTF-8
     export LANG=en_US.UTF-8
    
  • 关闭错误报告

    修改 enabled=0

    nano /etc/default/apport
    
  • 固定 ip

    nano /etc/netplan/00-installer-config.yaml
    
    network:
    version: 2
    ethernets:
        eth0:
    #      dhcp4: true
    #      dhcp6: true
        dhcp4: false
        addresses:
            - 192.168.2.16/24
        routes:
            - to: default
            via: 192.168.2.1
        nameservers:
            addresses: [192.168.2.1]
        link-local: [] # 禁用ipv6