修改grub配置文件

对于安装多系统的主机来说,有时需要修改grub配置来进行一些个性化定制。 最新版的grub配置文件位于/etc/default/grub,我们可以对其进行修改,然后再使用grub-mkconfig命令来生成引导配置。 以下是一个/etc/default/grub文件实例 # 启动菜单显示时间,这里是3秒 GRUB_TIMEOUT=3 # 系统标识名,这里使用sed命令来生成 GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)" # 默认启动项,这里是3,序号从0开始排,本机0是fedora,3是windows GRUB_DEFAULT=3 # 禁用子菜单,所有选项同级菜单显示 GRUB_DISABLE_SUBMENU=true # 输出设备,这里为本机终端console GRUB_TERMINAL_OUTPUT="console" # linux内核附带参数 GRUB_CMDLINE_LINUX="resume=UUID=c0821d08-d462-46b9-b56b-40105a046cdf rhgb quiet" # 禁用显示恢复模式 GRUB_DISABLE_RECOVERY="true" GRUB_ENABLE_BLSCFG=true 按需修改完/etc/default/grub后,就可以使用grub-mkconfig命令来生成引导配置 bbq@op36:~$ sudo grub-mkconfig -o /boot/grub/grub.cfg Generating grub configuration file ... Found Windows Boot Manager on /dev/nvme0n1p1@/EFI/Microsoft/Boot/bootmgfw.efi Adding boot menu entry for UEFI Firmware Settings ... done 注 有的系统使用的是grub2-mkconfig命令,配置文件为/boot/grub2/grub.cfg

五月 4, 2025 · jqx

python-pip安装实例

Python-pip 是一个现代的,通用的 Python包管理工具。提供了对 Python 包的查找、下载、安装、卸载的功能。 以下为多个操作系统平台下Python-pip安装方法 通用方法 通过get-pip.py文件来安装,建议Windows用户使用,前提是你必须首先安装Python。 版本要求Python 2 >=2.7.9 或Python 3 >=3.4,可从官网下载http://www.python.org/ 然后下载get-pip.py 下载地址 https://bootstrap.pypa.io/get-pip.py 通过python get-pip.py命令来进行安装。 Linux下通过软件管理工具来安装Python-pip Fedora21 Python2 sudo yum upgrade python-setuptools sudo yum install python-pip python-wheel Python3 sudo yum install python3 python3-wheel Fedora22 Python2 sudo dnf upgrade python-setuptools sudo dnf install python-pip python-wheel Python3 sudo dnf install python3 python3-wheel CentOS/RHEL 首先得启用EPEL repository,可参考此文 EPEL 6/EPEL 7 sudo yum install python-pip EPEL 7 sudo yum install python-wheel OpenSUSE Python 2: ...

四月 20, 2017 · jqx