zoukankan      html  css  js  c++  java
  • Ubuntu18.04LTS虚拟机优化

    1.没网

    刚安装好没网,可以设置NAT连接,也可以直接设置为桥接模式联网。这里直接桥接。

    网络中心使用的是以太网,所以就在菜单的“编辑”里的“虚拟网络编辑器”里桥接到以太网

    然后应用,确定即可。

     2.添加Root用户

    直接sudo passwd root

    因为可以直接su -切换root或者sudo su -完整切换环境变量,其实没必要非直接用root登录。

     3.更新源更换

    可以直接打开终端窗口输入software-properties-gtk直接界面化选择国内源即可。

    或者老办法

    打开文件:/etc/apt/sources.list
    先备份一份:sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
    再Vim打开,发现vim很老,使用上下左右会出现[A][C]这些。
    先更新Vim
    sudo apt-get install vim
    然后打开更新源配置文件:

    sudo vim /etc/apt/sources.list

    将没注释的注释掉,修改为阿里源:

    deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
     
     
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
     
     
    deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
     
     
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
     
     
    deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
     
     
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
     
     
    deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
     
     
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
     
     
    deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
     
     
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
    更新软件列表
    sudo apt-get update
     
    更新软件包
    sudo apt-get upgrade
     
    4.更改语言:
    【Region & Language】 【Manage Installed Languages】下载语言包。
    【install/remove language】找到 【汉语(中国)】 最后点击【apply change】选项里找到然后拖到最上面apply to system(ubuntu语言优先级是看这个的顺序的)。重启,建议保留旧名称。
     
  • 相关阅读:
    codevs2034 01串2
    codevs2622数字序列( 连续子序列最大和O(n)算法)
    codevs3008加工生产调度(Johnson算法)
    codevs1955光纤通信(并查集)
    codevs4203山区建小学
    codevs2618核电站问题
    常用端口
    ntp时间同步服务器
    date linux系统校正时间
    用户切换
  • 原文地址:https://www.cnblogs.com/aw4ke/p/11274965.html
Copyright © 2011-2022 走看看