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语言优先级是看这个的顺序的)。重启,建议保留旧名称。
     
  • 相关阅读:
    ----Vue 单页应用的首屏优化----
    ----小程序之rich-text图片宽度自适应----
    ----vue-router 如何在新窗口打开页面----
    ----element-ui实现时间控件开始时间和结束时间关联----
    ----element-ui自定义表单验证----
    ----js中的every和some----
    「Linux学习」之挂载访问samba服务
    「Linux学习」之samba和nfs共享服务搭建
    「Linux学习」之防火墙服务设置
    「linux学习」之批量创建用户脚本
  • 原文地址:https://www.cnblogs.com/aw4ke/p/11274965.html
Copyright © 2011-2022 走看看