wy168 发表于 2024-1-5 12:56:06

运维:Multipass软件让你的虚拟机管理更简单高效


    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><a style="color: red;">#头条创作挑战赛#</a></p>
    <div style="text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/75feba6b44e740e7826f78e092bca71e~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1704568536&amp;x-signature=Qbiu2qbB5FuNVQypovccMB%2BwWzY%3D" style="width: 100%; margin-bottom: 20px;"></div>
    <h1 style="text-align: left; margin-bottom: 10px;">一、Multipass是什么?</h1>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><span style="color: green;"><span style="color: green;">官网:https://multipass.run/</span></span></p>
    <div style="text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/a766f3287f6b47ad956232f5d097abdf~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1704568536&amp;x-signature=TaCna7FjNfmMXjPvSVQ072F1X6w%3D" style="width: 100%; margin-bottom: 20px;"></div>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><span style="color: green;"><span style="color: green;">一提到虚拟机大家一般都会想到VMvare和Virtual Box这两个的虚拟机软件,这两个软件一个比较麻烦的地方是安装完虚拟机以后还需要下载操作系统镜像。小编偶然间发现了Multipass。这款轻量级的虚拟机管理器,仅需一个命令就可以快速安装Ubuntu 环境。</span></span></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><span style="color: green;"><span style="color: green;">Multipass是一个轻量虚拟机管理器是由 Ubuntu 官方运营的公司 Canonical</span></span><span style="color: green;"><span style="color: green;"> 推出的开源项目。运行环境支持 </span></span><span style="color: green;">Linux,并且</span><span style="color: green;"><span style="color: green;">提供了一个命令行界面来启动和管理 Linux 实例。下载一个全新的镜像需要几秒钟的时间,并且在几分钟内就可以启动并运行 VM。</span></span></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><span style="color: green;"><span style="color: green;">功能特点</span></span></p><span style="color: green;"><span style="color: green;">简单易用:Multipass 提供了一个简单而直观的命令行界面,使您可以轻松创建、启动、停止和删除虚拟机实例。</span></span><span style="color: green;"><span style="color: green;">快速部署:通过使用预先配置的基础映像,Multipass 可以在几秒钟内快速启动虚拟机。</span></span><span style="color: green;"><span style="color: green;">轻量级:Multipass 虚拟机非常轻量,占用的系统资源较少,这使得您可以同时运行多个虚拟机实例而不会拖慢您的计算机。</span></span><span style="color: green;"><span style="color: green;">与云平台集成:Multipass 支持与云平台(如AWS、Azure和GCP)集成,使您可以将虚拟机实例部署到云上。</span></span><span style="color: green;"><span style="color: green;">高度可定制:Multipass 允许您为虚拟机实例选择不同的操作系统和配置选项,以满足特定的需求。</span></span>
    <div style="text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/bb75ab1f07f84de6886605887ff3286f~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1704568536&amp;x-signature=QGzwTqT%2BStMjVBSoWsExqvfHTrs%3D" style="width: 100%; margin-bottom: 20px;"></div>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><span style="color: green;"><span style="color: green;">Multipass支持跨平台,所以可以在Linux、 Windows 和 macOS上进行安装,本文采用Win10操作系统来进行Multipass安装等相关知识的介绍。</span></span></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><span style="color: green;"><span style="color: green;">本质上而言,Multipass用于</span><strong style="color: blue;"><span style="color: green;">管理各平台上的虚拟机引擎</span></strong><span style="color: green;">,例如:</span></span></p>Hyper-V 和 VirtualBox(Windows)
    KVM(Linux)
    HyperKit(macOS)<p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><span style="color: green;"><span style="color: green;">所以使用前需要安装相应的虚拟机引擎,再通过Multipass进行管理。</span></span></p>
    <h1 style="text-align: left; margin-bottom: 10px;">二、 安装虚拟机Virtual Box</h1>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><span style="color: green;"><span style="color: green;">通过官网下载免费的Virtual Box并安装。</span></span></p><span style="color: green;">https</span>:<span style="color: green;">//pan.quark.cn/s/4e34a2f09f56</span>
    <div style="text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/c1bd8ffe76a946b4bc1d06f47f30bc98~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1704568536&amp;x-signature=4cnmNXCvlBiNvUrfvNVpmkJ7DUE%3D" style="width: 100%; margin-bottom: 20px;"></div>
    <div style="text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/f26e2d6d52b04c498333b5dccffafc4f~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1704568536&amp;x-signature=7zmoORsSB1kwwizsrprAsRP0lz4%3D" style="width: 100%; margin-bottom: 20px;"></div>
    <h1 style="text-align: left; margin-bottom: 10px;">三、安装Multipass</h1>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><span style="color: green;"><span style="color: green;">下载地址:</span></span></p><span style="color: green;">https</span>:<span style="color: green;">//pan.quark.cn/s/4fe07ab88e7e</span>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><span style="color: green;"><span style="color: green;">安装包非常小,仅有20多M。</span></span></p>
    <div style="text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/c455dc88c65142eaa9fb0b9728f7d398~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1704568536&amp;x-signature=c3nurNsqJOVMQRsBM8zqseD%2Bt6g%3D" style="width: 100%; margin-bottom: 20px;"></div>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><span style="color: green;"><span style="color: green;">双击安装,接着下一步即可。</span></span></p>
    <div style="text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/5348167f1af54f429635f9b1b8b4a3b9~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1704568536&amp;x-signature=mzeiW4kiPz2nDQhEKhFNqIZpJTU%3D" style="width: 100%; margin-bottom: 20px;"></div>
    <div style="text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/852aea6a2d074649920e6b33fea6ede0~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1704568536&amp;x-signature=bOr0tx6JUQ0iQpFNshZzTqKCG74%3D" style="width: 100%; margin-bottom: 20px;"></div>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><span style="color: green;"><span style="color: green;">我安装过Virtual Box,所以选择了【Oracle VM Virtual Box】</span></span></p>
    <div style="text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/afa0db04489e4688a8452e7a28351c60~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1704568536&amp;x-signature=wAZHBYS3rjTAwtd%2Be87aXpok8IA%3D" style="width: 100%; margin-bottom: 20px;"></div>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><span style="color: green;"><span style="color: green;">添加环境变量。</span></span></p>
    <div style="text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/a694f76bdc8048d2b54e9c3db4dd136c~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1704568536&amp;x-signature=bWvrHpk2FIP3Y2KhCIypRbvqo6o%3D" style="width: 100%; margin-bottom: 20px;"></div>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><span style="color: green;"><span style="color: green;">选择安装路径。</span></span></p>
    <div style="text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/7a207fce59fa4825a9676eadf32348d3~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1704568536&amp;x-signature=oFYglooSuHi7o%2FgFI1LNck74oQg%3D" style="width: 100%; margin-bottom: 20px;"></div>
    <div style="text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/239d8e454bda4c889dae8b336ed41197~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1704568536&amp;x-signature=Gtmmtql49RQ9BeRPZFYXsBwfBnE%3D" style="width: 100%; margin-bottom: 20px;"></div>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><span style="color: green;"><span style="color: green;">安装</span></span></p>
    <div style="text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/1f7d6339e1a048a780aabc2f81b0a4a8~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1704568536&amp;x-signature=Awq0dzfo9hbXKOk%2FCZYHF%2F5ste4%3D" style="width: 100%; margin-bottom: 20px;"></div>
    <div style="text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/0772857849114f12ad81ba0dd2fa407e~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1704568536&amp;x-signature=jo%2BfBgvfLVbFJchFYSmGvakvh8w%3D" style="width: 100%; margin-bottom: 20px;"></div>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><span style="color: green;"><span style="color: green;">安装完成之后就可以使用了。</span></span></p>
    <h1 style="text-align: left; margin-bottom: 10px;">四、使用Multipass</h1>
    <h1 style="text-align: left; margin-bottom: 10px;">4.1 Multipass的使用帮助</h1>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><span style="color: green;"><span style="color: green;">在命令行输入multipass,可以获得Multipass的使用帮助。</span></span></p><span style="color: green;">C</span>:<span style="color: green;">\Users\Administrator&gt;multipass</span>
    <span style="color: green;">Usage</span>: <span style="color: green;">multipass &lt;command&gt;</span>
    <span style="color: green;">Create,</span> <span style="color: green;">control and connect to Ubuntu instances.</span>


    <span style="color: green;">This</span> <span style="color: green;">is a command line utility for multipass, a</span>
    <span style="color: green;">service</span> <span style="color: green;">that manages Ubuntu instances.</span>


    <span style="color: green;">Options</span>:
    <span style="color: green;">-?,</span> <span style="color: green;">-h, --help Displays help on commandline options.</span>
    <span style="color: green;">--help-all</span> <span style="color: green;">Displays help including Qt specific options.</span>
    <span style="color: green;">-v,</span> <span style="color: green;">--verbose Increase logging verbosity. Repeat the v in the short</span>
    <span style="color: green;">option</span> <span style="color: green;">for more detail. Maximum verbosity is obtained with 4</span>
    <span style="color: green;">(or</span> <span style="color: green;">more) vs, i.e. -vvvv.</span>


    <span style="color: green;">Available</span> <span style="color: green;">commands:</span>
    <span style="color: green;">alias</span> <span style="color: green;">Create an alias</span>
    <span style="color: green;">aliases</span> <span style="color: green;">List available aliases</span>
    <span style="color: green;">authenticate</span> <span style="color: green;">Authenticate client</span>
    <span style="color: green;">delete</span> <span style="color: green;">Delete instances</span>
    <span style="color: green;">exec</span> <span style="color: green;">Run a command on an instance</span>
    <span style="color: green;">find</span> <span style="color: green;">Display available images to create instances from</span>
    <span style="color: green;">get</span> <span style="color: green;">Get a configuration setting</span>
    <span style="color: green;">help</span> <span style="color: green;">Display help about a command</span>
    <span style="color: green;">info</span> <span style="color: green;">Display information about instances</span>
    <span style="color: green;">launch</span> <span style="color: green;">Create and start an Ubuntu instance</span>
    <span style="color: green;">list</span> <span style="color: green;">List all available instances</span>
    <span style="color: green;">mount</span> <span style="color: green;">Mount a local directory in the instance</span>
    <span style="color: green;">networks</span> <span style="color: green;">List available network interfaces</span>
    <span style="color: green;">purge</span> <span style="color: green;">Purge all deleted instances permanently</span>
    <span style="color: green;">recover</span> <span style="color: green;">Recover deleted instances</span>
    <span style="color: green;">restart</span> <span style="color: green;">Restart instances</span>
    <span style="color: green;">set</span> <span style="color: green;">Set a configuration setting</span>
    <span style="color: green;">shell</span> <span style="color: green;">Open a shell on a running instance</span>
    <span style="color: green;">start</span> <span style="color: green;">Start instances</span>
    <span style="color: green;">stop</span> <span style="color: green;">Stop running instances</span>
    <span style="color: green;">suspend</span> <span style="color: green;">Suspend running instances</span>
    <span style="color: green;">transfer</span> <span style="color: green;">Transfer files between the host and instances</span>
    <span style="color: green;">umount</span> <span style="color: green;">Unmount a directory from an instance</span>
    <span style="color: green;">unalias</span> <span style="color: green;">Remove an alias</span>
    <span style="color: green;">version</span> <span style="color: green;">Show version details</span>
    <h1 style="text-align: left; margin-bottom: 10px;">查看安装的Multipass版本信息</h1><span style="color: green;">C</span>:\<span style="color: green;">Users</span>\<span style="color: green;">Administrator</span>&gt;<span style="color: green;">multipass</span> <span style="color: green;">version</span>
    <span style="color: green;">multipass</span> 1<span style="color: green;">.9</span><span style="color: green;">.1</span>+<span style="color: green;">win</span>
    <span style="color: green;">multipassd</span> 1<span style="color: green;">.9</span><span style="color: green;">.1</span>+<span style="color: green;">win</span>
    <h1 style="text-align: left; margin-bottom: 10px;">4.2 创建实例</h1>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><span style="color: green;"><span style="color: green;">multipass launch命令用于创建实例。</span></span></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><span style="color: green;"><span style="color: green;">可以通过下面命令,创建实例。</span></span></p>multipass launch --name <span style="color: green;">&lt;<span style="color: green;">实例名称</span>&gt;</span>
    multipass launch -n <span style="color: green;">&lt;<span style="color: green;">实例名称</span>&gt;</span>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><span style="color: green;"><span style="color: green;">如果不指定name参数,multipass会随机生成一个实例名。</span></span></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><span style="color: green;"><span style="color: green;">查看创建的实例。</span></span></p><span style="color: green;">C</span>:<span style="color: green;">\Users\Administrator&gt;multipass list</span>
    <span style="color: green;">No</span> <span style="color: green;">instances found. --》当前没有创建任何实例</span>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><span style="color: green;"><span style="color: green;">例:</span></span></p><span style="color: green;">--下载镜像</span>
    <span style="color: green;">C</span>:<span style="color: green;">\Users\Administrator&gt;multipass launch</span>
    <span style="color: green;">Retrieving</span> <span style="color: green;">image: 5%</span><span style="color: green;">--创建实例acceptable-joey</span>
    <span style="color: green;">C</span>:<span style="color: green;">\Users\Administrator&gt;multipass launch</span>
    <span style="color: green;">Starting</span> <span style="color: green;">acceptable-joey -</span>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><span style="color: green;"><span style="color: green;">** launch第一次创建实例时会首先消耗几分钟下载镜像,之后launch会直接创建实例。</span></span></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><span style="color: green;"><strong style="color: blue;"><span style="color: green;">4.3 查看实例列表</span></strong></span></p><span style="color: green;">C</span>:<span style="color: green;">\Users\Administrator&gt;multipass list</span>
    <span style="color: green;">Name</span> <span style="color: green;">State IPv4 Image</span>
    <span style="color: green;">acceptable-joey</span> <span style="color: green;">Running N/A Ubuntu 20.04 LTS</span>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><span style="color: green;"><span style="color: green;">通过如下命令查看实例信息</span></span></p><span style="color: green;">multipass</span> <span style="color: green;">info</span> &lt;实例名称&gt;例:<span style="color: green;">C:\Users\Administrator&gt;multipass</span> <span style="color: green;">info</span> <span style="color: green;">acceptable-joey</span>
    <span style="color: green;">Name:</span> <span style="color: green;">acceptable-joey</span>
    <span style="color: green;">State:</span> <span style="color: green;">Running</span>
    <span style="color: green;">IPv4:</span> <span style="color: green;">N/A</span>
    <span style="color: green;">Release:</span> <span style="color: green;">Ubuntu</span> <span style="color: green;">20.04</span><span style="color: green;">.4</span> <span style="color: green;">LTS</span>
    <span style="color: green;">Image hash:</span> <span style="color: green;">75a04c7eed58</span> <span style="color: green;">(Ubuntu</span> <span style="color: green;">20.04</span> <span style="color: green;">LTS)</span>
    <span style="color: green;">Load:</span> <span style="color: green;">0.24</span> <span style="color: green;">0.17</span> <span style="color: green;">0.07</span>
    <span style="color: green;">Disk usage:</span> <span style="color: green;">1.</span><span style="color: green;">4G</span> <span style="color: green;">out</span> <span style="color: green;">of</span> <span style="color: green;">4.</span><span style="color: green;">7G</span>
    <span style="color: green;">Memory usage:</span> <span style="color: green;">137.</span><span style="color: green;">7M</span> <span style="color: green;">out</span> <span style="color: green;">of</span> <span style="color: green;">976.</span><span style="color: green;">9M</span>
    <span style="color: green;">Mounts:</span> <span style="color: green;">--</span>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><span style="color: green;"><span style="color: green;">创建命名的实例:</span></span></p><span style="color: green;">C</span>:<span style="color: green;">\Users\Administrator&gt;multipass launch -n test</span>
    <span style="color: green;">Launched</span>: <span style="color: green;">test</span>


    <span style="color: green;">C</span>:<span style="color: green;">\Users\Administrator&gt;multipass launch --name test2</span>
    <span style="color: green;">Launched</span>: <span style="color: green;">test2</span>


    <span style="color: green;">C</span>:<span style="color: green;">\Users\Administrator&gt;multipass list</span>
    <span style="color: green;">Name</span> <span style="color: green;">State IPv4 Image</span>
    <span style="color: green;">acceptable-joey</span> <span style="color: green;">Running N/A Ubuntu 20.04 LTS</span>
    <span style="color: green;">test</span> <span style="color: green;">Running N/A Ubuntu 20.04 LTS</span>
    <span style="color: green;">test2</span> <span style="color: green;">Running N/A Ubuntu 20.04 LTS</span>删除实例multipass <span style="color: green;">delete</span> test2 <span style="color: green;">--purge</span>
    C:\<span style="color: green;">Users</span>\Administrator&gt;multipass <span style="color: green;">list</span>
    <span style="color: green;">Name</span> State IPv4 Image
    acceptable-joey Running N/A Ubuntu <span style="color: green;">20.04</span> LTS
    <span style="color: green;">test</span> Running N/A Ubuntu <span style="color: green;">20.04</span> LTS<p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><span style="color: green;"><strong style="color: blue;"><span style="color: green;">4.4 关闭和启动实例</span></strong></span></p><span style="color: green;">C</span>:<span style="color: green;">\Users\Administrator&gt;multipass stop acceptable-joey</span>


    <span style="color: green;">C</span>:<span style="color: green;">\Users\Administrator&gt;multipass stop test</span>


    <span style="color: green;">C</span>:<span style="color: green;">\Users\Administrator&gt;multipass list</span>
    <span style="color: green;">Name</span> <span style="color: green;">State IPv4 Image</span>
    <span style="color: green;">acceptable-joey</span> <span style="color: green;">Stopped -- Ubuntu 20.04 LTS</span>
    <span style="color: green;">test</span> <span style="color: green;">Stopped -- Ubuntu 20.04 LTS</span>


    <span style="color: green;">C</span>:<span style="color: green;">\Users\Administrator&gt;multipass start test</span>


    <span style="color: green;">C</span>:<span style="color: green;">\Users\Administrator&gt;multipass list</span>
    <span style="color: green;">Name</span> <span style="color: green;">State IPv4 Image</span>
    <span style="color: green;">acceptable-joey</span> <span style="color: green;">Stopped -- Ubuntu 20.04 LTS</span>
    <span style="color: green;">test</span> <span style="color: green;">Running N/A Ubuntu 20.04 LTS</span>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><span style="color: green;"><strong style="color: blue;"><span style="color: green;">4.5 使用实例</span></strong></span></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><span style="color: green;"><span style="color: green;">通过multipass shell 开始使用实例的命令行。</span></span></p>multipass shell <span style="color: green;">&lt;<span style="color: green;">实例名称</span>&gt;</span>例:<span style="color: green;">C:\Users\Administrator&gt;multipass</span> <span style="color: green;">shell</span> <span style="color: green;">test</span>
    <span style="color: green;">Welcome</span> <span style="color: green;">to</span> <span style="color: green;">Ubuntu</span> <span style="color: green;">20.04</span><span style="color: green;">.4</span> <span style="color: green;">LTS</span> <span style="color: green;">(GNU/Linux</span> <span style="color: green;">5.4</span><span style="color: green;">.0</span><span style="color: green;">-120</span><span style="color: green;">-generic</span> <span style="color: green;">x86_64)</span>


    <span style="color: green;">*</span> <span style="color: green;">Documentation:</span> <span style="color: green;">https://help.ubuntu.com</span>
    <span style="color: green;">*</span> <span style="color: green;">Management:</span> <span style="color: green;">https://landscape.canonical.com</span>
    <span style="color: green;">*</span> <span style="color: green;">Support:</span> <span style="color: green;">https://ubuntu.com/advantage</span>


    <span style="color: green;">System</span> <span style="color: green;">information</span> <span style="color: green;">as</span> <span style="color: green;">of</span> <span style="color: green;">Wed</span> <span style="color: green;">Jun</span> <span style="color: green;">22</span> <span style="color: green;">21</span><span style="color: green;">:29:00</span> <span style="color: green;">CST</span> <span style="color: green;">2022</span>


    <span style="color: green;">System load: 0.0 Processes:</span> <span style="color: green;">102</span>
    <span style="color: green;">Usage of /:</span> <span style="color: green;">29.1</span><span style="color: green;">%</span> <span style="color: green;">of 4.67GB Users logged in:</span> <span style="color: green;">0</span>
    <span style="color: green;">Memory usage:</span> <span style="color: green;">19</span><span style="color: green;">%</span> <span style="color: green;">IPv4 address for enp0s3:</span> <span style="color: green;">10.0</span><span style="color: green;">.2</span><span style="color: green;">.15</span>
    <span style="color: green;">Swap usage:</span> <span style="color: green;">0</span><span style="color: green;">%</span>




    <span style="color: green;">1</span> <span style="color: green;">update</span> <span style="color: green;">can</span> <span style="color: green;">be</span> <span style="color: green;">applied</span> <span style="color: green;">immediately.</span>
    <span style="color: green;">To see these additional updates run:</span> <span style="color: green;">apt</span> <span style="color: green;">list</span> <span style="color: green;">--upgradable</span>




    <span style="color: green;">To</span> <span style="color: green;">run</span> <span style="color: green;">a</span> <span style="color: green;">command</span> <span style="color: green;">as</span> <span style="color: green;">administrator</span> <span style="color: green;">(user</span> <span style="color: green;">"root"</span><span style="color: green;">),</span> <span style="color: green;">use</span> <span style="color: green;">"sudo &lt;command&gt;"</span><span style="color: green;">.</span>
    <span style="color: green;">See</span> <span style="color: green;">"man sudo_root"</span> <span style="color: green;">for</span> <span style="color: green;">details.</span>


    <span style="color: green;">ubuntu@test:~$</span> <span style="color: green;">pwd</span>
    <span style="color: green;">/home/ubuntu</span>
    <span style="color: green;">ubuntu@test:~$</span> <span style="color: green;">hostname</span>
    <span style="color: green;">test</span>
    <span style="color: green;">ubuntu@test:~$</span> <span style="color: green;">id</span>
    <span style="color: green;">uid=1000(ubuntu)</span> <span style="color: green;">gid=1000(ubuntu)</span> <span style="color: green;">groups=1000(ubuntu),4(adm),20(dialout),24(cdrom),25(floppy),27(sudo),29(audio),30(dip),44(video),46(plugdev),117(netdev),118(lxd)</span>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><span style="color: green;"><span style="color: green;">这就是一台ubuntu的虚拟机,可以尽情使用了。是不是非常方便!</span></span></p>


页: [1]
查看完整版本: 运维:Multipass软件让你的虚拟机管理更简单高效