ubuntu-server虚拟机配置
Sh配置
安装完ubuntu后先配置sh这样可以通过xshell连接 只需要:
sudo apt-get install openssh-server ssh即可
Samba配置
然后安装samba
sudo apt-get install samba
创建share文件夹
cd /home
sudo mkdir share
sudo chmod 777 share
然后在/etc/samba里配置smb.conf 文件 在文件尾部添加:
[share]
comment = My Samba
path = /home/gao/share
browseable = yes
writeable = yes
然后设置密码
sudo smbpasswd -a gao
然后去主机上映射盘符就可以方便的访问 在文件框内输入\192.168.134.xxx 也就是虚拟机ip就可以 把share映射为盘符
gcc配置
换apt阿里源:
cd /etc/apt
sudo mv source.list source.list.back
sudo vim source.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
安装gcc:
sudo apt-get install build-essential