安装图形驱动程序需要退出GUI / Gnome并进入终端。在Ubuntu 18.04中如何做到这一点? Ctrl(STRG)+Alt+F1...F7不起作用,无论是在桌面上还是在登录界面上...
我使用的是18.04版本的笔记本电脑。
我需要同时按下Fn以及Ctrl+Alt+F3。
Ctl+Alt+F2
或者,您可以进入单用户模式,尽管您可能不希望这样做,因为在此模式下连接互联网可能会有些棘手。
我个人喜欢进入恢复模式的方式是设置
init=/bin/bash
mount -o remount,rw /
ifconfig eth0 up
对于以太网。如果您使用WiFi,请尝试这个问题。
systemd.unit=multi-user.target
作为内核参数传递。因此,在我的/boot/grub/grub.cfg
文件中,我有以下条目:menuentry 'Ubuntu Console Linux 4.15.0-23-generic' {
linux /boot/vmlinuz-4.15.0-23-generic root=/dev/sdb1 ro rootfstype=ext4 apparmor=0 quiet systemd.unit=multi-user.target
initrd /boot/initrd.img-4.15.0-23-generic
}
grub.cfg
文件中充斥着各种不必要的信息。我通常会删除所有这些内容,并保留上述代码块以及一个类似的代码块,但不包含systemd.unit=multi-user.target
,该代码块用于启动gdm
(X11 GNOME显示管理器)。choose advanced options in Grub
choose recovery mode
in the options that show up, one can load the network driver and mount r/w
(mount r/w is part of the load network driver and dpkg options)
choose "root..." to get to the console
(use "mount -o remount,rw /" to get read and write access if not done with the options above already)
su
是切换用户的命令。也许有一些su
的实现方式可以直接跟随要以root身份(或其他用户)运行的命令,而无需以任何方式指定用户,但我不认为在Ubuntu上可以这样工作。最简单的方法是根本不使用su
,只需使用sudo init 3
。如今,切换到运行级别3的“正确”方式可能是sudo systemctl isolate multi.user.target
。虽然看起来似乎不起作用XD - Zanna
STRG
+c
可以停止运行命令吗? - NerdOfLinux/etc/systemd/logind.conf
的内容。使用man logind.conf
获取更多信息。 - xiota