• Ubuntu Docker 容器内无法使用vi或vim


    更新源,但是由于不能使用vi,如下用echo

    cp /etc/apt/sources.list /etc/apt/sources.list.bak # 备份原先的
    
    
    echo "deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse" >> sources.list
    echo "deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse" >> sources.list
    
    echo "deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse" >> sources.list
    echo "deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse" >> sources.list
    
    echo "deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse" >> sources.list
    echo "deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse" >> sources.list
    
    echo "deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse" >> sources.list
    echo "deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse" >> sources.list
    
    echo "deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse" >> sources.list
    echo "deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse" >> sources.list
    
    
    apt-get update
    
    apt-get install vim
    
  • 相关阅读:
    PCB设计流程
    第一次PCB画板实战MiniDVPart1/3
    程序人生
    MCU死掉了
    一花一世界,一码一人生,谓之程序人生
    神船·神舟
    程序猿的选择
    android得到strings.xml文件中的内容
    Android特效 五种Toast详解
    Java字符串转换为日期和时间比较大小
  • 原文地址:https://www.cnblogs.com/winter-shadow/p/14322796.html
Copyright © 2020-2023  润新知