安装虚拟机和ubuntu 系统

1. 创建虚拟机

安装 VMware

下载 ubuntu18.04.ISO 镜像文件

注意:磁盘大小创建之后不可更改

2. 安装 ubuntu 系统

参考

安装完成记得拍摄 快照 ,以便之后恢复和克隆

虚拟机启动时可能会要求设置 BIOS

3. 安装环境

  • 设置 root 密码

    sudo passwd root

  • 安装 net

sudo apt-get install net-tools

​ 使用 ifconfig 查看 IP

  • 安装 ssh

sudo apt-get install ssh

​ 可使用 xshell 远程连接

  • 安装 vmwaretool

    方便与原系统进行 文件传输 和 复制粘贴

    1. 点击虚拟机—安装vmwaretool
    2. 提取文件
    3. 输入命令 sudo ./vmware-install.pl
    4. 重启进入即可
  • 安装 conda

    参考

    1. window上下载Anaconda3的Linux版本
    2. 复制 Anaconda3-5.2.0-Linux-x86_64.sh到ubuntu
    3. 运行 .sh 文件 ./Anaconda3-5.2.0-Linux-x86_64.sh
    4. 遇到Do you wish to proceed with the installation of Microsoft VSCode? [yes|no]”,输入no

    配置Anaconda3环境

    1. 打开.bashrc 文件sudo gedit ~/.bashrc
    2. 在打开的文件最后一行新增环境变量 保存退出 export PATH=~/anaconda3/bin:$PATH
    3. 输入使其生效 source ~/.bashrc
  • 换源

    apt 换源

    pip换源

    mkdir
    ~/.pip
    sudo gedit ~/.pip/pip.conf
    
    # 编辑
    [global]
    index-url = http://mirrors.aliyun.com/pypi/simple/
    trusted-host = mirrors.aliyun.com
    
  • 安装tensorflow

    输入pip install tensorflow-gpu==1.5

    报错ERROR: Cannot uninstall 'wrapt'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

​ 输入pip install -U --ignore-installed wrapt enum34 simplejson netaddr 解决

  • 其他

    设置 vim 键盘

    编辑文件/etc/vim/vimrc.tiny,将“compatible”改成“nocompatible”非兼容模式;

    并添加一句:set backspace=2

你可能感兴趣的:(安装虚拟机和ubuntu 系统)