首页 > 系统相关 >虚拟机文件快速安装ubuntu

虚拟机文件快速安装ubuntu

时间:2022-09-02 14:14:08浏览次数:87  
标签:66.10 00 39.156 虚拟机 192.168 huhy ubuntu root 安装

@

目录

    说明:采用打开虚拟机文件的方式使用Ubuntu(2022服务器版不带桌面),打开后配置一下网卡文件即可使用

    1,使用百度网盘拷贝Ubuntu虚拟机文件到本地上
    链接:https://pan.baidu.com/s/17uqM3I-8OgDb_j1pmv8nMA
    提取码:i57u

    2,使用虚拟机直接打开
    在这里插入图片描述
    3,打开下载到本地的虚拟机文件
    在这里插入图片描述

    4,直接开启虚拟机后等待一分钟左右即可
    在这里插入图片描述
    5,然后直接登录即可,默认用户密码(huhy:Root@123)
    在这里插入图片描述
    6,切换到root用户,默认用户密码(root@123),注:root密码未设置
    在这里插入图片描述
    7,网卡模式设置为静态IP,需要自己手动设置
    在这里插入图片描述
    8,编辑网卡配置文件

    root@huhy:`# vim /etc/netplan/00-installer-config.yaml
    root@huhy:~# cat /etc/netplan/00-installer-config.yaml
    # This is the network config written by 'subiquity'
    network:
      ethernets:
        ens33:
          dhcp4: no
          addresses: [192.168.200.10/24]
          gateway4: 192.168.200.2
          nameservers:
            addresses: [114.114.114.114,8.8.8.8]
      version: 2
    root@huhy:~#
    
    #网卡重启命令
    root@huhy:~# netplan apply
    
    ** (generate:2238): WARNING **: 05:53:18.816: `gateway4` has been deprecated, use default routes instead.
    See the 'Default routes' section of the documentation for more details.
    
    ** (process:2236): WARNING **: 05:53:19.274: `gateway4` has been deprecated, use default routes instead.
    See the 'Default routes' section of the documentation for more details.
    root@huhy:~# ip a
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
        inet 127.0.0.1/8 scope host lo
           valid_lft forever preferred_lft forever
        inet6 ::1/128 scope host
           valid_lft forever preferred_lft forever
    2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
        link/ether 00:0c:29:1a:93:c9 brd ff:ff:ff:ff:ff:ff
        altname enp2s1
        inet 192.168.200.10/24 brd 192.168.200.255 scope global ens33     #ip已经更改
           valid_lft forever preferred_lft forever
        inet6 fe80::20c:29ff:fe1a:93c9/64 scope link
           valid_lft forever preferred_lft forever
    root@huhy:~#
    
    #ubuntu用vim进行编辑文件,或者gedit记事本的形式,用vi会有乱码错误
    

    9,使用终端尝试远程登录

    C:\Users\huhy>ssh [email protected]
    [email protected]'s password:
    
    
    Microsoft Windows [版本 10.0.22000.918]
    (c) Microsoft Corporation。保留所有权利。
    
    C:\Users\huhy>ssh [email protected]
    [email protected]'s password:
    Welcome to Ubuntu 22.04 LTS (GNU/Linux 5.15.0-25-generic x86_64)
    
     * Documentation:  https://help.ubuntu.com
     * Management:     https://landscape.canonical.com
     * Support:        https://ubuntu.com/advantage
    
      System information as of Fri Sep  2 05:55:19 AM UTC 2022
    
      System load:  0.0205078125       Processes:              217
      Usage of /:   34.4% of 19.51GB   Users logged in:        1
      Memory usage: 11%                IPv4 address for ens33: 192.168.200.10
      Swap usage:   0%
    
    
    0 updates can be applied immediately.
    
    
    Last login: Fri Sep  2 05:50:19 2022 from 192.168.200.1
    huhy@huhy:~$ sudo su root
    [sudo] password for huhy:
    root@huhy:/home/huhy# cd
    root@huhy:~#
    

    10,测试是否可以上网

    root@huhy:~# ping baidu.com
    PING baidu.com (39.156.66.10) 56(84) bytes of data.
    64 bytes from 39.156.66.10 (39.156.66.10): icmp_seq=1 ttl=128 time=45.1 ms
    64 bytes from 39.156.66.10 (39.156.66.10): icmp_seq=2 ttl=128 time=45.7 ms
    64 bytes from 39.156.66.10 (39.156.66.10): icmp_seq=3 ttl=128 time=44.9 ms
    64 bytes from 39.156.66.10 (39.156.66.10): icmp_seq=4 ttl=128 time=54.5 ms
    64 bytes from 39.156.66.10 (39.156.66.10): icmp_seq=5 ttl=128 time=46.4 ms
    64 bytes from 39.156.66.10 (39.156.66.10): icmp_seq=6 ttl=128 time=45.9 ms
    64 bytes from 39.156.66.10 (39.156.66.10): icmp_seq=7 ttl=128 time=48.9 ms
    ^C64 bytes from 39.156.66.10: icmp_seq=8 ttl=128 time=45.2 ms
    
    --- baidu.com ping statistics ---
    8 packets transmitted, 8 received, 0% packet loss, time 7018ms
    rtt min/avg/max/mdev = 44.920/47.080/54.541/3.055 ms
    root@huhy:~#
    
    
    
    # 到此节点基础配置完毕~节点使用的是清华源作为下载
    

    标签:66.10,00,39.156,虚拟机,192.168,huhy,ubuntu,root,安装
    From: https://www.cnblogs.com/hwiung/p/16649654.html

    相关文章

    • ubuntu20.04开启ipv6连接SSH
        所有操作均在root权限下进行1sudo-i  1、打开配置文件1vi/etc/ssh/sshd_config  2、编辑取消原有注释“#”,保存退出1#原有2#Port223......
    • window2012ServerR2 上安装mysql8遇到的问题
      安装教程:https://baijiahao.baidu.com/s?id=1734145282045952263&wfr=spider&for=pcwindow2012ServerR2上我在安装安装mysql8之前,最好把操作系统补丁打全,否则会遇到很多......
    • ubuntu20.04开启root权限登陆
       1、使用普通用户登录后切换root1sudo-i 2、修改root的密码1echoroot:123123|sudochpasswdroot  3、开启root登录1sudosed-i's/^#\?PermitR......
    • Ubuntu日常使用
      双系统是前阵子装的啦,有的东西可能记得不太清楚了。系统安装系统版本选择装Ubuntu的一大原因是要用ROS,而ROS还很挑Ubuntu版本。当前ROS已分出了ROS1和ROS2,虽然ROS1的......
    • Linux软件包常见的几种下载、安装方法
      在线源下载和安装如果服务器是处于在线状态,在使用默认下载源是外国的情况下,安装更新软件包往往会比较痛苦的存在,下载了许久来一个超时就gg了。国内有许多镜像源,完美的解决......
    • vue-element-admin v4.4 学习--1安装篇
      0.学习文档 https://www.bookstack.cn/read/vue-element-admin-4.4-zh/9a23281a80e29fc9.md 1.安装#克隆项目gitclonehttps://github.com/PanJiaChen/vue-eleme......
    • Ubuntu下为Apache2配置虚拟主机
      基础知识apache2的安装目录默认在/etc/apache2,目录结构:网站目录默认安装在/var/www/html,只有index.html一个文件,访问127.0.0.1时可以看到:VirtualHosting(虚拟主机)......
    • Windows wsl2 Alpine安装docker
      apkadd--no-cachedockeropenrclxcmusl-devopenrcmkdir-p/run/openrc/touch/run/openrc/softlevelservicedockerstartdockerps-a搞定!  参考:wsl2Alpin......
    • Mac安装nmap,运行脚本出现报错:AttributeError: module 'nmap' has no attribute 'PortS
      一、问题描述使用命令pip3installnmap之后执行python脚本,出现报错:AttributeError:module'nmap'hasnoattribute'PortScanner'。 二、问题解决流程1、首先......
    • clickhouse安装
      一、版本选择clickhouse对centos版本有要求,全部版本可以这里看https://repo.clickhouse.tech/tgz/不同的linux版本对应哪些可以这里看https://packagecloud.io/app/Al......