我不明白为什么每次我想运行命令时都会弹出此错误systemctl
。我知道我必须使用 来运行它sudo
,它运行得很好,但我很好奇,为什么会发生这种情况?以前没有发生过这种情况,除了配置我的/etc/ssh/sshd_config
文件之外,我没有做任何特别的事情。
在此之前,如果我运行systemctl
不带 的命令sudo
,则会显示一条文本响应,请求我的用户的密码
但现在,这个请求不再弹出了!这是为什么?
\nuser@machine:~$ systemctl restart sshd\nFailed to restart sshd.service: Interactive authentication required.\nSee system logs and \'systemctl status sshd.service\' for details.\n
Run Code Online (Sandbox Code Playgroud)\n当我运行systemctl status sshd
命令时,我收到此错误:Couldn\'t open /etc/securetty: No such file or directory
。这是什么意思?\n顺便说一句,我的机器上有 Ubuntu 20.04 LTS。
user@machine:~$ systemctl status sshd\n\xe2\x97\x8f ssh.service - OpenBSD Secure Shell server\n Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)\n Active: active (running) since Fri 2021-05-21 19:47:32 …
Run Code Online (Sandbox Code Playgroud) 我试图以rtorrent
运行systemd service
,但服务无法启动。这是配置文件和我可以获得的任何日志。如果需要,请询问更多信息。\n我正在运行:
$ lsb_release -a\nNo LSB modules are available.\nDistributor ID: Ubuntu\nDescription: Ubuntu 20.04.2 LTS\nRelease: 20.04\nCodename: focal\n
Run Code Online (Sandbox Code Playgroud)\n$ systemctl status rtorrent\n\xe2\x97\x8f rtorrent.service - rTorrent\n Loaded: loaded (/etc/systemd/system/rtorrent.service; enabled; vendor preset: enabled)\n Active: failed (Result: exit-code) since Thu 2021-05-27 08:52:43 EEST; 5min ago\n Process: 20199 ExecStart=/usr/bin/tmux new-session -d -P -s rt -n rtorrent /usr/bin/rtorrent (code=exited, status=0/SUCCESS)\n Process: 20205 ExecStop=/usr/bin/tmux send-keys -t rt:rtorrent C-q (code=exited, status=1/FAILURE)\n Main PID: 20201 (code=exited, status=0/SUCCESS)\n\nMay 27 08:52:43 $MACHINE systemd[1]: Starting rTorrent...\nMay …
Run Code Online (Sandbox Code Playgroud) 如何以最简单的方式在 GNOME 40 中重新映射Super+组合键?Number
在安装 Gnome 40 时,我一直在寻找解决方案。问题是默认情况下它会打开我最喜欢的“停靠”应用程序,但我想重新映射它以切换工作区。
我需要一次覆盖许多服务器上的一些配置,并且我想在创建备份时修改原始配置文件,只是出于好奇,所有这些都可以用 sed 完成吗?
有人提到了这种模式,但它不起作用。
new_port="..."
sed -i .bak "s/port=2334/${new_port}/g"
Run Code Online (Sandbox Code Playgroud) bash ×2
linux ×2
systemd ×2
command-line ×1
daemon ×1
gnome ×1
rtorrent ×1
sed ×1
shell-script ×1
ssh ×1