安装vim

Docker安装vim

一、Docker 安装vi

apt-get update
apt-get install vim-tiny

  但因为apt-get的源是在国外,在墙内基本上没法访问,所以我们需要修改其源,执行下面的命令:

mv /etc/apt/sources.list /etc/apt/sources.list.bak && \
    echo "deb http://mirrors.163.com/debian/ jessie main non-free contrib" >/etc/apt/sources.list && \
    echo "deb http://mirrors.163.com/debian/ jessie-proposed-updates main non-free contrib" >>/etc/apt/sources.list && \
    echo "deb-src http://mirrors.163.com/debian/ jessie main non-free contrib" >>/etc/apt/sources.list && \
    echo "deb-src http://mirrors.163.com/debian/ jessie-proposed-updates main non-free contrib" >>/etc/apt/sources.list

  然后我们重新执行上面的命令,就可以安装好vi了,之后就可以正常使用vi命令了。

二、Docker 安装vim

apt-get update
apt-get install vim

  但因为apt-get的源是在国外,在墙内基本上没法访问,所以我们需要修改其源,执行下面的命令:

mv /etc/apt/sources.list /etc/apt/sources.list.bak && \
    echo "deb http://mirrors.163.com/debian/ jessie main non-free contrib" >/etc/apt/sources.list && \
    echo "deb http://mirrors.163.com/debian/ jessie-proposed-updates main non-free contrib" >>/etc/apt/sources.list && \
    echo "deb-src http://mirrors.163.com/debian/ jessie main non-free contrib" >>/etc/apt/sources.list && \
    echo "deb-src http://mirrors.163.com/debian/ jessie-proposed-updates main non-free contrib" >>/etc/apt/sources.list

  然后我们重新执行上面的命令,就可以安装好vim了,之后就可以正常使用vim命令了。

你可能感兴趣的:(开发指令,vim)