所以,我有一个双启动,只是 nuked Windows 分区,然后摆脱了 Windows 的启动文件并更新了 grub,现在我的 PC 直接启动到 ubuntu。但是,我仍然希望拥有 grub 选项,以便我可以在内核之间切换,并且我想让它成为永久性的。
我已经阅读了有关此事的信息,我发现建议从 grub 文件中注释以下行:
GRUB_HIDDEN_TIMEOUT=0
Run Code Online (Sandbox Code Playgroud)
但是,文件中没有这样的行,其唯一内容是:
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'
GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch …Run Code Online (Sandbox Code Playgroud) 我在我的 HP 上运行 Ubuntu 18.04,在双启动之前,当我只有 Windows 时,我总是按下F12键来轻松打开和关闭 Wifi。现在这是唯一在 Ubuntu 上不起作用的键。
我已经尝试过 bash 脚本和键盘设置,但无济于事。最多,我设法让消息显示出来,但 wifi 保持不变。(此外,设置不会让我F12单独设置,所以我设置了Ctrl+ F12;尽管现在这是我最不关心的)
到现在为止,我有这个:
#!/bin/sh
if [ $(nmcli nm wifi | awk '/led/ {print}') = 'enabled' ] ; then
nmcli nm wifi off
# notify-send -i network-wireless-none "Wireless" "Wireless disabled"
echo 'wifi off'
else
nmcli nm wifi on
notify-send -i network-wireless-none "Wireless" "Wireless enabled"
echo 'wifi on'
fi
Run Code Online (Sandbox Code Playgroud)
可能有什么问题?