记录一次安装Fedora

Fedora是一个Linux发行版,是一款由全球社区爱好者构建的面向日常应用的快速、稳定、强大的操作系统。它允许任何人自由地使用、修改和重发布,目标是创建一套新颖、多功能并且自由的操作系统。

0x01 官网下载Fedora系统镜像文件

官网:Fedora (getfedora.org)

点击:

image-20220910111720142

image-20220910111740868

等待下载完成。

0x02 通过VMware虚拟机进行安装

image-20220910111833164

根据过程一步步安装完成即可。

0x03 更换软件源地址

进入yum源的存储文件,进行备份和替换。

1
2
mv /etc/yum.repos.d/fedora.repo /etc/yum.repos.d/fedora.repo.backup
mv /etc/yum.repos.d/fedora-updates.repo /etc/yum.repos.d/fedora-updates.repo.backup
1
2
wget -O /etc/yum.repos.d/fedora-updates.repo http://mirrors.aliyun.com/repo/fedora-updates.repo
wget -O /etc/yum.repos.d/fedora.repo http://mirrors.aliyun.com/repo/fedora.repo

更新yum缓存,使更改失效。

1
yum makecache

以上命令在root用户下使用,非root用户请在命令前添加sudo。

0x04 更新系统文件和软件

1
yum upgrade && yum update

更换了源之后,下载软件跟拉屎一样流畅。

image-20220910112539522

0x05 使用zsh终端

安装 zsh 终端

1
sudo yum install -y zsh

查看当前终端:

1
echo $SHELL

查看已有终端:

1
cat /etc/shells

image-20220910113058184

更换终端为zsh

1
sudo chsh -s /bin/zsh

image-20220910113408484

重新登入后生效,或者直接输入zsh切换终端。

0x06 安装Oh my zsh美化终端

安装git

1
sudo yum install -y git

安装oh my zsh

1
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh

出现以下选项:

image-20220910115545042

输入Y

image-20220910115649477

安装完成。

查看oh my zsh现有主题

1
2
cd ~/.oh-my-zsh/themes
ls -h

查看oh my zsh配置文件.zshrc

1
vim ~/.zshrc

image-20220910120004680

修改此处即可更换主题。

在其中找到plugin字段,可以进行添加插件:

image-20220910120343933

下载插件zsh-syntax-highlighting

1
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

下载插件zsh-autosuggestions

1
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

.zshrc添加我常用的几个插件

image-20220910120518365

应用更改:

1
source ~/.zshrc

image-20220910121424455

完成!