双系统
uefi+gpt下win10/fedora双系统实现方案
UEFI模式下Win10+Fedora25双系统安装
Fedora yum源配置
- 下载网易yum源
到[,在其首页上找到并点击“Fedora使用帮助“,下载repo文件并拷贝到/etc/yum.repos.d/目录下,进入下载的目录
# cp fedora-updates-163.repo /etc/yum.repos.d/# cp fedora-163.repo /etc/yum.repos.d/
- 下载开源软件库
下载著名的第三方yum源
rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
-
建立yum缓存
# yum clean all# yum makecache
参考:
fedora普通用户修改root密码
fedora的workstation版本的默认密码是一串乱码,所以我们如果需要root权限的话就需要重置root的密码。
-
通过sudo命令获得权限
sudo su
-
输入我们当前用户的密码
-
通过passwd更改root的密码
passwd root
-
输入两次root的密码
-
通过exit退出su界面
原文:
开机启动
- 查看/usr/lib/systemd/system/rc-local.service
其中ExecStart=/etc/rc.d/rc.local start指向服务文件
- 创建/etc/rc.d/rc.local 文件
#!/bin/bash sh /usr/share/xx-net/code/default/xx_net.sh exit 0
-
赋以可执行权限
#chmod +x /etc/rc.d/rc.local
-
然后使用systemd开机自启动
#systemctl enable rc-local.service
-
设置systemd需要在多用户启动时还是图形启动时自启动这个脚本
编辑/usr/lib/systemd/system/rc-local.service,加入Install部分
# This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # This unit gets pulled automatically into multi-user.target by # systemd-rc-local-generator if /etc/rc.d/rc.local is executable. [Unit] Description=/etc/rc.d/rc.local Compatibility ConditionFileIsExecutable=/etc/rc.d/rc.local After=network.target [Service] Type=forking ExecStart=/etc/rc.d/rc.local start TimeoutSec=0 RemainAfterExit=yes [Install] WantedBy=multi-user.target
-
再使用systemd开机自启动
#systemctl enable rc-local.service
-
查看状态
#systemctl status rc-local.service
参考:
http://blog.csdn.net/ztguang/article/details/52176067http://www.edward-han.com/341.htmlhttps://semsevens.com/2016/03/08/make-startup-script-in-fedora/https://www.m00nie.com/2012/07/check-service-is-running-with-systemctl-and-start-it-if-stopped-mail/
設置Fedora合盖不睡眠
文件 / etc / systemd / logind . conf
HandlePowerKey:按下電源鍵後的動作HandleSleepKey:按下掛起鍵後的動作HandleHibernateKey: 按下休眠鍵後的動作HandleLidSwitch:合上筆記本蓋後待機 poweroff 关闭suspend 待机hibernate 休眠
参考: