虚拟机-Ubuntu
Posted Justaman
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了虚拟机-Ubuntu相关的知识,希望对你有一定的参考价值。
1.安装
下载iso镜像文件,在VMware中创建时添加即可
2.安装tools,可以复制文件
参考:https://www.cnblogs.com/justaman/p/10545239.html
快捷键:
ctrl+alt+t 命令行
ctrl+alt+l 锁屏
3.更改下载源
更改/etc/apt/sources.list
阿里源:
deb-src http://archive.ubuntu.com/ubuntu xenial main restricted #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse #Added by software-properties
deb http://archive.canonical.com/ubuntu xenial partner
deb-src http://archive.canonical.com/ubuntu xenial partner
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse
deb http://cn.archive.ubuntu.com/ubuntu bionic main multiverse restricted universe
deb http://cn.archive.ubuntu.com/ubuntu bionic-updates main multiverse restricted universe
deb http://cn.archive.ubuntu.com/ubuntu bionic-security main multiverse restricted universe
deb http://cn.archive.ubuntu.com/ubuntu bionic-proposed main multiverse restricted universe
最后需要sudo apt-get update
参考:https://www.cnblogs.com/justaman/p/10590465.html
4.更改中文/时区,安装中文输入法(sougou)
安装输入法时出现依赖问题,解决:sudo apt-get install –f
5.自带了python/python3
安装pip
sudo apt-get python-pip
sudo apt-get python3-pip
6.安装pycharm
下载linux版,为tar.gz文件,解压缩后在bin目录执行sh pychram.sh即可启动
破解:更改hosts,live-server破解即可
7.虚拟机被局域网内其他电脑访问
需要用桥接模式
手动设置有线连接
ip地址与主机在同一个网段
子网掩码/网关地址/dns都要与主机一直,通过ipconfig –all查看
还需要设置:
进入VMware的 编辑 -> 虚拟网络编辑器 –> 选择更改设置
将VMnet0(或其它类型为桥接模式的网络适配器)桥接的网卡由默认的“自动”改为连上互联网的网卡(无线或有线网卡)
确定即可;这时局域网内的其他主机就可以访问到虚拟机了
以上是关于虚拟机-Ubuntu的主要内容,如果未能解决你的问题,请参考以下文章