虚拟机装Ubuntu16.04踩坑汇总

12 篇文章 1 订阅

目录:

1. ubuntu iso镜像下载
2. 无法安装wmware tools解决方法
3. 更换apt和pip为国内下载源
4. 常用工具下载, 搜狗/chrome等

n. vim,tmux配置备份


1. iso镜像下载

国内镜像站
阿里源:http://mirrors.aliyun.com/ubuntu-releases/
网易源:http://mirrors.163.com/ubuntu-releases/

ps: MacOSVMware Fusion装ubuntu18.04遇到开机start waited until snap is fully seeded无限黑屏的坑,一直没有解决…


2. 无法安装wmware tools解决方法

在这里插入图片描述
解决方法:
打开 VMware设置>>CD/DVD,选择挂载 linux.iso 文件,接着ubuntu便出现vmware tools文件夹

参考如下:
https://www.cnblogs.com/TM0831/p/11788018.html

注意:
macOS中vmware的安装目录需要在"应用程序"右击vmware选择"显示包内容"


3. 更换apt和pip为国内下载源
  • apt源:
    sudo vi /etc/apt/source.list替换如下内容

阿里源:

deb http://mirrors.aliyun.com/ubuntu/ xenial main
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main
deb http://mirrors.aliyun.com/ubuntu/ xenial universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main
deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security universe

网易源:

deb http://mirrors.163.com/ubuntu/ xenial main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ xenial-backports main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ xenial-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ xenial main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ xenial-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ xenial-proposed main restricted universe multiverse
  • pip换源:
    待更新

4. 常用工具下载
apt-get install git
apt-get install curl
apt-get install vim  // 最强大的编辑器之一
apt-get install tmux // terminal终端分屏
apt-get install build-essential // 安装所有gcc/g++的依赖包即环境
apt-get install pip  // py包集成管理工具
...

搜狗输入法下载


n. vim/tmux配置备份

vim配置
.vimrc

if has("syntax")
  syntax on
endif

" If using a dark background within the editing area and syntax highlighting
" turn on this option as well
set background=dark

" Uncomment the following to have Vim jump to the last position when
" reopening a file
if has("autocmd")
  au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
endif

" Uncomment the following to have Vim load indentation rules and plugins
" according to the detected filetype.
if has("autocmd")
  filetype plugin indent on
endif

" The following are commented out as they cause vim to behave a lot
" differently from regular Vi. They are highly recommended though.
"set showcmd		" Show (partial) command in status line.
set showmatch		" Show matching brackets.
set ignorecase		" Do case insensitive matching
set smartcase		" Do smart case matching
set incsearch		" Incremental search
"set autowrite		" Automatically save before commands like :next and :make
set hidden		" Hide buffers when they are abandoned
"set mouse=a		" Enable mouse usage (all modes)
setlocal noswapfile " 不要生成swap文件
set bufhidden=hide " 当buffer被丢弃的时候隐藏它
set number " 显示行号
set cursorline " 突出显示当前行
set ruler " 打开状态栏标尺
set shiftwidth=4 " 设定 << 和 >> 命令移动时的宽度为 4
set softtabstop=4 " 使得按退格键时可以一次删掉 4 个空格
"set tabstop=4 " 设定 tab 长度为 4
set nobackup " 覆盖文件时不备份
set autochdir " 自动切换当前目录为当前文件所在的目录
set backupcopy=yes " 设置备份时的行为为覆盖
set matchtime=2 " 短暂跳转到匹配括号的时间
set smartindent " 开启新行时使用智能自动缩进
set backspace=indent,eol,start " 不设定在插入状态无法用退格键和 Delete 键删除回车符
set cmdheight=1 " 设定命令行的行数为 1
set laststatus=2 " 显示状态栏 (默认值为 1, 无法显示状态栏)
set statusline=\ %<%F[%1*%M%*%n%R%H]%=\ %y\ %0(%{&fileformat}\ %{&encoding}\ Ln\ %l,\ Col\ %c/%L%) " 设置在状态行显示的信息
set foldenable " 开始折叠
"set foldmethod=syntax " 设置语法折叠
set foldcolumn=0 " 设置折叠区域的宽度
setlocal foldlevel=1 " 设置折叠层数为 1

au BufWinLeave * silent mkview
au BufWinEnter * silent loadview

set nu
colorscheme koehler
"colorscheme desert
syntax on

" Source a global configuration file if available
if filereadable("/etc/vim/vimrc.local")
  source /etc/vim/vimrc.local
endif

tmux配置
.tmux.conf

# 将前缀命令 ctrl+b 修改为 ctrl+a
unbind C-b
set -g prefix C-a

# ctrl+方向键切换窗口
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D

# 将快捷键设置成vi 模式
setw -g mode-keys vi
  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
您好!要在虚拟上安Ubuntu 16.04,您可以按照以下步骤进行操作: 1. 首先,您需要选择一款虚拟软件,例如VirtualBox或VMware Workstation。您可以根据个人喜好选择其中一款,然后下载并安它。 2. 一旦您安虚拟软件,您需要下载Ubuntu 16.04的镜像文件。您可以在Ubuntu官方网站上找到适合您系统的稳定版本镜像文件,并将其下载到本地计算上。 3. 启动虚拟软件,并点击创建新虚拟。根据软件的指引,您需要指定虚拟的名称、类型和版本。在这一步中,请确保选择正确的操作系统版本(即Ubuntu 64位),以便与您下载的镜像文件匹配。 4. 分配虚拟的系统资源,例如内存和硬盘空间。按照您的需求进行设置。 5. 在虚拟的设置中,选择“存储”选项卡,并将下载的Ubuntu 16.04镜像文件添加为虚拟的光驱。这将允许您在虚拟中启动并安Ubuntu 16.04。 6. 启动虚拟,并按照屏幕上显示的指引步骤安Ubuntu 16.04。您需要选择语言、时区和键盘布局等设置。在磁盘分区阶段,您可以选择使用默认设置或手动进行分区,具体取决于您的需求。 7. 完成安后,重新启动虚拟,您将看到Ubuntu 16.04的登录界面。输入您在安过程中创建的用户名和密码,即可进入Ubuntu桌面环境。 这样,您就成功在虚拟上安Ubuntu 16.04。如有任何问题,请随时向我提问。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值