[开发环境]:multipass 在 Windows 平台的使用和默认 C 盘迁移
下载 Multipass
官网:https://multipass.run/docs/privileged-mounts
下载地址:Github Release V1.9.0 Windows版本 加速 下载链接
安装过程
更改存储地址
借助于 Windows10 软连接实现
mklink /D "C:\ProgramData\Multipass\data\vault" "E:\multipass-move\data\vault" mklink /D "C:\ProgramData\Multipass\cache\vault" "E:\multipass-move\cache\vault"
查找镜像
multipass find Image Aliases Version Description core core16 20200818 Ubuntu Core 16 core18 20211124 Ubuntu Core 18 18.04 bionic 20220513 Ubuntu 18.04 LTS 20.04 focal,lts 20220505 Ubuntu 20.04 LTS 21.10 impish 20220309 Ubuntu 21.10 22.04 jammy 20220506 Ubuntu 22.04 LTS appliance:adguard-home 20200812 Ubuntu AdGuard Home Appliance appliance:mosquitto 20200812 Ubuntu Mosquitto Appliance appliance:nextcloud 20200812 Ubuntu Nextcloud Appliance appliance:openhab 20200812 Ubuntu openHAB Home Appliance appliance:plexmediaserver 20200812 Ubuntu Plex Media Server Appliance anbox-cloud-appliance latest Anbox Cloud Appliance charm-dev latest A development and testing environment for charmers docker latest A Docker environment with Portainer and related tools minikube latest minikube is local Kubernetes
创建镜像
multipass lanuch -n clion-gcc bionic
进入镜像shell
multipass shss clion-gcc
搭建C/C++ cmake开发环境
# 换源 sudo sed -i 's/archive.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list sudo apt update # 安装必备 sudo apt install gcc g++ nano cmake make flex bison wget git unzip --no-install-recommends cd ~ # 高版本cmake wget https://github.91chi.fun/https://github.com/Kitware/CMake/releases/download/v3.19.1/cmake-3.19.1.tar.gz --no-check-certificate tar xzvf cmake-3.19.1.tar.gz cd cmake-3.19.1 mkdir build cd build cmake ../ -DCMAKE_INSTALL_PREFIX=install -DCMAKE_USE_OPENSSL=OFF make -j4 make install sudo cp install/bin/* /usr/bin/ sudo cp -r install/share/* /usr/share/ cd ~ # 安装gdb gdb-server sudo apt install texinfo --no-install-recommends wget https://mirrors.aliyun.com/gnu/gdb/gdb-10.1.tar.gz tar xzvf gdb-10.1.tar.gz cd gdb-10.1 mkdir build cd build ../configure --prefix=$PWD/install make -j4 make install sudo cp install/bin/* /usr/bin/ sudo cp -r install/share/* /usr/share