我使用的是安装了 Windows Subsystem for Linux (WSL) 的 Ubuntu 终端环境。版本是 Ubuntu 20.04.1 LTS (GNU/Linux 4.4.0-18362-Microsoft x86_64)。按照各个站点的说明在我的 WIndows 10 PC 上设置 Wireguard VPN 服务器,我发出以下命令:
systemctl enable wg-quick@wg0.service
systemctl start wg-quick@wg0.service
Run Code Online (Sandbox Code Playgroud)
这会导致以下错误消息:
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down.
Run Code Online (Sandbox Code Playgroud)
我花了几天时间进行研究,现在对如何继续感到非常困惑。谁能帮帮我吗。
上周末左右,我的快照停止工作,包括 Ubuntu 软件。结果突然snap就不再安装了。音频也完全停止工作,此时我认为这与 snap 有关,因为我从 Ubuntu 软件商店安装了“PulseAudio Volume Control (gtk)”。
我重新安装了snap,apt install snap所有的快照都再次正常工作。即使多次重新启动后,音频仍然无法工作。手动启动 Pulsepulseaudio --start可修复音频,直至下次重新启动。我开始调查为什么 Pulse 守护进程在启动后没有启动,但请注意,我对systemd. systemd当然,在这个问题之前我并没有乱搞。所以我猜是某些更新造成的?
显然upowerd,用户服务在启动后无法启动:
$ systemctl --failed\nUNIT LOAD ACTIVE SUB DESCRIPTION \nupower.service loaded failed failed Daemon for power management\nuser@1000.service loaded failed failed User Manager for UID 1000 \nuser@125.service loaded failed failed User Manager for UID 125 \nRun Code Online (Sandbox Code Playgroud)\n$ id -un 1000产生我的用户名并$ id -un 125产生gdm …
我从存储库安装了“onedrive”。效果很好,但我不希望它自动启动。我厌倦了每次重新启动后都将其关闭 - 如何修复它?我正在使用它关闭它,systemctl --user stop onedrive
我预计systemctl --user disable onedrive会关闭自动启动,但它没有效果 - systemctl --user status onedrivestil 显示enabled;:
Loaded: loaded (/usr/lib/systemd/user/onedrive.service; enabled; vendor preset: enabled)
Run Code Online (Sandbox Code Playgroud)
并在重新启动后启动。
我只是好奇当 Ubuntu 实现 systemd 251 时,社区会如何阻碍。目前,22.04 实现了 systemd 249。
在 WSL 中的 Ubuntu 中执行sudo systemctl poweroff并重新启动后,我看到:
<3>WSL (814) ERROR: UtilTranslatePathList:2671: Failed to translate C:\Program Files\PowerShell\7
<3>WSL (814) ERROR: UtilTranslatePathList:2671: Failed to translate C:\Windows\System32\OpenSSH\
<3>WSL (814) ERROR: UtilTranslatePathList:2671: Failed to translate C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common
<3>WSL (814) ERROR: UtilTranslatePathList:2671: Failed to translate C:\Program Files\dotnet\
...
Run Code Online (Sandbox Code Playgroud)
Ubuntu 启动,但没有 Windows 驱动器安装到 WSL 中。此外,Ubuntu 不久后就会退出。重新启动后,一切似乎都很好。
这是怎么回事?我该如何解决这个问题?
我有一个调用脚本的 Systemd 服务。该脚本采用它自己的参数,其中一些是命名参数。我目前有以下服务:
[Unit]
Description=My Service
StartLimitIntervalSec=0
[Service]
Type=simple
Restart=no
User=corvus
Environment="ARGS=%I"
ExecStart=/path/to/script.sh $ARGS
[Install]
WantedBy=multi-user.target
Run Code Online (Sandbox Code Playgroud)
我尝试使用以下内容调用脚本:
$ sudo systemctl start myservice@"--flag argument".service
Run Code Online (Sandbox Code Playgroud)
然而,这似乎不起作用,并且--标志的部分似乎被转换为//. 该服务看起来正在运行,但似乎并未运行,并且在信息中我可以看到它systemd status已将.--//
我试图-通过在它们前面加上前缀来逃避\,但是这也不起作用,而且服务实际上并不是用这种方法启动的。
任何建议或尝试的事情将不胜感激!
嘿互联网人!
我在笔记本电脑上保存/恢复亮度时遇到问题...我正在使用 Xfce4 运行 Ubuntu 15.04 服务器,但默认启动到命令行。
我现在的问题是,除非我启动 Xfce 并通过 更改亮度,否则xBacklight -set 5不会改变显示器的亮度。在全亮度下命令提示符看起来不错,但会像地狱一样消耗电池,我不需要它。
我已经阅读了有关使用 systemd-backlight 的内容,但是我找不到有关如何使用它的任何信息,也找不到有关如何使用它的任何信息,或者无法在启动时恢复我的亮度……此外,这是否可以在不启动 X 的情况下工作?甚至有没有办法在不启动 X 的情况下更改屏幕亮度?
(如果重要:运行具有英特尔和 nvidia 双显卡的华硕 N550JK,称为 optimus ......我没有使用它,只使用英特尔的。xBacklight更改 中的值/sys/class/backlight/intel_backlight/brightness,我想要的值是244)
谢谢你的一切!
在https://askubuntu.com/a/119818/5032 qbi 中说:
将 noauto 添加到您的 fstab:
...
所以文件系统不会在启动时自动挂载。此外,您编写了一个脚本,该脚本基本上安装了您的 mhddfs 并在启动过程的某个后期添加它。
但是你怎么做呢?我的 mergefs 在启动时从不安装所有驱动器,大概是因为它们之前没有安装?这是 fstab 中的最后一个条目,如下所示(但有更多驱动器):
/mnt/EXT4_drive/drivepool:/mnt/NTFS_drive/drivepool:/mnt/anotherdrive/drivepool /mnt/drivepool fuse.mergerfs defaults,allow_other,minfreespace=100M 0 0
Run Code Online (Sandbox Code Playgroud)
当我df在启动后运行时,驱动器名称只显示包含了一些挂载点,以及所有挂载点应该具有的一小部分空间,所以如果它们没有准备好就不包含在内?我必须sudo umount /mnt/drivepool ; sudo mount /mnt/drivepool在启动后手动运行才能修复它并显示所有这些。
计算机也不止一次启动到“欢迎使用紧急模式!” 当其中一个驱动器在尝试安装时被自动 fscked 时/mnt/drivepool。这最近没有发生,也许是因为 mergefs 的变化让它忽略了未就绪的驱动器而不是因为它们而停止?
我怎么会自动挂载/mnt/drivepool尽快之后fstab中一切已成功安装并fscked?
Since I attempted to set up an encrypted swap partition (Encrypted swap partition does not show up in /dev/mapper), I get an error during boot that the networking.service could not be started.
Here's the info I get when running the command described in the error message:
$ systemctl status networking.service
? networking.service - Raise network interfaces
Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
Drop-In: /run/systemd/generator/networking.service.d
??50-insserv.conf-$network.conf
Active: failed (Result: exit-code) since Mi 2016-08-10 22:57:45 CEST; 10min ago
Docs: …Run Code Online (Sandbox Code Playgroud) 我在 Beaglebone Green 上启动 GPSD 时遇到问题。我收到套接字绑定错误:
root@BBG1:/etc/init# gpsd -D3 -n -N /dev/ttyUSB0
gpsd:INFO: launching (Version 3.16)
gpsd:ERROR: can't bind to IPv4 port gpsd, Address already in use
gpsd:ERROR: maybe gpsd is already running!
gpsd:ERROR: can't bind to IPv6 port gpsd, Address already in use
gpsd:ERROR: maybe gpsd is already running!
gpsd:INFO: command sockets creation failed, netlib errors -1, -1
Run Code Online (Sandbox Code Playgroud)
看起来这个问题在这些迷你开发板(包括 Raspberry Pi)上很常见,但似乎对大多数人来说解决问题的方法对我不起作用。据我所知,这是因为systemd/init正在击败 gspd。
root@BBG1:/etc/init# netstat -lnpt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address …Run Code Online (Sandbox Code Playgroud)