win11安装的Ubuntu20.04子系统出现System has not been booted with systemd as init system (PID 1)问题的解决流程

这篇具有很好参考价值的文章主要介绍了win11安装的Ubuntu20.04子系统出现System has not been booted with systemd as init system (PID 1)问题的解决流程。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

目录

一、前言

二、具体解决方法

第一步:切换root用户至自己账号

第二步:重新安装xrdp

第三步:重新配置端口并启动xrdp

第四步:打开远程连接窗口

第五步:点击连接,开始进入Linux子系统​编辑

第六步:切换到的账户的输入密码,并点击认证

 第七步:成功进入Ubuntu20.04 

 三、尾言


一、前言

        由于研究方向是无人机路径规划需要用到ros机器人操作系统,我就在Win11系统的电脑上安装了一个Ubuntu20.04LTS版本的Linux子系统。之后我在打开linux子系统的情况下把自己的win11主系统给关机了,后来再把电脑开机通过远程桌面连接去访问Linux子系统时出现了下面的错误:

System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: 主机关闭

二、具体解决方法

按照下面的操作就行了: 

第一步:切换root用户至自己账号

自己账号就是安装ubuntu20.04时自己创建的那个用户账号

运行命令:

root@LAPTOP-S0G7C3PS:~# su renlinchao

 现象:

Sleeping for 1 second to let systemd settle
Welcome to Ubuntu 20.04.5 LTS (GNU/Linux 5.10.16.3-microsoft-standard-WSL2 x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

  System information as of 2022年 10月 15日 星期六 19:28:27 CST

  System load:  0.0                Processes:             44
  Usage of /:   4.8% of 250.98GB   Users logged in:       0
  Memory usage: 5%                 IPv4 address for eth0: 172.27.54.91
  Swap usage:   0%

 * Super-optimized for small spaces - read how we shrank the memory
   footprint of MicroK8s to make it the smallest full K8s around.

   https://ubuntu.com/blog/microk8s-memory-optimisation

0 更新可以立即应用。

第二步:重新安装xrdp

sudo apt-get install xrdp

现象:

[sudo] renlinchao 的密码:
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
xrdp 已经是最新版 (0.9.12-1)。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。

第三步:重新配置端口并启动xrdp

运行命令:

sudo sed -i 's/3389/3390/g' /etc/xrdp/xrdp.ini
echo "gnome-session" > ~/.xsession
sudo systemctl restart xrdp
sudo systemctl status xrdp

现象:

● xrdp.service - xrdp daemon
     Loaded: loaded (/lib/systemd/system/xrdp.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2022-10-15 20:55:15 CST; 8s ago
       Docs: man:xrdp(8)
             man:xrdp.ini(5)
    Process: 570 ExecStartPre=/bin/sh /usr/share/xrdp/socksetup (code=exited, status=0/SUCCESS)
    Process: 578 ExecStart=/usr/sbin/xrdp $XRDP_OPTIONS (code=exited, status=0/SUCCESS)
   Main PID: 579 (xrdp)
      Tasks: 1 (limit: 4634)
     Memory: 1.2M
     CGroup: /system.slice/xrdp.service
             └─579 /usr/sbin/xrdp

Oct 15 20:55:14 LAPTOP-S0G7C3PS xrdp[578]: (578)(139874801551168)[INFO ] address [0.0.0.0] port [3390] mode 1
Oct 15 20:55:14 LAPTOP-S0G7C3PS xrdp[578]: (578)(139874801551168)[INFO ] listening to port 3390 on 0.0.0.0
Oct 15 20:55:14 LAPTOP-S0G7C3PS xrdp[578]: (578)(139874801551168)[INFO ] xrdp_listen_pp done
Oct 15 20:55:14 LAPTOP-S0G7C3PS xrdp[578]: (578)(139874801551168)[DEBUG] Closed socket 7 (AF_INET6 :: port 3390)
Oct 15 20:55:14 LAPTOP-S0G7C3PS systemd[1]: xrdp.service: Can't open PID file /run/xrdp/xrdp.pid (yet?) after start: 不>Oct 15 20:55:15 LAPTOP-S0G7C3PS systemd[1]: Started xrdp daemon.
Oct 15 20:55:16 LAPTOP-S0G7C3PS xrdp[579]: (579)(139874801551168)[INFO ] starting xrdp with pid 579
Oct 15 20:55:16 LAPTOP-S0G7C3PS xrdp[579]: (579)(139874801551168)[INFO ] address [0.0.0.0] port [3390] mode 1
Oct 15 20:55:16 LAPTOP-S0G7C3PS xrdp[579]: (579)(139874801551168)[INFO ] listening to port 3390 on 0.0.0.0
Oct 15 20:55:16 LAPTOP-S0G7C3PS xrdp[579]: (579)(139874801551168)[INFO ] xrdp_listen_pp done
lines 1-23/23 (END)...skipping...
● xrdp.service - xrdp daemon
     Loaded: loaded (/lib/systemd/system/xrdp.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2022-10-15 20:55:15 CST; 8s ago
       Docs: man:xrdp(8)
             man:xrdp.ini(5)
    Process: 570 ExecStartPre=/bin/sh /usr/share/xrdp/socksetup (code=exited, status=0/SUCCESS)
    Process: 578 ExecStart=/usr/sbin/xrdp $XRDP_OPTIONS (code=exited, status=0/SUCCESS)
   Main PID: 579 (xrdp)
      Tasks: 1 (limit: 4634)
     Memory: 1.2M
     CGroup: /system.slice/xrdp.service
             └─579 /usr/sbin/xrdp

Oct 15 20:55:14 LAPTOP-S0G7C3PS xrdp[578]: (578)(139874801551168)[INFO ] address [0.0.0.0] port [3390] mode 1
Oct 15 20:55:14 LAPTOP-S0G7C3PS xrdp[578]: (578)(139874801551168)[INFO ] listening to port 3390 on 0.0.0.0
Oct 15 20:55:14 LAPTOP-S0G7C3PS xrdp[578]: (578)(139874801551168)[INFO ] xrdp_listen_pp done
Oct 15 20:55:14 LAPTOP-S0G7C3PS xrdp[578]: (578)(139874801551168)[DEBUG] Closed socket 7 (AF_INET6 :: port 3390)
Oct 15 20:55:14 LAPTOP-S0G7C3PS systemd[1]: xrdp.service: Can't open PID file /run/xrdp/xrdp.pid (yet?) after start: 不 允许的操作
Oct 15 20:55:15 LAPTOP-S0G7C3PS systemd[1]: Started xrdp daemon.
Oct 15 20:55:16 LAPTOP-S0G7C3PS xrdp[579]: (579)(139874801551168)[INFO ] starting xrdp with pid 579
Oct 15 20:55:16 LAPTOP-S0G7C3PS xrdp[579]: (579)(139874801551168)[INFO ] address [0.0.0.0] port [3390] mode 1
Oct 15 20:55:16 LAPTOP-S0G7C3PS xrdp[579]: (579)(139874801551168)[INFO ] listening to port 3390 on 0.0.0.0
Oct 15 20:55:16 LAPTOP-S0G7C3PS xrdp[579]: (579)(139874801551168)[INFO ] xrdp_listen_pp done

第四步:打开远程连接窗口

ubuntu system has not been booted with systemd as init system (pid 1). can't,基本网络协议入门,linux,运维,服务器,linux子系统

第五步:点击连接,开始进入Linux子系统

第六步:切换到的账户的输入密码,并点击认证

ubuntu system has not been booted with systemd as init system (pid 1). can't,基本网络协议入门,linux,运维,服务器,linux子系统

 第七步:成功进入Ubuntu20.04 

ubuntu system has not been booted with systemd as init system (pid 1). can't,基本网络协议入门,linux,运维,服务器,linux子系统

 三、尾言

         尝试新事物重新各种各样的错误是肯定的,出现某种错误的原因也是多种多样的,如果上面的流程没有解决你的问题可以下面留言或者直接加我微信问我都是可以的,都是免费的,学技术问人不丢人,关键是要知道去学,不要让自己的大学四年或者研究生三年白白浪费了。文章来源地址https://www.toymoban.com/news/detail-595552.html

到了这里,关于win11安装的Ubuntu20.04子系统出现System has not been booted with systemd as init system (PID 1)问题的解决流程的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • 为解决Win11子系统的Ubuntu被删除后,重新安装出现找不到系统路径问题,无法正常安装

    出现如下问题如下: C:UsersHPwsl 无法将磁盘“C:UsersHPAppDataLocalPackagesCanonicalGroupLimited.Ubuntu_79rhkp1fndgscLocalStateext4.vhdx”附加到 WSL2: 系统找不到指定的文件。 Error code: Wsl/Service/CreateInstance/MountVhd/HCS/ERROR_FILE_NOT_FOUND怎么解决 解决方法如下: 一、先使用如下命令查看全部环

    2024年02月04日
    浏览(48)
  • 【联想PC win11系统安装Ubuntu18.04/Ubuntu20.04】全程记录安装过程,和网卡驱动、显卡驱动等安装以及后续一系列问题

    电脑为联想台式机:Lenovo IdeaCentre-GeekPro 内存:32G 磁盘:512G固态硬盘+2T机械硬盘 CPU:i7-12700 GPU:NVIDIA RTX3060 学习需要安装Ubuntu18.04和win11系统共存。 之前装过Ubuntu16.04因为内核版本太老,显卡、声卡、有线无线网卡、蓝牙驱动都没有…,直接一个毛坯房了属于是,没有显卡驱

    2024年02月04日
    浏览(81)
  • win11 使用 WSL2 安装 linux 子系统 ubuntu 出现错误:无法解析服务器的名称或地址

    解决方法: 记事本打开 C:WindowsSystem32driversetchosts 文件, 添加如下解析地址 #raw.githubusercontent.com 185.199.108.133 raw.githubusercontent.com 185.199.109.133 raw.githubusercontent.com 185.199.110.133 raw.githubusercontent.com 185.199.111.133 raw.githubusercontent.com ifconfig /flushdns 查看可安装的 WSL wsl --list --onlin

    2024年04月27日
    浏览(45)
  • Win11系统安装安卓子系统教程

    随着Win11系统的不断普及,以及硬件设备的更新换代,我相信很多同学都已经更新并使用到了最新的Win11系统。那么,Win11系统最受期待的功能“Windows Subsystem for Android”(简称WSA),即《安卓子系统》。他可以让你在Win11 PC上直接安装运行各种安卓手机APP应用与游戏,无需安装

    2024年04月12日
    浏览(74)
  • Win11 安装WSA(安卓子系统)指南

    进入 Microsoft Store - Generation Project (v1.2.3) [by @rgadguard mkuba50] https://store.rg-adguard.net/ ( 微软商店的在线链接生成器 ) 在URL中输入 WSA 微软商店链接 :

    2023年04月08日
    浏览(31)
  • 五分钟Win11安装安卓(Android)子系统

    十分钟,完成win11安装安卓子系统 Win+i 进入设置页面,选择 时间和语言 - 语言和区域 - 区域-美国 访问如下连接,install即可 安卓子系统 在开始菜单找到子系统,点开,做如下配置: 打开应用商店,安卓APK安装程序 下载应用宝手机版,APK文件,双击,有什么点什么,即可

    2024年02月02日
    浏览(43)
  • VMware安装Win11+WSA子系统和使用教程

    VMware安装Win11+WSA子系统和使用教程 作者:Sna1lGo 时间:2022/9/29 Win11镜像:Download Windows 11 (microsoft.com) VMware:下载 VMware Workstation Pro - VMware Customer Connect VMware激活码在网上随便搜一个。 win11激活码不需要。 采用正常流程搭建虚拟机。(省略) 修改虚拟机配置: 修改内存为4GB,

    2024年02月02日
    浏览(44)
  • win11卸载Ubuntu 20.04 WSL

    Ubuntu 20.04 LTS可以通过Microsoft Store进行安装,但是不能通过Microsoft Store卸载。现列举两种卸载方式。 1、查找到安装的ubuntu 2、卸载 1、查看当前环境安装的wsl 2、注销(卸载)当前安装的Linux的Windows子系统(名称要与list获取的一致) 3、卸载成功,查看当前安装的Linux的Windows子

    2024年02月12日
    浏览(42)
  • wsl子系统Ubuntu18.04,cuDNN安装

    如果觉得本篇文章对您的学习起到帮助作用,请 点赞 + 关注 + 评论 ,留下您的足迹💪💪💪 本文主要wls子系统Ubuntu18.04安装cuDNN,安装cudnn坑巨多,因此记录以备日后查看,同时,如果能够帮助到更多人,也不胜荣幸。 下载Debian本地存储库安装包。在发出以下命令之前,必须

    2024年02月11日
    浏览(33)
  • 【Ubuntu】【Windows】windows11下安装Ubuntu子系统

    需要的电脑配置较低,内存较小。一般来说,windows下安装Ubuntu子系统比在虚拟机中安装Ubuntu需要更少资源。 Windows下学习Ubuntu。 Windows下学习LinuxC/C++编程。 【图片】打开Microsoft Store并搜索Ubuntu 【图片]】安装Ubuntu。 下图中,电脑已经安装好Ubuntu,因此显示打开。 Microsoft Sto

    2024年02月07日
    浏览(39)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包