[{"categories":"Arch Linux","collections":null,"content":"该配置由ChatGPT完成，经笔者修改测试后完全可用(注释可以不看) ","date":"2024-10-02","heading":"该配置由ChatGPT完成，经笔者修改测试后完全可用(注释可以不看)","objectID":"/posts/neovim_cmp_other-fmt/:0:0","tags":["Linux","Neovim"],"title":"Neovim使用`conform.nvim`或`none-ls.nvim`实现格式化代码","uri":"/posts/neovim_cmp_other-fmt/#该配置由chatgpt完成经笔者修改测试后完全可用注释可以不看"},{"categories":"Arch Linux","collections":null,"content":"Conform.nvim Lightweight yet powerful formatter plugin for Neovim (轻量但强大的Neovim代码格式化插件) —— GitHub描述 ","date":"2024-10-02","heading":"","objectID":"/posts/neovim_cmp_other-fmt/:0:0","tags":["Linux","Neovim"],"title":"Neovim使用`conform.nvim`或`none-ls.nvim`实现格式化代码","uri":"/posts/neovim_cmp_other-fmt/#conformnvim"},{"categories":"Arch Linux","collections":null,"content":"开始使用 首先，先安装conform.nvim return { { \"stevearc/conform.nvim\", -- 安装插件 config = function() -- 配置conform，使用black和isort格式化Python require(\"conform\").setup({ formatters_by_ft = { -- python = { \"black\" }, python = { \"black\" }, lua = { 'lua-ls' }, }, }) -- 自动格式化配置 -- vim.api.nvim_create_autocmd(\"BufWritePre\", { -- pattern = \"*.py\", -- callback = function(args) -- require(\"conform\").format({ bufnr = args.buf }) -- end, -- }) end, } } 然后保存，重新进入Neovim就可以看见lazy.nvim正在安装了。 ","date":"2024-10-02","heading":"开始使用","objectID":"/posts/neovim_cmp_other-fmt/:1:0","tags":["Linux","Neovim"],"title":"Neovim使用`conform.nvim`或`none-ls.nvim`实现格式化代码","uri":"/posts/neovim_cmp_other-fmt/#开始使用"},{"categories":"Arch Linux","collections":null,"content":"安装代码格式化工具 以Python为例 # Arch Linux sudo pacman -S python-black 来安装black。你也可以用isort等 formatters_by_ft是一个列表，你可以添加你所用编程语言的格式化工具，如 formatters_by_ft = { bash = { 'beautysh' }, } 关于格式化工具，你可以查看： Conform文档 或通过在Neovim中使用:help conform-formatters来查看 ","date":"2024-10-02","heading":"安装代码格式化工具","objectID":"/posts/neovim_cmp_other-fmt/:1:1","tags":["Linux","Neovim"],"title":"Neovim使用`conform.nvim`或`none-ls.nvim`实现格式化代码","uri":"/posts/neovim_cmp_other-fmt/#安装代码格式化工具"},{"categories":"Arch Linux","collections":null,"content":"格式化代码 你只需要使用:lua require(\u0026quot;conform\u0026quot;).format()的命令来进行代码格式化。 ","date":"2024-10-02","heading":"格式化代码","objectID":"/posts/neovim_cmp_other-fmt/:2:0","tags":["Linux","Neovim"],"title":"Neovim使用`conform.nvim`或`none-ls.nvim`实现格式化代码","uri":"/posts/neovim_cmp_other-fmt/#格式化代码"},{"categories":"Arch Linux","collections":null,"content":"关于保存时自动格式化，请看保存时自动格式化代码 ","date":"2024-10-02","heading":"关于保存时自动格式化，请看","objectID":"/posts/neovim_cmp_other-fmt/:3:0","tags":["Linux","Neovim"],"title":"Neovim使用`conform.nvim`或`none-ls.nvim`实现格式化代码","uri":"/posts/neovim_cmp_other-fmt/#关于保存时自动格式化请看保存时自动格式化代码"},{"categories":"Arch Linux","collections":null,"content":"使用none-ls.nvim null-ls.nvim reloaded / Use Neovim as a language server to inject LSP diagnostics, code actions, and more via Lua. (继承null-ls.nvim/通过Lua使用Neovim作为一个语言服务器来注入LSP诊断，代码动作等等) —— GitHub描述 ","date":"2024-10-02","heading":"使用","objectID":"/posts/neovim_cmp_other-fmt/:0:0","tags":["Linux","Neovim"],"title":"Neovim使用`conform.nvim`或`none-ls.nvim`实现格式化代码","uri":"/posts/neovim_cmp_other-fmt/#使用none-lsnvim"},{"categories":"Arch Linux","collections":null,"content":"开始使用 首先，安装none-ls.nvim return { { \"nvimtools/none-ls.nvim\", -- 安装none-ls.nvim插件 dependencies = { \"nvim-lua/plenary.nvim\" }, -- 依赖plenary.nvim config = function() local none_ls = require(\"null-ls\") -- 配置none-ls，集成black none_ls.setup({ sources = { none_ls.builtins.formatting.black, }, }) -- 自动格式化配置 vim.cmd [[ augroup LspFormatting autocmd! * autocmd BufWritePre *.py lua vim.lsp.buf.format() augroup END ]] end, } } 然后保存，重新进入Neovim就可以看见lazy.nvim正在安装了。 ","date":"2024-10-02","heading":"开始使用","objectID":"/posts/neovim_cmp_other-fmt/:1:0","tags":["Linux","Neovim"],"title":"Neovim使用`conform.nvim`或`none-ls.nvim`实现格式化代码","uri":"/posts/neovim_cmp_other-fmt/#开始使用-1"},{"categories":"Arch Linux","collections":null,"content":"安装代码格式化工具 以Python为例 # Arch Linux sudo pacman -S python-black 来安装black。你也可以用isort等 sources是一个列表，你可以添加你所用编程语言的格式化工具，如 sources = { null_ls.builtins.formatting.stylua, } 关于格式化工具，你可以查看： none-ls文档-内置源 ","date":"2024-10-02","heading":"安装代码格式化工具","objectID":"/posts/neovim_cmp_other-fmt/:1:1","tags":["Linux","Neovim"],"title":"Neovim使用`conform.nvim`或`none-ls.nvim`实现格式化代码","uri":"/posts/neovim_cmp_other-fmt/#安装代码格式化工具-1"},{"categories":"Arch Linux","collections":null,"content":"格式化代码 你只需要使用:lua vim.lsp.buf.format()的命令来进行代码格式化。 ","date":"2024-10-02","heading":"格式化代码","objectID":"/posts/neovim_cmp_other-fmt/:2:0","tags":["Linux","Neovim"],"title":"Neovim使用`conform.nvim`或`none-ls.nvim`实现格式化代码","uri":"/posts/neovim_cmp_other-fmt/#格式化代码-1"},{"categories":"Arch Linux","collections":null,"content":"关于保存时自动格式化，请看保存时自动格式化代码 ","date":"2024-10-02","heading":"关于保存时自动格式化，请看","objectID":"/posts/neovim_cmp_other-fmt/:3:0","tags":["Linux","Neovim"],"title":"Neovim使用`conform.nvim`或`none-ls.nvim`实现格式化代码","uri":"/posts/neovim_cmp_other-fmt/#关于保存时自动格式化请看保存时自动格式化代码-1"},{"categories":"Arch Linux","collections":null,"content":"保存时自动格式化代码 ","date":"2024-10-02","heading":"保存时自动格式化代码","objectID":"/posts/neovim_cmp_other-fmt/:0:0","tags":["Linux","Neovim"],"title":"Neovim使用`conform.nvim`或`none-ls.nvim`实现格式化代码","uri":"/posts/neovim_cmp_other-fmt/#保存时自动格式化代码"},{"categories":"Arch Linux","collections":null,"content":"conform.nvim 使用该代码： return { { \"stevearc/conform.nvim\", -- 安装插件 config = function() -- 配置conform，使用black和isort格式化Python require(\"conform\").setup({ formatters_by_ft = { -- python = { \"black\" }, python = { \"black\" }, lua = { 'lua-ls' }, }, }) -- 自动格式化配置 vim.api.nvim_create_autocmd(\"BufWritePre\", { pattern = \"*.py\", callback = function(args) require(\"conform\").format({ bufnr = args.buf }) end, }) end, } } ","date":"2024-10-02","heading":"","objectID":"/posts/neovim_cmp_other-fmt/:1:0","tags":["Linux","Neovim"],"title":"Neovim使用`conform.nvim`或`none-ls.nvim`实现格式化代码","uri":"/posts/neovim_cmp_other-fmt/#conformnvim-1"},{"categories":"Arch Linux","collections":null,"content":"none-ls.nvim 使用以下代码： return { { \"nvimtools/none-ls.nvim\", -- 安装none-ls.nvim插件 dependencies = { \"nvim-lua/plenary.nvim\" }, -- 依赖plenary.nvim config = function() local none_ls = require(\"null-ls\") -- 配置none-ls，集成black none_ls.setup({ sources = { none_ls.builtins.formatting.black, }, }) -- 自动格式化配置 vim.cmd [[ augroup LspFormatting autocmd! * autocmd BufWritePre *.py lua vim.lsp.buf.format() augroup END ]] end, } } 两个切记不能同时开启！因为可能会返回不同的结果（当然使用相同的格式化工具就不会）。但是会增加占用（富哥当我没说:(）。所以建议二选一即可 ","date":"2024-10-02","heading":"","objectID":"/posts/neovim_cmp_other-fmt/:2:0","tags":["Linux","Neovim"],"title":"Neovim使用`conform.nvim`或`none-ls.nvim`实现格式化代码","uri":"/posts/neovim_cmp_other-fmt/#none-lsnvim"},{"categories":"Arch Linux","collections":null,"content":"在Neovim中使用ruff来格式化Python代码 ","date":"2024-10-01","heading":"在Neovim中使用","objectID":"/posts/neovim_cmp_ruff_fmt/:0:0","tags":["Linux","Neovim"],"title":"Neovim使用ruff格式化Python代码","uri":"/posts/neovim_cmp_ruff_fmt/#在neovim中使用ruff来格式化python代码"},{"categories":"Arch Linux","collections":null,"content":"原因 笔者尝试过使用cmp调用black和flake8来实现格式化Python代码 但是失败了，因为两个工具都不支持使用LSP协议（大概吧？） 有人介绍笔者使用conform.nvim或none-ls.nvim来实现，但是笔者都不成功 \u0026#x1f602; 如果你成功使用conform.nvim或none-ls.nvim来实现，欢迎告诉笔者！ ","date":"2024-10-01","heading":"原因","objectID":"/posts/neovim_cmp_ruff_fmt/:1:0","tags":["Linux","Neovim"],"title":"Neovim使用ruff格式化Python代码","uri":"/posts/neovim_cmp_ruff_fmt/#原因"},{"categories":"Arch Linux","collections":null,"content":"关于ruff An extremely fast Python linter and code formatter, written in Rust. (一个用 Rust 编写的极快的 Python linter 和代码格式化程序。) ——ruff项目介绍 ","date":"2024-10-01","heading":"关于","objectID":"/posts/neovim_cmp_ruff_fmt/:2:0","tags":["Linux","Neovim"],"title":"Neovim使用ruff格式化Python代码","uri":"/posts/neovim_cmp_ruff_fmt/#关于ruff"},{"categories":"Arch Linux","collections":null,"content":"安装使用 我安装时的commit 其实你只需要在系统装安装ruff就可以了 # Arch Linux: sudo pacman -S ruff 然后在cmp.lua中的servers中添加ruff = {},即可 ","date":"2024-10-01","heading":"安装使用","objectID":"/posts/neovim_cmp_ruff_fmt/:3:0","tags":["Linux","Neovim"],"title":"Neovim使用ruff格式化Python代码","uri":"/posts/neovim_cmp_ruff_fmt/#安装使用"},{"categories":"Arch Linux","collections":null,"content":"完成 又水一篇文章 ","date":"2024-10-01","heading":"完成","objectID":"/posts/neovim_cmp_ruff_fmt/:0:0","tags":["Linux","Neovim"],"title":"Neovim使用ruff格式化Python代码","uri":"/posts/neovim_cmp_ruff_fmt/#完成"},{"categories":"Arch Linux","collections":null,"content":"使用Rclone挂载OneDrive 数据是无价的，它是你的互联网资产，丢失了就很难找回来。目前人们推荐使用3-2-1的备份模式 3-2-1备份模式： 3：一堆数据有总共三份，一份在工作目录上，另两份作为备份 2：数据应该至少有两种形式，如硬盘与云存储（上个世纪可能是磁带） 1：三份数据中的一份应该在异地（如在云上，或在家里） # 链接(URL)：https://chariri.moe/archives/122/personal-backup-restic-rclone/#toc-head-7 # 来源(Source)：茶栗栗屋 ","date":"2024-09-01","heading":"使用","objectID":"/posts/rclone-mount-onedrive/:0:0","tags":["Arch Linux"],"title":"使用rclone挂载OneDrive","uri":"/posts/rclone-mount-onedrive/#使用rclone挂载onedrive"},{"categories":"Arch Linux","collections":null,"content":"准备工作 ","date":"2024-09-01","heading":"准备工作","objectID":"/posts/rclone-mount-onedrive/:0:0","tags":["Arch Linux"],"title":"使用rclone挂载OneDrive","uri":"/posts/rclone-mount-onedrive/#准备工作"},{"categories":"Arch Linux","collections":null,"content":"OneDrive账号 首先你需要有一个OneDrive账号。当然，容量越大越好（例如E5账号）。如果你不需要备份很大的文件的话，普通个人账号的免费版就够了。且服务器在国外，上传速度不理想。 ","date":"2024-09-01","heading":"OneDrive账号","objectID":"/posts/rclone-mount-onedrive/:1:0","tags":["Arch Linux"],"title":"使用rclone挂载OneDrive","uri":"/posts/rclone-mount-onedrive/#onedrive账号"},{"categories":"Arch Linux","collections":null,"content":"安装Rclone sudo pacman -S rclone ","date":"2024-09-01","heading":"安装","objectID":"/posts/rclone-mount-onedrive/:2:0","tags":["Arch Linux"],"title":"使用rclone挂载OneDrive","uri":"/posts/rclone-mount-onedrive/#安装rclone"},{"categories":"Arch Linux","collections":null,"content":"授权（登录） rclone config 然后输入n: Enter name for new remote. name\u003e 在\u0026lt;Name\u0026gt;处输入你想要的名称（建议不包含空格） Storage\u003e 输入33并回车。 在要求输入client_id\u0026gt;和client_secret\u0026gt;时，直接回车使用默认值即可。 region\u003e 回车或输入1。 Edit advanced config? y) Yes n) No (default) y/n\u003e n Use web browser to automatically authenticate rclone with remote? * Say Y if the machine running rclone has a web browser you can use * Say N if running rclone on a (remote) machine without web browser access If not sure try Y. If Y failed, try N. y) Yes (default) n) No y/n\u003e 输入y来使用浏览器登录并且自动授权 Choose a number from below, or type in an existing value of type string. Press Enter for the default (onedrive). 1 / OneDrive Personal or Business \\ (onedrive) 2 / Root Sharepoint site \\ (sharepoint) / Sharepoint site name or URL 3 | E.g. mysite or https://contoso.sharepoint.com/sites/mysite \\ (url) 4 / Search for a Sharepoint site \\ (search) 5 / Type in driveID (advanced) \\ (driveid) 6 / Type in SiteID (advanced) \\ (siteid) / Sharepoint server-relative path (advanced) 7 | E.g. /teams/hr \\ (path) config_type\u003e 输入1并回车 然后Rclone找到一个OneDrive盘，输入y确定回车。 确认OneDrive网盘的所有信息是否正确，输入y并回车。 然后输入q并回车来退出配置界面。 ","date":"2024-09-01","heading":"授权（登录）","objectID":"/posts/rclone-mount-onedrive/:0:0","tags":["Arch Linux"],"title":"使用rclone挂载OneDrive","uri":"/posts/rclone-mount-onedrive/#授权登录"},{"categories":"Arch Linux","collections":null,"content":"同步文件 ","date":"2024-09-01","heading":"同步文件","objectID":"/posts/rclone-mount-onedrive/:0:0","tags":["Arch Linux"],"title":"使用rclone挂载OneDrive","uri":"/posts/rclone-mount-onedrive/#同步文件"},{"categories":"Arch Linux","collections":null,"content":"挂载到本地 你可以使用rclone来将OneDrive挂载到本地： rclone mount : --vfs-cache-mode writes 其中： \u0026lt;Name\u0026gt;：表示你之前命名的 \u0026lt;Directory\u0026gt;：指你希望挂载的OneDrive中的目录 \u0026lt;Local_path\u0026gt;：指你希望挂载到本地的目录 ","date":"2024-09-01","heading":"挂载到本地","objectID":"/posts/rclone-mount-onedrive/:1:0","tags":["Arch Linux"],"title":"使用rclone挂载OneDrive","uri":"/posts/rclone-mount-onedrive/#挂载到本地"},{"categories":"Arch Linux","collections":null,"content":"直接同步 使用sync参数来同步： rclone sync : 其中： \u0026lt;Name\u0026gt;：表示你之前命名的 \u0026lt;Directory\u0026gt;：指你希望挂载的OneDrive中的目录 \u0026lt;Local_path\u0026gt;：指你希望挂载到本地的目录 如果你想将整个文件夹复制到OneDrive中，而不是将文件夹中的文件放入备份目录，请使用 rclone sync :/ ","date":"2024-09-01","heading":"直接同步","objectID":"/posts/rclone-mount-onedrive/:2:0","tags":["Arch Linux"],"title":"使用rclone挂载OneDrive","uri":"/posts/rclone-mount-onedrive/#直接同步"},{"categories":"Arch Linux","collections":null,"content":"参考资料 茶栗栗屋 瓦力箱子 ","date":"2024-09-01","heading":"参考资料","objectID":"/posts/rclone-mount-onedrive/:0:0","tags":["Arch Linux"],"title":"使用rclone挂载OneDrive","uri":"/posts/rclone-mount-onedrive/#参考资料"},{"categories":"Arch Linux","collections":null,"content":"设置xdg-open打开某文件/目录的默认应用程序 你需要使用xdg-mime工具来获取filetype xdg-mime query filetype path_to_file 然后你需要在/usr/share/applications中查找有没有你想打开的软件 ls /usr/share/applications | grep program_name 确认后，即可设置默认的打开程序 xdg-mime default program_name.desktop filetype ","date":"2024-08-20","heading":"设置","objectID":"/posts/linux-set-default-application/:0:0","tags":["Arch Linux"],"title":"Linux下设置xdg-open打开某文件/目录的应用程序","uri":"/posts/linux-set-default-application/#设置xdg-open打开某文件目录的默认应用程序"},{"categories":"Arch Linux","collections":null,"content":"参考 xdg-mime Arch man xdg-open Arch man xdg-settings Arch man ","date":"2024-08-20","heading":"参考","objectID":"/posts/linux-set-default-application/:0:0","tags":["Arch Linux"],"title":"Linux下设置xdg-open打开某文件/目录的应用程序","uri":"/posts/linux-set-default-application/#参考"},{"categories":"Arch Linux","collections":null,"content":"在Hyprland中设置全局黑暗模式 ","date":"2024-08-14","heading":"在Hyprland中设置全局黑暗模式","objectID":"/posts/set-global-dark-mode-for-hyprland/:0:0","tags":["Hyprland","Arch"],"title":"设置Hyprland全局黑暗模式","uri":"/posts/set-global-dark-mode-for-hyprland/#在hyprland中设置全局黑暗模式"},{"categories":"Arch Linux","collections":null,"content":"折腾部分 ","date":"2024-08-14","heading":"折腾部分","objectID":"/posts/set-global-dark-mode-for-hyprland/:0:0","tags":["Hyprland","Arch"],"title":"设置Hyprland全局黑暗模式","uri":"/posts/set-global-dark-mode-for-hyprland/#折腾部分"},{"categories":"Arch Linux","collections":null,"content":"安装有关软件！！ sudo pacman -S kvantum nwg-look qt6ct ","date":"2024-08-14","heading":"安装有关软件！！","objectID":"/posts/set-global-dark-mode-for-hyprland/:1:0","tags":["Hyprland","Arch"],"title":"设置Hyprland全局黑暗模式","uri":"/posts/set-global-dark-mode-for-hyprland/#安装有关软件"},{"categories":"Arch Linux","collections":null,"content":"AUR解君愁 paru -S catppuccin-gtk-theme-mocha ","date":"2024-08-14","heading":"AUR解君愁","objectID":"/posts/set-global-dark-mode-for-hyprland/:2:0","tags":["Hyprland","Arch"],"title":"设置Hyprland全局黑暗模式","uri":"/posts/set-global-dark-mode-for-hyprland/#aur解君愁"},{"categories":"Arch Linux","collections":null,"content":"Qt 首先，将主题克隆到本地 git clone https://github.com/catppuccin/Kvantum.git 然后打开kvantum，安装主题。（可能是选择整个目录，自己试试） 打开qt6ct，在style栏中选择kvantum-dark，点击右下角的确定。 在kvantum中点击变更/删除主题，点击右边的小箭头，选择心仪的主题，随后点击应用此主题，再点击右下角的退出 ","date":"2024-08-14","heading":"Qt","objectID":"/posts/set-global-dark-mode-for-hyprland/:3:0","tags":["Hyprland","Arch"],"title":"设置Hyprland全局黑暗模式","uri":"/posts/set-global-dark-mode-for-hyprland/#qt"},{"categories":"Arch Linux","collections":null,"content":"GTK 打开nwg-look，在侧边栏选择好你心仪的主题（建议和kvantum所选的主题一样，避免出现差异）。 ","date":"2024-08-14","heading":"GTK","objectID":"/posts/set-global-dark-mode-for-hyprland/:4:0","tags":["Hyprland","Arch"],"title":"设置Hyprland全局黑暗模式","uri":"/posts/set-global-dark-mode-for-hyprland/#gtk"},{"categories":"Arch Linux","collections":null,"content":"最后 你只需要在Hyprland的配置文件中添加 # change to qt6ct if you have that env = QT_QPA_PLATFORMTHEME,qt6ct # Set dark theme for GTK apps exec = gsettings set org.gnome.desktop.interface gtk-theme \"\" # for GTK3 apps exec = gsettings set org.gnome.desktop.interface color-scheme \"prefer-Dark\" # for GTK4 apps ","date":"2024-08-14","heading":"最后","objectID":"/posts/set-global-dark-mode-for-hyprland/:5:0","tags":["Hyprland","Arch"],"title":"设置Hyprland全局黑暗模式","uri":"/posts/set-global-dark-mode-for-hyprland/#最后"},{"categories":"Arch Linux","collections":null,"content":"关于查看Theme-Name 以上面的catppuccin-gtk-theme-mocha为例 sudo pacman -Ql catppuccin-gtk-theme-mocha | grep \u003c你挑选好的主题名称（在`nwg-look`中查看，仅需`mocha-颜色`）\u003e 然后将/usr/share/themes/catppuccin-mocha-*-standard+default/gtk-4.0/assets/scale-vert-marks-before-slider-dark@2.svg中的catppuccin-mocha-*-standard+default复制下来，填充到上面的\u0026lt;Theme-Name\u0026gt;中 ","date":"2024-08-14","heading":"关于查看","objectID":"/posts/set-global-dark-mode-for-hyprland/:5:1","tags":["Hyprland","Arch"],"title":"设置Hyprland全局黑暗模式","uri":"/posts/set-global-dark-mode-for-hyprland/#关于查看theme-name"},{"categories":"Arch Linux","collections":null,"content":"可选 安装图标主题，并且在nwg-look和qt6ct设置（qt6ct中你只需要双击图标主题即可） ","date":"2024-08-14","heading":"可选","objectID":"/posts/set-global-dark-mode-for-hyprland/:5:2","tags":["Hyprland","Arch"],"title":"设置Hyprland全局黑暗模式","uri":"/posts/set-global-dark-mode-for-hyprland/#可选"},{"categories":"Arch Linux","collections":null,"content":"可能是我个人的原因，这里有一些软件是不追随设置的，甚至出现一半黑暗，一半明亮的😅😅 ","date":"2024-08-14","heading":"可能是我个人的原因，这里有一些软件是不追随设置的，甚至出现一半黑暗，一半明亮的😅😅","objectID":"/posts/set-global-dark-mode-for-hyprland/:6:0","tags":["Hyprland","Arch"],"title":"设置Hyprland全局黑暗模式","uri":"/posts/set-global-dark-mode-for-hyprland/#可能是我个人的原因这里有一些软件是不追随设置的甚至出现一半黑暗一半明亮的"},{"categories":"Guide","collections":null,"content":"介绍 首先，你需要知道，GitHub是有GitHub Docs的。传送门 本文所提及的在GitHub Docs中也有。传送 ","date":"2024-07-23","heading":"介绍","objectID":"/posts/use_gpg_to_verify_in_github/:0:0","tags":["GitHub"],"title":"在GitHub中使用GPG验证提交","uri":"/posts/use_gpg_to_verify_in_github/#介绍"},{"categories":"Guide","collections":null,"content":"关于提交验证 您可以在本地签署提交和标签，让其他人对您所做更改的源充满信心。 对于大多数个人用户，GPG 或 SSH 会是对提交进行签名的最佳选择。 生成 GPG 签名密钥比生成 SSH 密钥更复杂，但 GPG 具有 SSH 所没有的功能。 GPG 密钥可以在不再使用时过期或撤销。 ","date":"2024-07-23","heading":"关于提交验证","objectID":"/posts/use_gpg_to_verify_in_github/:0:0","tags":["GitHub"],"title":"在GitHub中使用GPG验证提交","uri":"/posts/use_gpg_to_verify_in_github/#关于提交验证"},{"categories":"Guide","collections":null,"content":"开始操作 ","date":"2024-07-23","heading":"开始操作","objectID":"/posts/use_gpg_to_verify_in_github/:0:0","tags":["GitHub"],"title":"在GitHub中使用GPG验证提交","uri":"/posts/use_gpg_to_verify_in_github/#开始操作"},{"categories":"Guide","collections":null,"content":"安装gnupg 其实默认就安装了 ","date":"2024-07-23","heading":"安装","objectID":"/posts/use_gpg_to_verify_in_github/:1:0","tags":["GitHub"],"title":"在GitHub中使用GPG验证提交","uri":"/posts/use_gpg_to_verify_in_github/#安装gnupg"},{"categories":"Guide","collections":null,"content":"生成密钥 gpg --full-generate-key 如果使用默认值，请连续按两次回车键 若想自定义，选择序号，第9是默认项 Please select what kind of key you want: (1) RSA and RSA (2) DSA and Elgamal (3) DSA (sign only) (4) RSA (sign only) (9) ECC (sign and encrypt) *default* (10) ECC (sign only) (14) Existing key from card Your selection? 选择密钥的过期时间（默认选择0，表示永不过期）： Please specify how long the key should be valid. 0 = key does not expire = key expires in n days w = key expires in n weeks m = key expires in n months y = key expires in n years Key is valid for? (0) 确认信息，确认后输入y： Key does not expire at all Is this correct? (y/N) 接下来就输入自己GitHub的用户名和注册GitHub时所使用的邮箱，当弹出时，可以直接回车，这只是添加注释： Comment: 在弹出时，输入o表示确认： You selected this USER-ID: \"Username of GitHub (comment) \" Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? 然后输入密码来保护GPG密钥（必须，否则将不会创建） 然后重复刚才所输入的密码 注：这里输入密码不会显示，请尽管输入 ","date":"2024-07-23","heading":"生成密钥","objectID":"/posts/use_gpg_to_verify_in_github/:2:0","tags":["GitHub"],"title":"在GitHub中使用GPG验证提交","uri":"/posts/use_gpg_to_verify_in_github/#生成密钥"},{"categories":"Guide","collections":null,"content":"查看密钥是否创建 gpg --list-secret-keys --keyid-format=long 然后你会看到 sec 4096R/3AA5C34371567BD2 date uid Username-of-GitHub ssb 4096R/4BB6D45482678BE3 date 注：此处你只需要复制第一行中在4096R/后，在date前的值，不需要包含空格，以下简称为id，请举一反三! ","date":"2024-07-23","heading":"查看密钥是否创建","objectID":"/posts/use_gpg_to_verify_in_github/:3:0","tags":["GitHub"],"title":"在GitHub中使用GPG验证提交","uri":"/posts/use_gpg_to_verify_in_github/#查看密钥是否创建"},{"categories":"Guide","collections":null,"content":"查看密钥 使用 gpg --armor --export 你也可以使用 gpg --armor --export 来查看 在输出的一大串中，你需要复制： -----BEGIN PGP PUBLIC KEY BLOCK----- ................................... -----END PGP PUBLIC KEY BLOCK----- 注：你需要将上面的一整段复制下来，包含-----BEGIN PGP PUBLIC KEY BLOCK-----和-----END PGP PUBLIC KEY BLOCK-----！！ ","date":"2024-07-23","heading":"查看密钥","objectID":"/posts/use_gpg_to_verify_in_github/:4:0","tags":["GitHub"],"title":"在GitHub中使用GPG验证提交","uri":"/posts/use_gpg_to_verify_in_github/#查看密钥"},{"categories":"Guide","collections":null,"content":"将密钥添加到GitHub账户中 懒得写了，看Docs吧 将GPG密钥添加到GitHub账户中 ","date":"2024-07-23","heading":"将密钥添加到GitHub账户中","objectID":"/posts/use_gpg_to_verify_in_github/:5:0","tags":["GitHub"],"title":"在GitHub中使用GPG验证提交","uri":"/posts/use_gpg_to_verify_in_github/#将密钥添加到github账户中"},{"categories":"Guide","collections":null,"content":"在使用git commit时，你需要输入生成GPG密钥时所输入的密码 ","date":"2024-07-23","heading":"在使用","objectID":"/posts/use_gpg_to_verify_in_github/:6:0","tags":["GitHub"],"title":"在GitHub中使用GPG验证提交","uri":"/posts/use_gpg_to_verify_in_github/#在使用git-commit时你需要输入生成gpg密钥时所输入的密码"},{"categories":"Guide","collections":null,"content":"祝：在Git commit签名时不报该用户没有GPG密钥 ","date":"2024-07-23","heading":"祝：在Git commit签名时不报该用户没有GPG密钥","objectID":"/posts/use_gpg_to_verify_in_github/:0:0","tags":["GitHub"],"title":"在GitHub中使用GPG验证提交","uri":"/posts/use_gpg_to_verify_in_github/#祝在git-commit签名时不报该用户没有gpg密钥"},{"categories":"Blog","collections":null,"content":"Hugo介绍 Hugo是世界上最快的构建网页的框架 —— Hugo官网 ","date":"2024-07-19","heading":"Hugo介绍","objectID":"/posts/hugo-blog-cloudflare/:0:0","tags":["Blog"],"title":"使用Hugo搭建Blog+Cloudflare Pages实现自动部署","uri":"/posts/hugo-blog-cloudflare/#hugo介绍"},{"categories":"Blog","collections":null,"content":"安装Hugo Arch Linux： sudo pacman -S hugo 其余发行版请自行使用包管理器搜索并安装 ","date":"2024-07-19","heading":"安装Hugo","objectID":"/posts/hugo-blog-cloudflare/:0:0","tags":["Blog"],"title":"使用Hugo搭建Blog+Cloudflare Pages实现自动部署","uri":"/posts/hugo-blog-cloudflare/#安装hugo"},{"categories":"Blog","collections":null,"content":"开始使用 首先创建一个空白网站 hugo new site 这个操作会创建一个文件夹，包含Hugo的默认文件 ","date":"2024-07-19","heading":"开始使用","objectID":"/posts/hugo-blog-cloudflare/:0:0","tags":["Blog"],"title":"使用Hugo搭建Blog+Cloudflare Pages实现自动部署","uri":"/posts/hugo-blog-cloudflare/#开始使用"},{"categories":"Blog","collections":null,"content":"安装主题 ","date":"2024-07-19","heading":"安装主题","objectID":"/posts/hugo-blog-cloudflare/:1:0","tags":["Blog"],"title":"使用Hugo搭建Blog+Cloudflare Pages实现自动部署","uri":"/posts/hugo-blog-cloudflare/#安装主题"},{"categories":"Blog","collections":null,"content":"博客是写给自己看的 所以挑选一个自己心仪的主题很重要。 你可以在Hugo的主题网站中查找 建议查找更新日期较近的主题，以避免有废弃的主题（可能失去了作者支持）。当然，只要你喜欢就好:) 然后你可以点击Download按钮，以跳转至GitHub页面，查看README.md以安装主题。 ","date":"2024-07-19","heading":"","objectID":"/posts/hugo-blog-cloudflare/:1:1","tags":["Blog"],"title":"使用Hugo搭建Blog+Cloudflare Pages实现自动部署","uri":"/posts/hugo-blog-cloudflare/#博客是写给自己看的"},{"categories":"Blog","collections":null,"content":"这里以FixIt主题为例 FixIt主题网站，你可以查看文档 转至GitHub页面，你可以提出issue和pull request以解决问题和完善文档\\ 安装主题 切换到博客目录，执行 git init 来初始化一个空的Git存储库（之后用于GitHub Actions自动构建部署网站） 将[FixIt]主题作为Git子模块添加到你的项目中的themes目录。 git submodule add https://github.com/hugo-fixit/FixIt.git themes/FixIt 备份目录中的hugo.toml文件，并将主题中的hugo.toml文件复制出来 mv hugo.toml hugo.toml.back \u0026\u0026 cp /themes/FixIt/hugo.toml ./ 在站点配置文件中添加一行，指定当前主题。 echo \"theme = 'FixIt'\" \u003e\u003e hugo.toml 在站点配置文件中添加一行，指定默认的内容语言。 echo \"defaultContentLanguage = 'zh-cn'\" \u003e\u003e hugo.toml 然后启动Hugo开发服务器以查看站点 hugo server Hugo，启动！ ","date":"2024-07-19","heading":"这里以","objectID":"/posts/hugo-blog-cloudflare/:1:2","tags":["Blog"],"title":"使用Hugo搭建Blog+Cloudflare Pages实现自动部署","uri":"/posts/hugo-blog-cloudflare/#这里以fixit主题为例"},{"categories":"Blog","collections":null,"content":"这里以FixIt主题为例 FixIt主题网站，你可以查看文档 转至GitHub页面，你可以提出issue和pull request以解决问题和完善文档\\ 安装主题 切换到博客目录，执行 git init 来初始化一个空的Git存储库（之后用于GitHub Actions自动构建部署网站） 将[FixIt]主题作为Git子模块添加到你的项目中的themes目录。 git submodule add https://github.com/hugo-fixit/FixIt.git themes/FixIt 备份目录中的hugo.toml文件，并将主题中的hugo.toml文件复制出来 mv hugo.toml hugo.toml.back \u0026\u0026 cp /themes/FixIt/hugo.toml ./ 在站点配置文件中添加一行，指定当前主题。 echo \"theme = 'FixIt'\" \u003e\u003e hugo.toml 在站点配置文件中添加一行，指定默认的内容语言。 echo \"defaultContentLanguage = 'zh-cn'\" \u003e\u003e hugo.toml 然后启动Hugo开发服务器以查看站点 hugo server Hugo，启动！ ","date":"2024-07-19","heading":"安装主题","objectID":"/posts/hugo-blog-cloudflare/:1:2","tags":["Blog"],"title":"使用Hugo搭建Blog+Cloudflare Pages实现自动部署","uri":"/posts/hugo-blog-cloudflare/#安装主题-1"},{"categories":"Blog","collections":null,"content":"写文章 你需要将Markdown文章放入content/posts文件夹中，然后执行 hugo 来构建网站 这并不会在本地启动开发服务器，而是将构建后的网页文件放在public文件夹下 ","date":"2024-07-19","heading":"写文章","objectID":"/posts/hugo-blog-cloudflare/:2:0","tags":["Blog"],"title":"使用Hugo搭建Blog+Cloudflare Pages实现自动部署","uri":"/posts/hugo-blog-cloudflare/#写文章"},{"categories":"Blog","collections":null,"content":"使用草稿 在Hugo中，你可以使用draft参数来表示该文章是草稿 --- title: 我的第一篇文章 date: 2024-03-01T17:10:04+08:00 draft: true # ... --- 若想连草稿一起构建，请执行 hugo -D 同理，也可以在开发服务器中使用-D。 ","date":"2024-07-19","heading":"使用草稿","objectID":"/posts/hugo-blog-cloudflare/:2:1","tags":["Blog"],"title":"使用Hugo搭建Blog+Cloudflare Pages实现自动部署","uri":"/posts/hugo-blog-cloudflare/#使用草稿"},{"categories":"Blog","collections":null,"content":"使用Cloudflare Pages实现自动部署博客 使用FixIt主题的话，请在Pages的设置中添加环境变量以指定Hugo版本 如HUGO_VERSION:0.129.0 首先，在GitHub中新建博客仓库，命名为\u0026lt;User-name\u0026gt;.github.io 在本地Git中添加远程仓库 git remote add origin https://github.com//.github.io.git 然后添加.gitingore vim .gitingore #Vim可替换为其他编辑器 加入以下内容 pubilc resource 保存退出 然后上传到GitHub即可。不会的可以看这里 到Cloudflare官网，点击侧边栏的Workers \u0026amp; Pages 选择Pages，点击连接到GitHub，选择你创建的博客仓库 选择生产分支为你Hugo博客存放的分支，框架预设选择Hugo，构建命令不改。 若使用tags和categories，请添加环境变量： HUGO_VERSION = 0.129.0 然后将一个小更改push到GitHub，Cloudflare会自动部署，给你一个二级域名。 你也可以自定义，请自行搜索。 ","date":"2024-07-19","heading":"使用Cloudflare Pages实现自动部署博客","objectID":"/posts/hugo-blog-cloudflare/:0:0","tags":["Blog"],"title":"使用Hugo搭建Blog+Cloudflare Pages实现自动部署","uri":"/posts/hugo-blog-cloudflare/#使用cloudflare-pages实现自动部署博客"},{"categories":"Blog","collections":null,"content":"All done! Enjoy it! ","date":"2024-07-19","heading":"All done! Enjoy it!","objectID":"/posts/hugo-blog-cloudflare/:0:0","tags":["Blog"],"title":"使用Hugo搭建Blog+Cloudflare Pages实现自动部署","uri":"/posts/hugo-blog-cloudflare/#all-done-enjoy-it"},{"categories":"Blog","collections":null,"content":"Hugo介绍 Hugo是世界上最快的构建网页的框架 —— Hugo官网 ","date":"2024-07-18","heading":"Hugo介绍","objectID":"/posts/hugo-blog-github/:0:0","tags":["Blog"],"title":"使用Hugo搭建Blog+GitHub Actions实现自动部署","uri":"/posts/hugo-blog-github/#hugo介绍"},{"categories":"Blog","collections":null,"content":"安装Hugo Arch Linux： sudo pacman -S hugo 其余发行版请自行使用包管理器搜索并安装 ","date":"2024-07-18","heading":"安装Hugo","objectID":"/posts/hugo-blog-github/:0:0","tags":["Blog"],"title":"使用Hugo搭建Blog+GitHub Actions实现自动部署","uri":"/posts/hugo-blog-github/#安装hugo"},{"categories":"Blog","collections":null,"content":"开始使用 首先创建一个空白网站 hugo new site 这个操作会创建一个文件夹，包含Hugo的默认文件 ","date":"2024-07-18","heading":"开始使用","objectID":"/posts/hugo-blog-github/:0:0","tags":["Blog"],"title":"使用Hugo搭建Blog+GitHub Actions实现自动部署","uri":"/posts/hugo-blog-github/#开始使用"},{"categories":"Blog","collections":null,"content":"安装主题 ","date":"2024-07-18","heading":"安装主题","objectID":"/posts/hugo-blog-github/:1:0","tags":["Blog"],"title":"使用Hugo搭建Blog+GitHub Actions实现自动部署","uri":"/posts/hugo-blog-github/#安装主题"},{"categories":"Blog","collections":null,"content":"博客是写给自己看的 所以挑选一个自己心仪的主题很重要。 你可以在Hugo的主题网站中查找 建议查找更新日期较近的主题，以避免有废弃的主题（可能失去了作者支持）。当然，只要你喜欢就好:) 然后你可以点击Download按钮，以跳转至GitHub页面，查看README.md以安装主题。 ","date":"2024-07-18","heading":"","objectID":"/posts/hugo-blog-github/:1:1","tags":["Blog"],"title":"使用Hugo搭建Blog+GitHub Actions实现自动部署","uri":"/posts/hugo-blog-github/#博客是写给自己看的"},{"categories":"Blog","collections":null,"content":"这里以FixIt主题为例 FixIt主题网站，你可以查看文档 转至GitHub页面，你可以提出issue和pull request以解决问题和完善文档\\ 安装主题 切换到博客目录，执行 git init 来初始化一个空的Git存储库（之后用于GitHub Actions自动构建部署网站） 将[FixIt]主题作为Git子模块添加到你的项目中的themes目录。 git submodule add https://github.com/hugo-fixit/FixIt.git themes/FixIt 备份目录中的hugo.toml文件，并将主题中的hugo.toml文件复制出来 mv hugo.toml hugo.toml.back \u0026\u0026 cp /themes/FixIt/hugo.toml ./ 在站点配置文件中添加一行，指定当前主题。 echo \"theme = 'FixIt'\" \u003e\u003e hugo.toml 在站点配置文件中添加一行，指定默认的内容语言。 echo \"defaultContentLanguage = 'zh-cn'\" \u003e\u003e hugo.toml 然后启动Hugo开发服务器以查看站点 hugo server Hugo，启动！ ","date":"2024-07-18","heading":"这里以","objectID":"/posts/hugo-blog-github/:1:2","tags":["Blog"],"title":"使用Hugo搭建Blog+GitHub Actions实现自动部署","uri":"/posts/hugo-blog-github/#这里以fixit主题为例"},{"categories":"Blog","collections":null,"content":"这里以FixIt主题为例 FixIt主题网站，你可以查看文档 转至GitHub页面，你可以提出issue和pull request以解决问题和完善文档\\ 安装主题 切换到博客目录，执行 git init 来初始化一个空的Git存储库（之后用于GitHub Actions自动构建部署网站） 将[FixIt]主题作为Git子模块添加到你的项目中的themes目录。 git submodule add https://github.com/hugo-fixit/FixIt.git themes/FixIt 备份目录中的hugo.toml文件，并将主题中的hugo.toml文件复制出来 mv hugo.toml hugo.toml.back \u0026\u0026 cp /themes/FixIt/hugo.toml ./ 在站点配置文件中添加一行，指定当前主题。 echo \"theme = 'FixIt'\" \u003e\u003e hugo.toml 在站点配置文件中添加一行，指定默认的内容语言。 echo \"defaultContentLanguage = 'zh-cn'\" \u003e\u003e hugo.toml 然后启动Hugo开发服务器以查看站点 hugo server Hugo，启动！ ","date":"2024-07-18","heading":"安装主题","objectID":"/posts/hugo-blog-github/:1:2","tags":["Blog"],"title":"使用Hugo搭建Blog+GitHub Actions实现自动部署","uri":"/posts/hugo-blog-github/#安装主题-1"},{"categories":"Blog","collections":null,"content":"写文章 你需要将Markdown文章放入content/posts文件夹中，然后执行 hugo 来构建网站 这并不会在本地启动开发服务器，而是将构建后的网页文件放在public文件夹下 ","date":"2024-07-18","heading":"写文章","objectID":"/posts/hugo-blog-github/:2:0","tags":["Blog"],"title":"使用Hugo搭建Blog+GitHub Actions实现自动部署","uri":"/posts/hugo-blog-github/#写文章"},{"categories":"Blog","collections":null,"content":"使用草稿 在Hugo中，你可以使用draft参数来表示该文章是草稿 --- title: 我的第一篇文章 date: 2024-03-01T17:10:04+08:00 draft: true # ... --- 若想连草稿一起构建，请执行 hugo -D 同理，也可以在开发服务器中使用-D。 ","date":"2024-07-18","heading":"使用草稿","objectID":"/posts/hugo-blog-github/:2:1","tags":["Blog"],"title":"使用Hugo搭建Blog+GitHub Actions实现自动部署","uri":"/posts/hugo-blog-github/#使用草稿"},{"categories":"Blog","collections":null,"content":"使用GitHub Actions实现自动部署博客 首先，在GitHub中新建博客仓库，命名为\u0026lt;User-name\u0026gt;.github.io 在本地Git中添加远程仓库 git remote add origin https://github.com//.github.io.git 然后新建文件夹 mkdir .github/workflows 新建一个YAML文件，文件名随意，输入以下内容 若使用以下代码，请认真看代码后的注意事项！ # 使用GitHub Actions自动部署Hugo博客 name: Hugo-Build on: push: branches: - Hugo permissions: contents: write jobs: build: runs-on: ubuntu-latest steps: - name: Checkout repo uses: actions/checkout@v4 - name: Install Hugo uses: peaceiris/actions-hugo@v3 with: hugo-version: '0.129.0' extended: true - name: Hugo Build run: | git submodule update --init --remote --merge themes/FixIt hugo # - name: Deploy # uses: peaceiris/actions-gh-pages@v3 # with: # github_token: ${{ secrets.GITHUB_TOKEN }} # publish_dir: ./public # cname: pilihu2022.github.io - name: Deploy uses: JamesIves/github-pages-deploy-action@v4 with: branch: gh-pages folder: public ","date":"2024-07-18","heading":"使用GitHub Actions实现自动部署博客","objectID":"/posts/hugo-blog-github/:0:0","tags":["Blog"],"title":"使用Hugo搭建Blog+GitHub Actions实现自动部署","uri":"/posts/hugo-blog-github/#使用github-actions实现自动部署博客"},{"categories":"Blog","collections":null,"content":"注意事项 在branches下的hugo，需修改为你存放博客的分支 注释的代码可删除，也可使用，其中的github_token不需要理会，GitHub Action的机器会自动生成 两个Deploy任选其一即可，不要重复使用！ 若没有在GitHub中找到Actions的选项，请自行搜索‘GitHub如何开启Actions’ ","date":"2024-07-18","heading":"","objectID":"/posts/hugo-blog-github/:1:0","tags":["Blog"],"title":"使用Hugo搭建Blog+GitHub Actions实现自动部署","uri":"/posts/hugo-blog-github/#注意事项"},{"categories":"Blog","collections":null,"content":"使用GitHub Pages 在Settings \u0026gt; Pages，在Source中选择Deploy from a branch，随后选择gh_pages，点击Save按钮，稍等片刻即可看见看见顶栏有提示： Your site is live at https://\u0026lt;User-name\u0026gt;.github.io/ ","date":"2024-07-18","heading":"使用GitHub Pages","objectID":"/posts/hugo-blog-github/:2:0","tags":["Blog"],"title":"使用Hugo搭建Blog+GitHub Actions实现自动部署","uri":"/posts/hugo-blog-github/#使用github-pages"},{"categories":"Blog","collections":null,"content":"结束，祝各位部署GitHub Actions时不报错，报错可联系 ","date":"2024-07-18","heading":"结束，祝各位部署GitHub Actions时不报错，报错可","objectID":"/posts/hugo-blog-github/:0:0","tags":["Blog"],"title":"使用Hugo搭建Blog+GitHub Actions实现自动部署","uri":"/posts/hugo-blog-github/#结束祝各位部署github-actions时不报错报错可联系"},{"categories":"Arch Linux","collections":null,"content":"Arch Linux怎么自动登录，而且是免密的，应该会有一些人会这样想，毕竟如果用户名的密码过长，而且密码错以后又要重输，想必是让人血压升高的问题。今天，教程来了 ","date":"2024-02-12","heading":"Arch Linux怎么自动登录，而且是免密的，应该会有一些人会这样想，毕竟如果用户名的密码过长，而且密码错以后又要重输，想必是让人血压升高的问题。今天，教程来了","objectID":"/posts/auto-login-arch/:0:0","tags":["Arch Linux"],"title":"Arch Linux自动登录","uri":"/posts/auto-login-arch/#arch-linux怎么自动登录而且是免密的应该会有一些人会这样想毕竟如果用户名的密码过长而且密码错以后又要重输想必是让人血压升高的问题今天教程来了"},{"categories":"Arch Linux","collections":null,"content":"当然免密登录也会出现一些安全问题 ","date":"2024-02-12","heading":"当然免密登录也会出现一些安全问题","objectID":"/posts/auto-login-arch/:0:0","tags":["Arch Linux"],"title":"Arch Linux自动登录","uri":"/posts/auto-login-arch/#当然免密登录也会出现一些安全问题"},{"categories":"Arch Linux","collections":null,"content":"本教程具有一定的时限性，具体操作以Arch Wiki为准！ ","date":"2024-02-12","heading":"本教程具有一定的时限性，具体操作以Arch Wiki为准！","objectID":"/posts/auto-login-arch/:0:0","tags":["Arch Linux"],"title":"Arch Linux自动登录","uri":"/posts/auto-login-arch/#本教程具有一定的时限性具体操作以arch-wiki为准"},{"categories":"Arch Linux","collections":null,"content":"参考Arch Wiki:Getty ","date":"2024-02-12","heading":"参考Arch Wiki:","objectID":"/posts/auto-login-arch/:0:0","tags":["Arch Linux"],"title":"Arch Linux自动登录","uri":"/posts/auto-login-arch/#参考arch-wikigetty"},{"categories":"Arch Linux","collections":null,"content":"开始操作 sudo pacman -S util-linux 若已安装可不用重新安装 ","date":"2024-02-12","heading":"开始操作","objectID":"/posts/auto-login-arch/:0:0","tags":["Arch Linux"],"title":"Arch Linux自动登录","uri":"/posts/auto-login-arch/#开始操作"},{"categories":"Arch Linux","collections":null,"content":"写入一个systemd服务文件: sudo nvim /etc/systemd/system/getty@tty1.service.d/override.conf ","date":"2024-02-12","heading":"写入一个systemd服务文件:","objectID":"/posts/auto-login-arch/:1:0","tags":["Arch Linux"],"title":"Arch Linux自动登录","uri":"/posts/auto-login-arch/#写入一个systemd服务文件"},{"categories":"Arch Linux","collections":null,"content":"若没有getty@1.service.d文件夹，请创建: sudo mkdir /etc/systemd/system/getty@tty1.service.d 将以下代码写入/etc/systemd/system/getty@tty1.service.d/override.conf中: [Service] ExecStart= ExecStart=-/usr/bin/agetty --autologin username --noclear %I $TERM 注:这里的username要更改为你的用户名,不能照抄别问我是怎么知道的 若你不知道你的用户名，请使用以下命令来查看 whoami ","date":"2024-02-12","heading":"若没有","objectID":"/posts/auto-login-arch/:1:1","tags":["Arch Linux"],"title":"Arch Linux自动登录","uri":"/posts/auto-login-arch/#若没有getty1serviced文件夹请创建"},{"categories":"Arch Linux","collections":null,"content":"启动该服务 sudo systemctl enable getty@tty1 ","date":"2024-02-12","heading":"启动该服务","objectID":"/posts/auto-login-arch/:2:0","tags":["Arch Linux"],"title":"Arch Linux自动登录","uri":"/posts/auto-login-arch/#启动该服务"},{"categories":"Arch Linux","collections":null,"content":"抢救方法(如果没有照抄上面的代码,可以不看) 我们先解析一下服务文件名,从\u0026quot;getty@tty1\u0026quot;中，我们得知这个服务是针对tty1的，对其他tty不受影响(如tty2) ","date":"2024-02-12","heading":"抢救方法(如果没有照抄上面的代码,可以不看)","objectID":"/posts/auto-login-arch/:0:0","tags":["Arch Linux"],"title":"Arch Linux自动登录","uri":"/posts/auto-login-arch/#抢救方法如果没有照抄上面的代码可以不看"},{"categories":"Arch Linux","collections":null,"content":"切换到其他tty 按住Ctrl+shift+\u0026lt;F2\u0026gt;切换到tty2，然后登录用户，修改刚刚的配置文件 sudo nvim /etc/systemd/system/getty@tty1.service.d/override.conf 然后将username改为你的用户名 ","date":"2024-02-12","heading":"切换到其他tty","objectID":"/posts/auto-login-arch/:1:0","tags":["Arch Linux"],"title":"Arch Linux自动登录","uri":"/posts/auto-login-arch/#切换到其他tty"},{"categories":"Arch Linux","collections":null,"content":"来看看作者是怎么修的 重启进入liveCD，挂载Arch Linux所在的硬盘，然后修改配置文件 sudo vim /mnt/etc/systemd/system/getty@tty1.service.d/override.conf 将username修改为我的用户名，重启 ","date":"2024-02-12","heading":"","objectID":"/posts/auto-login-arch/:0:0","tags":["Arch Linux"],"title":"Arch Linux自动登录","uri":"/posts/auto-login-arch/#来看看作者是怎么修的"},{"categories":"Arch Linux","collections":null,"content":"设备: 显卡：AMD Radeon RX 6500 XT ","date":"2024-01-27","heading":"设备:","objectID":"/posts/install-amd-graphics-on-arch/:0:0","tags":["Arch Linux"],"title":"在Arch Linux上安装AMD显卡驱动","uri":"/posts/install-amd-graphics-on-arch/#设备"},{"categories":"Arch Linux","collections":null,"content":"参照Wiki 如果动手能力及理解能力比较好的话可以参考ArchWiki： AMDGPU ATI Arch简明指南-Arch显卡驱动（不推荐！可能更新不及时，不过你可以参考一下那里的查看显卡架构小结） Warning：不要查看野教程！！不要查看野教程！！不要查看野教程！！ ","date":"2024-01-27","heading":"参照Wiki","objectID":"/posts/install-amd-graphics-on-arch/:0:0","tags":["Arch Linux"],"title":"在Arch Linux上安装AMD显卡驱动","uri":"/posts/install-amd-graphics-on-arch/#参照wiki"},{"categories":"Arch Linux","collections":null,"content":"安装 如果你碰巧与我使用的显卡是一样的，很好，你仍可能需要参照Wiki 此处以AMD Radeon RX 6500 XT为例，安装AMDGPU驱动，ATI驱动请自行Google和参照Arch Wiki 首先需要安装mesa包，使用以下命令： sudo pacman -S mesa lib32-mesa # lib32-mesa是对于32位程序，需要开启multilib 添加DDX驱动支持： sudo pacman -S xf86-video-amdgpu 在Wiki上所提到的其他软件，可以按需求安装，但是安装后的llvm和llvm-libs是没有-git结尾，否则，请重新安装llvm和llvm-libs： sudo pacman -S llvm llvm-libs 如果遇到有包依赖，请卸载掉(因为这些包大概都可能是以-git)结尾的，安装好llvm和llvm-libs后再安装回刚刚卸载的包(应该是没有-git结尾的) ","date":"2024-01-27","heading":"安装","objectID":"/posts/install-amd-graphics-on-arch/:0:0","tags":["Arch Linux"],"title":"在Arch Linux上安装AMD显卡驱动","uri":"/posts/install-amd-graphics-on-arch/#安装"},{"categories":"Arch Linux","collections":null,"content":"以下是我求助的图片及帖文 帖文 电报中文群组1-图床 电报中文群组2-图床 电报中文群组1-OneDrive 电报中文群组2-OneDrive ","date":"2024-01-27","heading":"以下是我求助的图片及帖文","objectID":"/posts/install-amd-graphics-on-arch/:0:0","tags":["Arch Linux"],"title":"在Arch Linux上安装AMD显卡驱动","uri":"/posts/install-amd-graphics-on-arch/#以下是我求助的图片及帖文"},{"categories":"Arch Linux","collections":null,"content":"本文介绍Arch Linux安装，以BIOS方式为例 ","date":"2023-08-15","heading":"本文介绍Arch Linux安装，以BIOS方式为例","objectID":"/posts/how-to-install-archbios/:0:0","tags":["Guides","Arch Linux"],"title":"Arch Linux安装教程(BIOS)","uri":"/posts/how-to-install-archbios/#本文介绍arch-linux安装以bios方式为例"},{"categories":"Arch Linux","collections":null,"content":"本文所输入的命令均可用Tab键补全 ","date":"2023-08-15","heading":"","objectID":"/posts/how-to-install-archbios/:0:0","tags":["Guides","Arch Linux"],"title":"Arch Linux安装教程(BIOS)","uri":"/posts/how-to-install-archbios/#本文所输入的命令均可用tab键补全"},{"categories":"Arch Linux","collections":null,"content":"前言 ","date":"2023-08-15","heading":"前言","objectID":"/posts/how-to-install-archbios/:0:0","tags":["Guides","Arch Linux"],"title":"Arch Linux安装教程(BIOS)","uri":"/posts/how-to-install-archbios/#前言"},{"categories":"Arch Linux","collections":null,"content":"Arch Linux官方安装指南 ","date":"2023-08-15","heading":"","objectID":"/posts/how-to-install-archbios/:1:0","tags":["Guides","Arch Linux"],"title":"Arch Linux安装教程(BIOS)","uri":"/posts/how-to-install-archbios/#arch-linux官方安装指南"},{"categories":"Arch Linux","collections":null,"content":"Arch Linux镜像下载地址USTC，2023.07.01 ","date":"2023-08-15","heading":"","objectID":"/posts/how-to-install-archbios/:1:1","tags":["Guides","Arch Linux"],"title":"Arch Linux安装教程(BIOS)","uri":"/posts/how-to-install-archbios/#arch-linux镜像下载地址ustc20230701"},{"categories":"Arch Linux","collections":null,"content":"注意： Arch Linux 安装镜像不支持安全启动（Secure Boot）注意： Arch Linux 安装镜像不支持安全启动（Secure Boot）,详见wiki ","date":"2023-08-15","heading":"注意： Arch Linux 安装镜像不支持安全启动（Secure Boot）","objectID":"/posts/how-to-install-archbios/:0:0","tags":["Guides","Arch Linux"],"title":"Arch Linux安装教程(BIOS)","uri":"/posts/how-to-install-archbios/#注意-arch-linux-安装镜像不支持安全启动secure-boot注意-arch-linux-安装镜像不支持安全启动secure-boot详见wiki"},{"categories":"Arch Linux","collections":null,"content":"前面说了一堆废话现在开始实操 ","date":"2023-08-15","heading":"","objectID":"/posts/how-to-install-archbios/:0:0","tags":["Guides","Arch Linux"],"title":"Arch Linux安装教程(BIOS)","uri":"/posts/how-to-install-archbios/#前面说了一堆废话现在开始实操"},{"categories":"Arch Linux","collections":null,"content":"开始安装 启动后，先禁用reflector服务 sudo systemctl stop reflector 这个服务主要是从Arch Linux Mirror Status 页面获取最新的镜像列表，然后筛选出最新的镜像并按速度排序，最后将结果写入到 /etc/pacman.d/mirrorlist 文件。 但它很鸡肋，手动添加镜像站会更好 更多关于该服务请见Wiki 添加的镜像站主要是USTC的镜像站或者清华镜像站 如果不想手动安装Arch的话可以使用archinstall: archinstall 详见Wiki ","date":"2023-08-15","heading":"开始安装","objectID":"/posts/how-to-install-archbios/:0:0","tags":["Guides","Arch Linux"],"title":"Arch Linux安装教程(BIOS)","uri":"/posts/how-to-install-archbios/#开始安装"},{"categories":"Arch Linux","collections":null,"content":"开始安装 启动后，先禁用reflector服务 sudo systemctl stop reflector 这个服务主要是从Arch Linux Mirror Status 页面获取最新的镜像列表，然后筛选出最新的镜像并按速度排序，最后将结果写入到 /etc/pacman.d/mirrorlist 文件。 但它很鸡肋，手动添加镜像站会更好 更多关于该服务请见Wiki 添加的镜像站主要是USTC的镜像站或者清华镜像站 如果不想手动安装Arch的话可以使用archinstall: archinstall 详见Wiki ","date":"2023-08-15","heading":"添加的镜像站主要是USTC的镜像站或者清华镜像站","objectID":"/posts/how-to-install-archbios/:0:0","tags":["Guides","Arch Linux"],"title":"Arch Linux安装教程(BIOS)","uri":"/posts/how-to-install-archbios/#添加的镜像站主要是ustc的镜像站或者清华镜像站"},{"categories":"Arch Linux","collections":null,"content":"开始安装 启动后，先禁用reflector服务 sudo systemctl stop reflector 这个服务主要是从Arch Linux Mirror Status 页面获取最新的镜像列表，然后筛选出最新的镜像并按速度排序，最后将结果写入到 /etc/pacman.d/mirrorlist 文件。 但它很鸡肋，手动添加镜像站会更好 更多关于该服务请见Wiki 添加的镜像站主要是USTC的镜像站或者清华镜像站 如果不想手动安装Arch的话可以使用archinstall: archinstall 详见Wiki ","date":"2023-08-15","heading":"如果不想手动安装Arch的话可以使用archinstall:","objectID":"/posts/how-to-install-archbios/:0:0","tags":["Guides","Arch Linux"],"title":"Arch Linux安装教程(BIOS)","uri":"/posts/how-to-install-archbios/#如果不想手动安装arch的话可以使用archinstall"},{"categories":"Arch Linux","collections":null,"content":"连接网络 ip link 要连接到网络： 有线以太网 —— 连接网线。 WiFi —— 使用 iwctl 验证无线网络。 移动宽带调制解调器（移动网卡） - 使用 mmcli 实用程序连接到移动网络。 配置网络连接： DHCP：对于有线以太网、无线局域网（WLAN）和无线广域网（WWAN）网络接口来说，动态 IP 地址和 DNS 服务器分配（由 systemd-networkd 和 systemd-resolved 提供功能）能够开箱即用。 静态 IP 地址：按照静态 IP 地址进行操作。 用 ping 检查网络连接： ping archlinux.org ","date":"2023-08-15","heading":"连接网络","objectID":"/posts/how-to-install-archbios/:1:0","tags":["Guides","Arch Linux"],"title":"Arch Linux安装教程(BIOS)","uri":"/posts/how-to-install-archbios/#连接网络"},{"categories":"Arch Linux","collections":null,"content":"更新系统时间 在 Live 环境中systemd-timesyncd默认启用，建立互联网连接后，时间将自动同步。 使用timedatectl(1)确保系统时间是准确的： timedatectl 即使时间不对也不要慌张: ) ","date":"2023-08-15","heading":"更新系统时间","objectID":"/posts/how-to-install-archbios/:2:0","tags":["Guides","Arch Linux"],"title":"Arch Linux安装教程(BIOS)","uri":"/posts/how-to-install-archbios/#更新系统时间"},{"categories":"Arch Linux","collections":null,"content":"查看设备名 使用lsblk来查看设备名(/dev/sda、/dev/nvme0n1等等) lsblk -l 或使用fdisk来查看 fdisk -l#(小写字母l) 结果中以 rom、loop 或者 airoot 结尾的设备可以被忽略。 提示：在分区之前，请检查 NVMe 驱动器和 Advanced Format 硬盘是否使用了 最佳逻辑扇区大小。但注意更改逻辑扇区大小后可能导致在Windows系统中出现兼容性问题。 ","date":"2023-08-15","heading":"查看设备名","objectID":"/posts/how-to-install-archbios/:3:0","tags":["Guides","Arch Linux"],"title":"Arch Linux安装教程(BIOS)","uri":"/posts/how-to-install-archbios/#查看设备名"},{"categories":"Arch Linux","collections":null,"content":"建立分区 使用fdisk来修改分区表： 此处为/dev/sda、/dev/nvme0n1、/dev/mmcblk0等等，依上文查看的设备名而定 fdisk /dev/vda #(此处的/dev/vda就是上文看到的设备名，不可照抄) 挂载点 分区 分区类型 建议大小 [SWAP] /dev/vda2(笔者这里是vda2，为swap分区，容量较小) Linux swap(交换空间) 大于512MB /mnt /dev/vda1(笔者这里是vda1，为根目录，容量量较大) Linux 剩余的空间 ","date":"2023-08-15","heading":"建立分区","objectID":"/posts/how-to-install-archbios/:4:0","tags":["Guides","Arch Linux"],"title":"Arch Linux安装教程(BIOS)","uri":"/posts/how-to-install-archbios/#建立分区"},{"categories":"Arch Linux","collections":null,"content":"开始分区 执行上文的 fdisk /dev/vda#vda不过多赘述 输入\u0026quot;o\u0026quot; 当看见：\u0026ldquo;Created a new DOS (MBR) disklabel with disk\u0026quot;时，说明已经创建了分区表 为swap分区，空间最好在10GB以内 Command (m for help): n Partition type p primary (0 primary, 0 extended, 4 free) e extended (container for logical partitions) Select (default p): Using default response p. Partition number (1-4, default 1): #回车 First sector (2048-62914559, default 2048):#回车 Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-62914559, default 62914559): +*G#此处的*为要添加的空间 输入\u0026quot;t\u0026rdquo;，设置分区类型 Command (m for help): t Partition number (1,2, default 2): Hex code or alias (type L to list all): 82 为/mnt分区，直接使用剩余空间 继续执行n Command (m for help): n Partition type p primary (0 primary, 0 extended, 4 free) e extended (container for logical partitions) Select (default p): Using default response p. Partition number (1-4, default 1): #此处回车 First sector (2048-62914559, default 2048):#此处回车 Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-62914559, default 62914559): #此处回车 输入\u0026quot;w\u0026quot;以保存并退出 ","date":"2023-08-15","heading":"","objectID":"/posts/how-to-install-archbios/:4:1","tags":["Guides","Arch Linux"],"title":"Arch Linux安装教程(BIOS)","uri":"/posts/how-to-install-archbios/#开始分区"},{"categories":"Arch Linux","collections":null,"content":"开始分区 执行上文的 fdisk /dev/vda#vda不过多赘述 输入\u0026quot;o\u0026quot; 当看见：\u0026ldquo;Created a new DOS (MBR) disklabel with disk\u0026quot;时，说明已经创建了分区表 为swap分区，空间最好在10GB以内 Command (m for help): n Partition type p primary (0 primary, 0 extended, 4 free) e extended (container for logical partitions) Select (default p): Using default response p. Partition number (1-4, default 1): #回车 First sector (2048-62914559, default 2048):#回车 Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-62914559, default 62914559): +*G#此处的*为要添加的空间 输入\u0026quot;t\u0026rdquo;，设置分区类型 Command (m for help): t Partition number (1,2, default 2): Hex code or alias (type L to list all): 82 为/mnt分区，直接使用剩余空间 继续执行n Command (m for help): n Partition type p primary (0 primary, 0 extended, 4 free) e extended (container for logical partitions) Select (default p): Using default response p. Partition number (1-4, default 1): #此处回车 First sector (2048-62914559, default 2048):#此处回车 Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-62914559, default 62914559): #此处回车 输入\u0026quot;w\u0026quot;以保存并退出 ","date":"2023-08-15","heading":"为swap分区，空间最好在10GB以内","objectID":"/posts/how-to-install-archbios/:4:1","tags":["Guides","Arch Linux"],"title":"Arch Linux安装教程(BIOS)","uri":"/posts/how-to-install-archbios/#为swap分区空间最好在10gb以内"},{"categories":"Arch Linux","collections":null,"content":"开始分区 执行上文的 fdisk /dev/vda#vda不过多赘述 输入\u0026quot;o\u0026quot; 当看见：\u0026ldquo;Created a new DOS (MBR) disklabel with disk\u0026quot;时，说明已经创建了分区表 为swap分区，空间最好在10GB以内 Command (m for help): n Partition type p primary (0 primary, 0 extended, 4 free) e extended (container for logical partitions) Select (default p): Using default response p. Partition number (1-4, default 1): #回车 First sector (2048-62914559, default 2048):#回车 Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-62914559, default 62914559): +*G#此处的*为要添加的空间 输入\u0026quot;t\u0026rdquo;，设置分区类型 Command (m for help): t Partition number (1,2, default 2): Hex code or alias (type L to list all): 82 为/mnt分区，直接使用剩余空间 继续执行n Command (m for help): n Partition type p primary (0 primary, 0 extended, 4 free) e extended (container for logical partitions) Select (default p): Using default response p. Partition number (1-4, default 1): #此处回车 First sector (2048-62914559, default 2048):#此处回车 Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-62914559, default 62914559): #此处回车 输入\u0026quot;w\u0026quot;以保存并退出 ","date":"2023-08-15","heading":"为/mnt分区，直接使用剩余空间","objectID":"/posts/how-to-install-archbios/:4:1","tags":["Guides","Arch Linux"],"title":"Arch Linux安装教程(BIOS)","uri":"/posts/how-to-install-archbios/#为mnt分区直接使用剩余空间"},{"categories":"Arch Linux","collections":null,"content":"格式化分区 这里使用btrfs文件系统 先查看硬盘分区 lsblk -l 然后将空间大的分区作为/mnt mkfs.btrfs -L ARCH /dev/vda1#此处的/dev/vda1应改为你想作为系统的分区 将交换分区初始化： mkswap -L SWAP /dev/vda2#此处的/dev/vda2应改为你想作为swap的分区 ","date":"2023-08-15","heading":"格式化分区","objectID":"/posts/how-to-install-archbios/:5:0","tags":["Guides","Arch Linux"],"title":"Arch Linux安装教程(BIOS)","uri":"/posts/how-to-install-archbios/#格式化分区"},{"categories":"Arch Linux","collections":null,"content":"挂载分区 将根磁盘卷挂载到/mnt： mount /dev/vda1 /mnt #此处的/dev/vda1应改为你想作为系统的分区 mkdir /mnt/home mount /dev/vda1 /mnt/home mkdir /mnt/root mount /dev/vda1 /mnt/root 启用swap分区 swapon /dev/vda2#此处的/dev/vda2应改为你想作为swap的分区 ","date":"2023-08-15","heading":"挂载分区","objectID":"/posts/how-to-install-archbios/:6:0","tags":["Guides","Arch Linux"],"title":"Arch Linux安装教程(BIOS)","uri":"/posts/how-to-install-archbios/#挂载分区"},{"categories":"Arch Linux","collections":null,"content":"安装系统 ","date":"2023-08-15","heading":"安装系统","objectID":"/posts/how-to-install-archbios/:7:0","tags":["Guides","Arch Linux"],"title":"Arch Linux安装教程(BIOS)","uri":"/posts/how-to-install-archbios/#安装系统"},{"categories":"Arch Linux","collections":null,"content":"选择镜像站 vim /etc/pacman.d/mirrorlist vim 基础命令 /*搜索 a输入状态 esc键退出模式 保存并退出vim： 先按Esc键，再按:wq 退出vim而不写入文件： 先按Esc键，再按:q! ","date":"2023-08-15","heading":"选择镜像站","objectID":"/posts/how-to-install-archbios/:7:1","tags":["Guides","Arch Linux"],"title":"Arch Linux安装教程(BIOS)","uri":"/posts/how-to-install-archbios/#选择镜像站"},{"categories":"Arch Linux","collections":null,"content":"选择镜像站 vim /etc/pacman.d/mirrorlist vim 基础命令 /*搜索 a输入状态 esc键退出模式 保存并退出vim： 先按Esc键，再按:wq 退出vim而不写入文件： 先按Esc键，再按:q! ","date":"2023-08-15","heading":"vim 基础命令","objectID":"/posts/how-to-install-archbios/:7:1","tags":["Guides","Arch Linux"],"title":"Arch Linux安装教程(BIOS)","uri":"/posts/how-to-install-archbios/#vim-基础命令"},{"categories":"Arch Linux","collections":null,"content":"在/etc/pacman.d/mirrorlist文件的第5行添加： Server = httsp://mirrors.ustc.edu.cn/archlinux/$repo/os/$arch ","date":"2023-08-15","heading":"在/etc/pacman.d/mirrorlist文件的第5行添加：","objectID":"/posts/how-to-install-archbios/:7:2","tags":["Guides","Arch Linux"],"title":"Arch Linux安装教程(BIOS)","uri":"/posts/how-to-install-archbios/#在etcpacmandmirrorlist文件的第5行添加"},{"categories":"Arch Linux","collections":null,"content":"安装必需软件包 pacstrap -K /mnt base linux linux-headers linux-firmware base-devel btrfs-progs networkmanager bash-completion vim#此处的vim可以是其他的编辑器 ","date":"2023-08-15","heading":"安装必需软件包","objectID":"/posts/how-to-install-archbios/:7:3","tags":["Guides","Arch Linux"],"title":"Arch Linux安装教程(BIOS)","uri":"/posts/how-to-install-archbios/#安装必需软件包"},{"categories":"Arch Linux","collections":null,"content":"配置系统 用以下命令生成 fstab 文件 (用 -U 或 -L 选项设置 UUID 或卷标)： genfstab -U /mnt \u003e\u003e /mnt/etc/fstab 强烈建议在执行完以上命令后，检查一下生成的 /mnt/etc/fstab 文件是否正确。 ","date":"2023-08-15","heading":"配置系统","objectID":"/posts/how-to-install-archbios/:8:0","tags":["Guides","Arch Linux"],"title":"Arch Linux安装教程(BIOS)","uri":"/posts/how-to-install-archbios/#配置系统"},{"categories":"Arch Linux","collections":null,"content":"Chroot 通过 chroot 到新安装的系统 arch-chroot /mnt 提示：此处使用的是arch-chroot而不是直接使用chroot，注意不要输错。 ","date":"2023-08-15","heading":"Chroot","objectID":"/posts/how-to-install-archbios/:8:1","tags":["Guides","Arch Linux"],"title":"Arch Linux安装教程(BIOS)","uri":"/posts/how-to-install-archbios/#chroot"},{"categories":"Arch Linux","collections":null,"content":"设置时区 此处以中国为例，别找北京了，就只有一个上海 ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime 然后运行 hwclock 以生成/etc/adjtime： hwclock --systohc ","date":"2023-08-15","heading":"设置时区","objectID":"/posts/how-to-install-archbios/:8:2","tags":["Guides","Arch Linux"],"title":"Arch Linux安装教程(BIOS)","uri":"/posts/how-to-install-archbios/#设置时区"},{"categories":"Arch Linux","collections":null,"content":"本地化 程序和库如果需要本地化文本，都依赖区域设置，后者明确规定了地域、货币、时区日期的格式、字符排列方式和其他本地化标准。 需在这两个文件设置：locale.gen 与 locale.conf。 编辑 /etc/locale.gen，然后取消掉 en_US.UTF-8 UTF-8 和其他需要的区域设置前的注释（#）。 接着执行 locale-gen 以生成 locale 信息： locale-gen#暂不执行 更改/etc/locale.gen内容： vim /etc/locale.gen 去除en_US.UTF-8和zh_CN.UTF-8前面的# 保存并退出 然后执行 locale-gen 然后创建/etc/locale.conf，并 编辑设定LANG变量 LANG=en_US.UTF-8 千万别设置为zh_CN.UTF-8!否则会导致TTY乱码！ ","date":"2023-08-15","heading":"本地化","objectID":"/posts/how-to-install-archbios/:9:0","tags":["Guides","Arch Linux"],"title":"Arch Linux安装教程(BIOS)","uri":"/posts/how-to-install-archbios/#本地化"},{"categories":"Arch Linux","collections":null,"content":"网络配置 创建hostname文件 myhostname(主机名) ","date":"2023-08-15","heading":"网络配置","objectID":"/posts/how-to-install-archbios/:10:0","tags":["Guides","Arch Linux"],"title":"Arch Linux安装教程(BIOS)","uri":"/posts/how-to-install-archbios/#网络配置"},{"categories":"Arch Linux","collections":null,"content":"设置Root密码 passwd 注：请记住你所设置的密码！ ","date":"2023-08-15","heading":"设置Root密码","objectID":"/posts/how-to-install-archbios/:11:0","tags":["Guides","Arch Linux"],"title":"Arch Linux安装教程(BIOS)","uri":"/posts/how-to-install-archbios/#设置root密码"},{"categories":"Arch Linux","collections":null,"content":"安装引导程序 pacman -S grub #双系统请多安装一个os-prober;Intel的CPU安装intel-ucode;AMD的CPU安装amd-ucode 如果出现\u0026quot;Import PGP key\u0026quot;字样，请运行以下命令： rm -rf /etc/pacman.d/gnupg \u0026\u0026 pacman-key --init \u0026\u0026 pacman-key --populate archlinux #生成新的密钥环并重新签署密钥 ","date":"2023-08-15","heading":"安装引导程序","objectID":"/posts/how-to-install-archbios/:12:0","tags":["Guides","Arch Linux"],"title":"Arch Linux安装教程(BIOS)","uri":"/posts/how-to-install-archbios/#安装引导程序"},{"categories":"Arch Linux","collections":null,"content":"将grub安装引导至系统盘： lsblk #查看设备名 安装引导 grub-install /dev/vda#这里的vda是设备名，不带数字 编辑/etc/default/grub文件 vim /etc/default/grub 将\u0026quot;GRUB_CMDLINE_LINUX_DEFAULT=\u0026ldquo;loglevel=3 quiet\u0026rdquo;\u0026quot; 中的loglevel=3改为5，删去quiet，添加nowatchdog； 修改后执行： grub-mkconfig -o /boot/grub/grub.cfg 为root再设置一次密码，可以为刚才设置的 最后执行 exit退出arch-chroot umout -R /mnt取消挂载/mnt reboot重启 ","date":"2023-08-15","heading":"将grub安装引导至系统盘：","objectID":"/posts/how-to-install-archbios/:12:1","tags":["Guides","Arch Linux"],"title":"Arch Linux安装教程(BIOS)","uri":"/posts/how-to-install-archbios/#将grub安装引导至系统盘"},{"categories":"Arch Linux","collections":null,"content":"最后，不出意外的话系统已经安装好了，重启后拔出介质，然后进入grub引导界面 ","date":"2023-08-15","heading":"最后，不出意外的话系统已经安装好了，重启后拔出介质，然后进入grub引导界面","objectID":"/posts/how-to-install-archbios/:0:0","tags":["Guides","Arch Linux"],"title":"Arch Linux安装教程(BIOS)","uri":"/posts/how-to-install-archbios/#最后不出意外的话系统已经安装好了重启后拔出介质然后进入grub引导界面"},{"categories":"Arch Linux","collections":null,"content":"那么恭喜你，你的Arch Linux已经成功安装好了！ ","date":"2023-08-15","heading":"那么恭喜你，你的Arch Linux已经成功安装好了！","objectID":"/posts/how-to-install-archbios/:0:0","tags":["Guides","Arch Linux"],"title":"Arch Linux安装教程(BIOS)","uri":"/posts/how-to-install-archbios/#那么恭喜你你的arch-linux已经成功安装好了"},{"categories":"Arch Linux","collections":null,"content":"还想再看一遍这个教程吗？只需要执行sudo rm -rf /*，你会回来的 ","date":"2023-08-15","heading":"","objectID":"/posts/how-to-install-archbios/:0:0","tags":["Guides","Arch Linux"],"title":"Arch Linux安装教程(BIOS)","uri":"/posts/how-to-install-archbios/#还想再看一遍这个教程吗只需要执行"},{"categories":"Guide","collections":null,"content":"Hyprland指南(安装常用软件) ","date":"2023-08-15","heading":"Hyprland指南(安装常用软件)","objectID":"/posts/hyprland-guide-install-useful-programs/:0:0","tags":["Guides","Hyprland"],"title":"Hyprland指南(安装常用软件)","uri":"/posts/hyprland-guide-install-useful-programs/#hyprland指南安装常用软件"},{"categories":"Guide","collections":null,"content":"安装VScode 全称为Visual Studio CodeAUR，由于名字太长所以被人们简化成VSC(吧？)不用管这些，我们只是用这个来码代码(屎山) paru -S visual-studio-code-bin 然后就跟着VSC的提示来安装中文语言包，装好就不用我说了吧？ 如果嫌调字体麻烦的话可以来到我的配置仓库，在里面的settings(VSC).json中，有一个//设置字体，把里面的内容复制到你的VSC配置文件中，路径如下: ~/.config/code/User/ 字体的话需要安装如下:(自己配置的话可跳过) paru -S ttf-cascadia-code nerd-fonts-completle 鸿蒙黑体也是可以的，但是在系统上使用似乎会出现有的字体大，有的字体小的问题，我没有进一步研究。 只记得要装这两个，还有些忘了 微软雅黑的话可以换成别的字体 ","date":"2023-08-15","heading":"安装VScode","objectID":"/posts/hyprland-guide-install-useful-programs/:1:0","tags":["Guides","Hyprland"],"title":"Hyprland指南(安装常用软件)","uri":"/posts/hyprland-guide-install-useful-programs/#安装vscode"},{"categories":"Guide","collections":null,"content":"剩下的就自己折腾吧 ","date":"2023-08-15","heading":"剩下的就自己折腾吧","objectID":"/posts/hyprland-guide-install-useful-programs/:1:1","tags":["Guides","Hyprland"],"title":"Hyprland指南(安装常用软件)","uri":"/posts/hyprland-guide-install-useful-programs/#剩下的就自己折腾吧"},{"categories":"Guide","collections":null,"content":"安装QQ 这个可没有配置文件照抄了，直接执行： paru -S linuxqq 安装即可，若出现闪退情况，请参阅 AUR-LinuxQQ评论区 ","date":"2023-08-15","heading":"安装QQ","objectID":"/posts/hyprland-guide-install-useful-programs/:2:0","tags":["Guides","Hyprland"],"title":"Hyprland指南(安装常用软件)","uri":"/posts/hyprland-guide-install-useful-programs/#安装qq"},{"categories":"Guide","collections":null,"content":"Markdown编辑软件 Typora UI可以，可以实时预览，支持快捷键，但是不支持修改快捷键，Markdown的功能基本都有，就是要￥ VNote 开源，不可以实时预览，支持快捷键，支持修改快捷键，有能力的甚至可以自定义主题以及样式，有待改进 Marktext 在Windows上用过，不过是20年的事，不知道现在咋样了，听说可以实时预览了，有兴趣的可以试试 下面以安装VNote为例： paru -S vnote-appimage 在AUR中有一个包名叫做vnote的,我试过,无法使用中文输入,所以使用vnote-appimage 安装Typora sudo pacman -S Typora 当然,这是有米的人的操作 想使用破解版的可以添加zzy-ac源(有米的人可以跳过) 在/etc/pacman.conf中添加: ` [zzy-ac] SigLevel=Never Server = https://github.com/zzy-ac/repo/releases/download/x86_64/ Server = https://gh.dmnb.cf/https://github.com/zzy-ac/repo/releases/download/x86_64 ` 安装Typora sudo pacman -S zzy-ac/typora-electron-crack ","date":"2023-08-15","heading":"Markdown编辑软件","objectID":"/posts/hyprland-guide-install-useful-programs/:3:0","tags":["Guides","Hyprland"],"title":"Hyprland指南(安装常用软件)","uri":"/posts/hyprland-guide-install-useful-programs/#markdown编辑软件"},{"categories":"Guide","collections":null,"content":"Markdown编辑软件 Typora UI可以，可以实时预览，支持快捷键，但是不支持修改快捷键，Markdown的功能基本都有，就是要￥ VNote 开源，不可以实时预览，支持快捷键，支持修改快捷键，有能力的甚至可以自定义主题以及样式，有待改进 Marktext 在Windows上用过，不过是20年的事，不知道现在咋样了，听说可以实时预览了，有兴趣的可以试试 下面以安装VNote为例： paru -S vnote-appimage 在AUR中有一个包名叫做vnote的,我试过,无法使用中文输入,所以使用vnote-appimage 安装Typora sudo pacman -S Typora 当然,这是有米的人的操作 想使用破解版的可以添加zzy-ac源(有米的人可以跳过) 在/etc/pacman.conf中添加: ` [zzy-ac] SigLevel=Never Server = https://github.com/zzy-ac/repo/releases/download/x86_64/ Server = https://gh.dmnb.cf/https://github.com/zzy-ac/repo/releases/download/x86_64 ` 安装Typora sudo pacman -S zzy-ac/typora-electron-crack ","date":"2023-08-15","heading":"下面以安装VNote为例：","objectID":"/posts/hyprland-guide-install-useful-programs/:3:0","tags":["Guides","Hyprland"],"title":"Hyprland指南(安装常用软件)","uri":"/posts/hyprland-guide-install-useful-programs/#下面以安装vnote为例"},{"categories":"Guide","collections":null,"content":"Markdown编辑软件 Typora UI可以，可以实时预览，支持快捷键，但是不支持修改快捷键，Markdown的功能基本都有，就是要￥ VNote 开源，不可以实时预览，支持快捷键，支持修改快捷键，有能力的甚至可以自定义主题以及样式，有待改进 Marktext 在Windows上用过，不过是20年的事，不知道现在咋样了，听说可以实时预览了，有兴趣的可以试试 下面以安装VNote为例： paru -S vnote-appimage 在AUR中有一个包名叫做vnote的,我试过,无法使用中文输入,所以使用vnote-appimage 安装Typora sudo pacman -S Typora 当然,这是有米的人的操作 想使用破解版的可以添加zzy-ac源(有米的人可以跳过) 在/etc/pacman.conf中添加: ` [zzy-ac] SigLevel=Never Server = https://github.com/zzy-ac/repo/releases/download/x86_64/ Server = https://gh.dmnb.cf/https://github.com/zzy-ac/repo/releases/download/x86_64 ` 安装Typora sudo pacman -S zzy-ac/typora-electron-crack ","date":"2023-08-15","heading":"安装Typora","objectID":"/posts/hyprland-guide-install-useful-programs/:3:0","tags":["Guides","Hyprland"],"title":"Hyprland指南(安装常用软件)","uri":"/posts/hyprland-guide-install-useful-programs/#安装typora"},{"categories":"Guide","collections":null,"content":"Markdown编辑软件 Typora UI可以，可以实时预览，支持快捷键，但是不支持修改快捷键，Markdown的功能基本都有，就是要￥ VNote 开源，不可以实时预览，支持快捷键，支持修改快捷键，有能力的甚至可以自定义主题以及样式，有待改进 Marktext 在Windows上用过，不过是20年的事，不知道现在咋样了，听说可以实时预览了，有兴趣的可以试试 下面以安装VNote为例： paru -S vnote-appimage 在AUR中有一个包名叫做vnote的,我试过,无法使用中文输入,所以使用vnote-appimage 安装Typora sudo pacman -S Typora 当然,这是有米的人的操作 想使用破解版的可以添加zzy-ac源(有米的人可以跳过) 在/etc/pacman.conf中添加: ` [zzy-ac] SigLevel=Never Server = https://github.com/zzy-ac/repo/releases/download/x86_64/ Server = https://gh.dmnb.cf/https://github.com/zzy-ac/repo/releases/download/x86_64 ` 安装Typora sudo pacman -S zzy-ac/typora-electron-crack ","date":"2023-08-15","heading":"想使用破解版的可以添加zzy-ac源(","objectID":"/posts/hyprland-guide-install-useful-programs/:3:0","tags":["Guides","Hyprland"],"title":"Hyprland指南(安装常用软件)","uri":"/posts/hyprland-guide-install-useful-programs/#想使用破解版的可以添加zzy-ac源有米的人可以跳过"},{"categories":"Guide","collections":null,"content":"All done! Enjoy it! ","date":"2023-08-15","heading":"All done! Enjoy it!","objectID":"/posts/hyprland-guide-install-useful-programs/:0:0","tags":["Guides","Hyprland"],"title":"Hyprland指南(安装常用软件)","uri":"/posts/hyprland-guide-install-useful-programs/#all-done-enjoy-it"},{"categories":"Guide","collections":null,"content":"Writer:PILIHU ","date":"2023-08-15","heading":"Writer:PILIHU","objectID":"/posts/hyprland-guide-install-useful-programs/:0:0","tags":["Guides","Hyprland"],"title":"Hyprland指南(安装常用软件)","uri":"/posts/hyprland-guide-install-useful-programs/#writerpilihu"},{"categories":"Guide","collections":null,"content":"Hyprland指南(第二篇) ","date":"2023-08-14","heading":"Hyprland指南(第二篇)","objectID":"/posts/hyprland-guide-install-other-programs/:0:0","tags":["Guides","Hyprland"],"title":"Hyprland指南(安装其他软件)","uri":"/posts/hyprland-guide-install-other-programs/#hyprland指南第二篇"},{"categories":"Guide","collections":null,"content":"若想使用通知，需要安装 dunst 如下: sudo pacman -S dunst 然后将本仓库的/dunst 复制到~/.config/dunst 中，若没有该文件夹，则创建一个 dunst 的文件夹，否则 dunst 不会读取并且使用的。 都用 Arch Linux 了，不会连创建文件夹都不会吧？ 为了避免有人不会创建文件夹 mkdir ~/.config/dunst 然后设置自启动： 在~/.config/hypr/hyprland.conf中添加： exec-once = dunst ","date":"2023-08-14","heading":"若想使用通知，需要安装 dunst","objectID":"/posts/hyprland-guide-install-other-programs/:1:0","tags":["Guides","Hyprland"],"title":"Hyprland指南(安装其他软件)","uri":"/posts/hyprland-guide-install-other-programs/#若想使用通知需要安装-dunst"},{"categories":"Guide","collections":null,"content":"若想实现类似于 i3-status 的功能（状态栏），需要安装 waybar 如下: paru -S waybar-git 然后将本仓库中的/waybar 文件夹复制到~/.config/hypr 中可以新建文件夹，也可以不用然后记住 waybar 文件夹中的 config.jsonc 和 style.css 路径（完整路径） 设置自启动： 在~/.config/hypr/hyprland.conf 中写入： exec-once = waybar -c $WAYBAR/config.jsonc -s $WAYBAR/style.css 其中的$WAYBAR 为你的 waybar 具体路径 ","date":"2023-08-14","heading":"若想实现类似于 i3-status 的功能（状态栏），需要安装 waybar","objectID":"/posts/hyprland-guide-install-other-programs/:2:0","tags":["Guides","Hyprland"],"title":"Hyprland指南(安装其他软件)","uri":"/posts/hyprland-guide-install-other-programs/#若想实现类似于-i3-status-的功能状态栏需要安装-waybar"},{"categories":"Guide","collections":null,"content":"若想输入中文，你需要安装输入法 ","date":"2023-08-14","heading":"","objectID":"/posts/hyprland-guide-install-other-programs/:3:0","tags":["Guides","Hyprland"],"title":"Hyprland指南(安装其他软件)","uri":"/posts/hyprland-guide-install-other-programs/#若想输入中文你需要安装输入法"},{"categories":"Guide","collections":null,"content":"若想使用fcitx5的中文输入法(非rime) sudo pacman -S fcitx5-im fcitx5-chinese fcitx5-pinyin-moegirl fcitx5-material-color # 安装输入法相关软件包，词库，主题 ","date":"2023-08-14","heading":"若想使用fcitx5的中文输入法(非rime)","objectID":"/posts/hyprland-guide-install-other-programs/:3:1","tags":["Guides","Hyprland"],"title":"Hyprland指南(安装其他软件)","uri":"/posts/hyprland-guide-install-other-programs/#若想使用fcitx5的中文输入法非rime"},{"categories":"Guide","collections":null,"content":"此处以安装rime输入法为例，其他输入法同理，不过推荐使用fcitx5 sudo pacman -S fcitx5-rime 我使用的就是rime输入法，不过我感觉输入体验是不如搜狗输入法，将就着用吧 此外，我们还需要设置环境变量，此处使用neovim来编辑(vim,nano等等编辑器均可，无需跟风) sudo nvim /etc/environment 加入以下内容： GTK_IM_MODULE=fcitx QT_IM_MODULE=fcitx XMODIFIERS=@im=fcitx SDL_IM_MODULE=fcitx GLFW_IM_MODULE=ibus ","date":"2023-08-14","heading":"","objectID":"/posts/hyprland-guide-install-other-programs/:3:2","tags":["Guides","Hyprland"],"title":"Hyprland指南(安装其他软件)","uri":"/posts/hyprland-guide-install-other-programs/#此处以安装rime输入法为例其他输入法同理不过推荐使用fcitx5"},{"categories":"Guide","collections":null,"content":"此处以安装rime输入法为例，其他输入法同理，不过推荐使用fcitx5 sudo pacman -S fcitx5-rime 我使用的就是rime输入法，不过我感觉输入体验是不如搜狗输入法，将就着用吧 此外，我们还需要设置环境变量，此处使用neovim来编辑(vim,nano等等编辑器均可，无需跟风) sudo nvim /etc/environment 加入以下内容： GTK_IM_MODULE=fcitx QT_IM_MODULE=fcitx XMODIFIERS=@im=fcitx SDL_IM_MODULE=fcitx GLFW_IM_MODULE=ibus ","date":"2023-08-14","heading":"此外，我们还需要设置环境变量，此处使用neovim来编辑(","objectID":"/posts/hyprland-guide-install-other-programs/:3:2","tags":["Guides","Hyprland"],"title":"Hyprland指南(安装其他软件)","uri":"/posts/hyprland-guide-install-other-programs/#此外我们还需要设置环境变量此处使用neovim来编辑vimnano等等编辑器均可无需跟风"},{"categories":"Guide","collections":null,"content":"本篇教程结束 ","date":"2023-08-14","heading":"本篇教程结束","objectID":"/posts/hyprland-guide-install-other-programs/:0:0","tags":["Guides","Hyprland"],"title":"Hyprland指南(安装其他软件)","uri":"/posts/hyprland-guide-install-other-programs/#本篇教程结束"},{"categories":"Guide","collections":null,"content":"All done! Enjoy it! ","date":"2023-08-14","heading":"All done! Enjoy it!","objectID":"/posts/hyprland-guide-install-other-programs/:0:0","tags":["Guides","Hyprland"],"title":"Hyprland指南(安装其他软件)","uri":"/posts/hyprland-guide-install-other-programs/#all-done-enjoy-it"},{"categories":"Arch Linux","collections":null,"content":"Arch Linux安装教程 （以Legacy BIOS为例） 最后更新于2023年01月06日 ","date":"2023-01-06","heading":"Arch Linux安装教程 （以Legacy BIOS为例） 最后更新于2023年01月06日","objectID":"/posts/how-to-install-archbiosxiaoice/:0:0","tags":["Guides","Arch Linux"],"title":"Arch Linux安装教程(以Legacy BIOS为例)","uri":"/posts/how-to-install-archbiosxiaoice/#arch-linux安装教程-以legacy-bios为例-最后更新于2023年01月06日"},{"categories":"Arch Linux","collections":null,"content":"1.Arch Linux \u0026amp; KDE 的安装及配置—— 零、系统镜像的下载 \u0026amp; 安装介质的制作 \u0026amp; BIOS 的设置 点击此处下载系统镜像并校验SHA256镜像的完整性。校验无误后，使用Ventoy制作安装介质。（如果是首次使用Ventoy，请点击此处查看使用方法）然后进入BIOS，将安全启动和快速启动关闭并将安装介质（如U盘）设置为第一启动项，并按F10保存退出。进入ArchLinux安装盘即可。 如果设备中包含NVIDIA显卡，请在进入liveCD的GRUB引导界面时按下键盘上的字母E,进入GRUB的编辑模式。在其linux行的末尾加入nouveau.modeset=0来屏蔽NVIDIA开源驱动。否则会出现加载nouveau模块报错和其他模块无法加载的问题。编辑完成后按CTRL+X退出。 如有疑问请参考Wiki以下章节： 获取安装映像 准备安装映像 启动到Live环境 一、验证引导模式 \u0026amp; 联网 \u0026amp; 换源： $ ls /sys/firmware/efi/efivars #验证引导模式（如果目录不存在，即为Legacy BIOS引导模式；反之，请使用隔壁以UEFI为例的教程） $ iwctl #运行iwctl（如果是台式机，可直接跳到ping -c 5 archlinux.org这一步） [iwctl]# device list #列出WiFi设备（一般为wlan0；这里以wlan0为例） [iwctl]# station wlan0 scan #扫描网络 [iwctl]# station wlan0 get-networks #列出可用网络 [iwctl]# station wlan0 connect X #连接到X（X改成你可用的WiFi名称并在回车后输入密码且确保密码输入正确） [iwctl]# exit #退出iwctl $ ping -c 5 archlinux.org #检查网络连接（如果有输出内容，即为联网成功） $ reflector --country China --save /etc/pacman.d/mirrorlist #换源（注意大小写） $ systemctl stop reflector #关闭reflector服务 $ vim /etc/pacman.d/mirrorlist #编辑/etc/pacman.d/mirrorlist文件，保留自己需要的源（一般推荐使用中科大源或清华源） $ timedatectl status #检查服务状态 如有疑问请参考Wiki以下章节： 验证引导模式 连接到因特网 选择镜像和reflector 更新系统时间 二、分区 \u0026amp; 挂载： 以下分区和挂载相关步骤是以SATA协议硬盘为例。 $ lsblk #查看硬盘名称（一般为sda；这里以sda为例） $ fdisk /dev/sda #使用fdisk对sda进行相关操作 #步骤如下： Command (m for help): o #输入o新建MBR分区表 Command (m for help): n #输入n创建新分区 Select (default p): p #这里按Enter键创建主分区（如果想创建逻辑扩展分区请输入e） Partition number (1-4, default 1): #这里按Enter键 First sector (2048-X, default 2048): #这里按Enter键 Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-X, default X): +10G #输入+10G Command (m for help): t #输入t更改分区类型 Hex code or alias (type L to list all): 82 #输入82，创建swap分区 Command (m for help): n #输入n创建新分区，然后一直按Enter键，把剩下的空间全部分配给/分区 Command (m for help): w #输入w写入 $ lsblk #查看分区结构是否正确 $ mkfs.btrfs -L ARCH /dev/sda2 #将sda2格式化为btrfs，创建标签为ARCH（注意大小写） $ mkswap -L SWAP /dev/sda1 #将sda1设置为swap，创建标签为SWAP（注意大小写） $ mount -t btrfs -o compress=zstd /dev/sda2 /mnt #将sda2挂载到/mnt目录并创建btrfs子卷 #步骤如下： btrfs subvolume create /mnt/@ #创建/目录的btrfs子卷 btrfs subvolume create /mnt/@root #创建/root目录的btrfs子卷 btrfs subvolume create /mnt/@home #创建/home目录的btrfs子卷 umount /mnt #卸载/mnt目录 mount -t btrfs -o subvol=/@,compress=zstd /dev/sda2 /mnt #挂载/目录的btrfs子卷到/mnt目录 mkdir /mnt/root #创建/mnt/root目录 mount -t btrfs -o subvol=/@root,compress=zstd /dev/sda2 /mnt/root #挂载/root目录的btrfs子卷到/mnt/root目录 mkdir /mnt/home #创建/mnt/home目录 mount -t btrfs -o subvol=/@home,compress=zstd /dev/sda2 /mnt/home #挂载/home目录的btrfs子卷到/mnt/home目录 $ swapon /dev/sda1 #激活sda1为交换分区 $ lsblk -f #查看相应分区的文件系统及挂载是否正确 在pacstrap之前，请再检查一下/etc/pacman.d/mirrorlist文件。例如：cat /etc/pacman.d/mirrorlist或vim /etc/pacman.d/mirrorlist。总之，检查一下这个文件即可。 如有疑问请参考Wiki以下章节： 建立硬盘分区 格式化分区 挂载分区 三、安装基本的包 \u0026amp; 初步配置： $ pacstrap -K /mnt linux linux-firmware sof-firmware linux-headers base base-devel vim bash-completion networkmanager dosfstools btrfs-progs exfatprogs ntfs-3g pacman-contrib #安装必要的软件包（注意大小写） $ genfstab -U /mnt \u003e /mnt/etc/fstab #生成/mnt/etc/fstab文件（注意大小写） $ cat /mnt/etc/fstab #查看/mnt/etc/fstab文件是否正确（如果不正确，请重新分区、挂载、pacstrap） $ arch-chroot /mnt #进入目标系统 $ pacman -S grub amd-ucode intel-ucode #安装grub \u0026 amd-ucode或intel-ucode（AMD的CPU安装amd-ucode，intel的CPU安装intel-ucode） $ lsblk #查看硬盘名称 $ grub-install /dev/sda #将grub写入sda $ vim /etc/default/grub #编辑/etc/default/grub文件，将GRUB_CMDLINE_LINUX=\"\"修改为GRUB_CMDLINE_LINUX=\" nouveau.modeset=0\"（没有nvidia显卡可跳过） $ grub-mkconfig -o /boot/grub/grub.cfg #生成/boot/grub/grub.cfg文件 $ systemctl enable NetworkManager #开机自启NetworkManager服务（注意大小写） $ passwd root #设置root密码（在回车后输入密码且密码不显示，输入完成后回车，再输入一遍且密码同样不显示，输入完成后再回车，即可完成密码设置） 如有疑问请参考Wiki以下章节： 安装必需的软件包 Fstab Chroot 安装引导程序 Root密码 四、退出目标系统： $ exit #退出目标系统 $ umount -R /mnt #卸载/mnt目录 $ reboot #重启并登陆root 五、系统配置： $ nmtui #运行nmtui（根据图形界面提示进行联网操作即可；台式机可跳过） $ ping -c 5 archlinux.org #检查网络连接（如果有输出内容，即为联网成功） $ vim /etc/hostname #创建/etc/hostname文件，加入以下内容： arch #将主机名设置为arch $ vim /etc/hosts #编辑/etc/hosts文件，在末尾加入以下内容： 127.0.0.1 localhost ::1 localhost 127.0.1.1 arch.localdomain arch #配置hosts文件，映射IP地址和主机名 $ ln -sf /usr/share/zon","date":"2023-01-06","heading":"1.Arch Linux \u0026amp; KDE 的安装及配置——","objectID":"/posts/how-to-install-archbiosxiaoice/:1:0","tags":["Guides","Arch Linux"],"title":"Arch Linux安装教程(以Legacy BIOS为例)","uri":"/posts/how-to-install-archbiosxiaoice/#1arch-linux--kde-的安装及配置"},{"categories":"Arch Linux","collections":null,"content":"1.Arch Linux \u0026amp; KDE 的安装及配置—— 零、系统镜像的下载 \u0026amp; 安装介质的制作 \u0026amp; BIOS 的设置 点击此处下载系统镜像并校验SHA256镜像的完整性。校验无误后，使用Ventoy制作安装介质。（如果是首次使用Ventoy，请点击此处查看使用方法）然后进入BIOS，将安全启动和快速启动关闭并将安装介质（如U盘）设置为第一启动项，并按F10保存退出。进入ArchLinux安装盘即可。 如果设备中包含NVIDIA显卡，请在进入liveCD的GRUB引导界面时按下键盘上的字母E,进入GRUB的编辑模式。在其linux行的末尾加入nouveau.modeset=0来屏蔽NVIDIA开源驱动。否则会出现加载nouveau模块报错和其他模块无法加载的问题。编辑完成后按CTRL+X退出。 如有疑问请参考Wiki以下章节： 获取安装映像 准备安装映像 启动到Live环境 一、验证引导模式 \u0026amp; 联网 \u0026amp; 换源： $ ls /sys/firmware/efi/efivars #验证引导模式（如果目录不存在，即为Legacy BIOS引导模式；反之，请使用隔壁以UEFI为例的教程） $ iwctl #运行iwctl（如果是台式机，可直接跳到ping -c 5 archlinux.org这一步） [iwctl]# device list #列出WiFi设备（一般为wlan0；这里以wlan0为例） [iwctl]# station wlan0 scan #扫描网络 [iwctl]# station wlan0 get-networks #列出可用网络 [iwctl]# station wlan0 connect X #连接到X（X改成你可用的WiFi名称并在回车后输入密码且确保密码输入正确） [iwctl]# exit #退出iwctl $ ping -c 5 archlinux.org #检查网络连接（如果有输出内容，即为联网成功） $ reflector --country China --save /etc/pacman.d/mirrorlist #换源（注意大小写） $ systemctl stop reflector #关闭reflector服务 $ vim /etc/pacman.d/mirrorlist #编辑/etc/pacman.d/mirrorlist文件，保留自己需要的源（一般推荐使用中科大源或清华源） $ timedatectl status #检查服务状态 如有疑问请参考Wiki以下章节： 验证引导模式 连接到因特网 选择镜像和reflector 更新系统时间 二、分区 \u0026amp; 挂载： 以下分区和挂载相关步骤是以SATA协议硬盘为例。 $ lsblk #查看硬盘名称（一般为sda；这里以sda为例） $ fdisk /dev/sda #使用fdisk对sda进行相关操作 #步骤如下： Command (m for help): o #输入o新建MBR分区表 Command (m for help): n #输入n创建新分区 Select (default p): p #这里按Enter键创建主分区（如果想创建逻辑扩展分区请输入e） Partition number (1-4, default 1): #这里按Enter键 First sector (2048-X, default 2048): #这里按Enter键 Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-X, default X): +10G #输入+10G Command (m for help): t #输入t更改分区类型 Hex code or alias (type L to list all): 82 #输入82，创建swap分区 Command (m for help): n #输入n创建新分区，然后一直按Enter键，把剩下的空间全部分配给/分区 Command (m for help): w #输入w写入 $ lsblk #查看分区结构是否正确 $ mkfs.btrfs -L ARCH /dev/sda2 #将sda2格式化为btrfs，创建标签为ARCH（注意大小写） $ mkswap -L SWAP /dev/sda1 #将sda1设置为swap，创建标签为SWAP（注意大小写） $ mount -t btrfs -o compress=zstd /dev/sda2 /mnt #将sda2挂载到/mnt目录并创建btrfs子卷 #步骤如下： btrfs subvolume create /mnt/@ #创建/目录的btrfs子卷 btrfs subvolume create /mnt/@root #创建/root目录的btrfs子卷 btrfs subvolume create /mnt/@home #创建/home目录的btrfs子卷 umount /mnt #卸载/mnt目录 mount -t btrfs -o subvol=/@,compress=zstd /dev/sda2 /mnt #挂载/目录的btrfs子卷到/mnt目录 mkdir /mnt/root #创建/mnt/root目录 mount -t btrfs -o subvol=/@root,compress=zstd /dev/sda2 /mnt/root #挂载/root目录的btrfs子卷到/mnt/root目录 mkdir /mnt/home #创建/mnt/home目录 mount -t btrfs -o subvol=/@home,compress=zstd /dev/sda2 /mnt/home #挂载/home目录的btrfs子卷到/mnt/home目录 $ swapon /dev/sda1 #激活sda1为交换分区 $ lsblk -f #查看相应分区的文件系统及挂载是否正确 在pacstrap之前，请再检查一下/etc/pacman.d/mirrorlist文件。例如：cat /etc/pacman.d/mirrorlist或vim /etc/pacman.d/mirrorlist。总之，检查一下这个文件即可。 如有疑问请参考Wiki以下章节： 建立硬盘分区 格式化分区 挂载分区 三、安装基本的包 \u0026amp; 初步配置： $ pacstrap -K /mnt linux linux-firmware sof-firmware linux-headers base base-devel vim bash-completion networkmanager dosfstools btrfs-progs exfatprogs ntfs-3g pacman-contrib #安装必要的软件包（注意大小写） $ genfstab -U /mnt \u003e /mnt/etc/fstab #生成/mnt/etc/fstab文件（注意大小写） $ cat /mnt/etc/fstab #查看/mnt/etc/fstab文件是否正确（如果不正确，请重新分区、挂载、pacstrap） $ arch-chroot /mnt #进入目标系统 $ pacman -S grub amd-ucode intel-ucode #安装grub \u0026 amd-ucode或intel-ucode（AMD的CPU安装amd-ucode，intel的CPU安装intel-ucode） $ lsblk #查看硬盘名称 $ grub-install /dev/sda #将grub写入sda $ vim /etc/default/grub #编辑/etc/default/grub文件，将GRUB_CMDLINE_LINUX=\"\"修改为GRUB_CMDLINE_LINUX=\" nouveau.modeset=0\"（没有nvidia显卡可跳过） $ grub-mkconfig -o /boot/grub/grub.cfg #生成/boot/grub/grub.cfg文件 $ systemctl enable NetworkManager #开机自启NetworkManager服务（注意大小写） $ passwd root #设置root密码（在回车后输入密码且密码不显示，输入完成后回车，再输入一遍且密码同样不显示，输入完成后再回车，即可完成密码设置） 如有疑问请参考Wiki以下章节： 安装必需的软件包 Fstab Chroot 安装引导程序 Root密码 四、退出目标系统： $ exit #退出目标系统 $ umount -R /mnt #卸载/mnt目录 $ reboot #重启并登陆root 五、系统配置： $ nmtui #运行nmtui（根据图形界面提示进行联网操作即可；台式机可跳过） $ ping -c 5 archlinux.org #检查网络连接（如果有输出内容，即为联网成功） $ vim /etc/hostname #创建/etc/hostname文件，加入以下内容： arch #将主机名设置为arch $ vim /etc/hosts #编辑/etc/hosts文件，在末尾加入以下内容： 127.0.0.1 localhost ::1 localhost 127.0.1.1 arch.localdomain arch #配置hosts文件，映射IP地址和主机名 $ ln -sf /usr/share/zon","date":"2023-01-06","heading":"零、系统镜像的下载 \u0026amp; 安装介质的制作 \u0026amp; BIOS 的设置","objectID":"/posts/how-to-install-archbiosxiaoice/:1:0","tags":["Guides","Arch Linux"],"title":"Arch Linux安装教程(以Legacy BIOS为例)","uri":"/posts/how-to-install-archbiosxiaoice/#零系统镜像的下载--安装介质的制作--bios-的设置"},{"categories":"Arch Linux","collections":null,"content":"1.Arch Linux \u0026amp; KDE 的安装及配置—— 零、系统镜像的下载 \u0026amp; 安装介质的制作 \u0026amp; BIOS 的设置 点击此处下载系统镜像并校验SHA256镜像的完整性。校验无误后，使用Ventoy制作安装介质。（如果是首次使用Ventoy，请点击此处查看使用方法）然后进入BIOS，将安全启动和快速启动关闭并将安装介质（如U盘）设置为第一启动项，并按F10保存退出。进入ArchLinux安装盘即可。 如果设备中包含NVIDIA显卡，请在进入liveCD的GRUB引导界面时按下键盘上的字母E,进入GRUB的编辑模式。在其linux行的末尾加入nouveau.modeset=0来屏蔽NVIDIA开源驱动。否则会出现加载nouveau模块报错和其他模块无法加载的问题。编辑完成后按CTRL+X退出。 如有疑问请参考Wiki以下章节： 获取安装映像 准备安装映像 启动到Live环境 一、验证引导模式 \u0026amp; 联网 \u0026amp; 换源： $ ls /sys/firmware/efi/efivars #验证引导模式（如果目录不存在，即为Legacy BIOS引导模式；反之，请使用隔壁以UEFI为例的教程） $ iwctl #运行iwctl（如果是台式机，可直接跳到ping -c 5 archlinux.org这一步） [iwctl]# device list #列出WiFi设备（一般为wlan0；这里以wlan0为例） [iwctl]# station wlan0 scan #扫描网络 [iwctl]# station wlan0 get-networks #列出可用网络 [iwctl]# station wlan0 connect X #连接到X（X改成你可用的WiFi名称并在回车后输入密码且确保密码输入正确） [iwctl]# exit #退出iwctl $ ping -c 5 archlinux.org #检查网络连接（如果有输出内容，即为联网成功） $ reflector --country China --save /etc/pacman.d/mirrorlist #换源（注意大小写） $ systemctl stop reflector #关闭reflector服务 $ vim /etc/pacman.d/mirrorlist #编辑/etc/pacman.d/mirrorlist文件，保留自己需要的源（一般推荐使用中科大源或清华源） $ timedatectl status #检查服务状态 如有疑问请参考Wiki以下章节： 验证引导模式 连接到因特网 选择镜像和reflector 更新系统时间 二、分区 \u0026amp; 挂载： 以下分区和挂载相关步骤是以SATA协议硬盘为例。 $ lsblk #查看硬盘名称（一般为sda；这里以sda为例） $ fdisk /dev/sda #使用fdisk对sda进行相关操作 #步骤如下： Command (m for help): o #输入o新建MBR分区表 Command (m for help): n #输入n创建新分区 Select (default p): p #这里按Enter键创建主分区（如果想创建逻辑扩展分区请输入e） Partition number (1-4, default 1): #这里按Enter键 First sector (2048-X, default 2048): #这里按Enter键 Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-X, default X): +10G #输入+10G Command (m for help): t #输入t更改分区类型 Hex code or alias (type L to list all): 82 #输入82，创建swap分区 Command (m for help): n #输入n创建新分区，然后一直按Enter键，把剩下的空间全部分配给/分区 Command (m for help): w #输入w写入 $ lsblk #查看分区结构是否正确 $ mkfs.btrfs -L ARCH /dev/sda2 #将sda2格式化为btrfs，创建标签为ARCH（注意大小写） $ mkswap -L SWAP /dev/sda1 #将sda1设置为swap，创建标签为SWAP（注意大小写） $ mount -t btrfs -o compress=zstd /dev/sda2 /mnt #将sda2挂载到/mnt目录并创建btrfs子卷 #步骤如下： btrfs subvolume create /mnt/@ #创建/目录的btrfs子卷 btrfs subvolume create /mnt/@root #创建/root目录的btrfs子卷 btrfs subvolume create /mnt/@home #创建/home目录的btrfs子卷 umount /mnt #卸载/mnt目录 mount -t btrfs -o subvol=/@,compress=zstd /dev/sda2 /mnt #挂载/目录的btrfs子卷到/mnt目录 mkdir /mnt/root #创建/mnt/root目录 mount -t btrfs -o subvol=/@root,compress=zstd /dev/sda2 /mnt/root #挂载/root目录的btrfs子卷到/mnt/root目录 mkdir /mnt/home #创建/mnt/home目录 mount -t btrfs -o subvol=/@home,compress=zstd /dev/sda2 /mnt/home #挂载/home目录的btrfs子卷到/mnt/home目录 $ swapon /dev/sda1 #激活sda1为交换分区 $ lsblk -f #查看相应分区的文件系统及挂载是否正确 在pacstrap之前，请再检查一下/etc/pacman.d/mirrorlist文件。例如：cat /etc/pacman.d/mirrorlist或vim /etc/pacman.d/mirrorlist。总之，检查一下这个文件即可。 如有疑问请参考Wiki以下章节： 建立硬盘分区 格式化分区 挂载分区 三、安装基本的包 \u0026amp; 初步配置： $ pacstrap -K /mnt linux linux-firmware sof-firmware linux-headers base base-devel vim bash-completion networkmanager dosfstools btrfs-progs exfatprogs ntfs-3g pacman-contrib #安装必要的软件包（注意大小写） $ genfstab -U /mnt \u003e /mnt/etc/fstab #生成/mnt/etc/fstab文件（注意大小写） $ cat /mnt/etc/fstab #查看/mnt/etc/fstab文件是否正确（如果不正确，请重新分区、挂载、pacstrap） $ arch-chroot /mnt #进入目标系统 $ pacman -S grub amd-ucode intel-ucode #安装grub \u0026 amd-ucode或intel-ucode（AMD的CPU安装amd-ucode，intel的CPU安装intel-ucode） $ lsblk #查看硬盘名称 $ grub-install /dev/sda #将grub写入sda $ vim /etc/default/grub #编辑/etc/default/grub文件，将GRUB_CMDLINE_LINUX=\"\"修改为GRUB_CMDLINE_LINUX=\" nouveau.modeset=0\"（没有nvidia显卡可跳过） $ grub-mkconfig -o /boot/grub/grub.cfg #生成/boot/grub/grub.cfg文件 $ systemctl enable NetworkManager #开机自启NetworkManager服务（注意大小写） $ passwd root #设置root密码（在回车后输入密码且密码不显示，输入完成后回车，再输入一遍且密码同样不显示，输入完成后再回车，即可完成密码设置） 如有疑问请参考Wiki以下章节： 安装必需的软件包 Fstab Chroot 安装引导程序 Root密码 四、退出目标系统： $ exit #退出目标系统 $ umount -R /mnt #卸载/mnt目录 $ reboot #重启并登陆root 五、系统配置： $ nmtui #运行nmtui（根据图形界面提示进行联网操作即可；台式机可跳过） $ ping -c 5 archlinux.org #检查网络连接（如果有输出内容，即为联网成功） $ vim /etc/hostname #创建/etc/hostname文件，加入以下内容： arch #将主机名设置为arch $ vim /etc/hosts #编辑/etc/hosts文件，在末尾加入以下内容： 127.0.0.1 localhost ::1 localhost 127.0.1.1 arch.localdomain arch #配置hosts文件，映射IP地址和主机名 $ ln -sf /usr/share/zon","date":"2023-01-06","heading":"如果设备中包含NVIDIA显卡，请在进入liveCD的GRUB引导界面时按下键盘上的字母E,进入GRUB的编辑模式。在其linux行的末尾加入nouveau.modeset=0来屏蔽NVIDIA开源驱动。否则会出现加载nouveau模块报错和其他模块无法加载的问题。编辑完成后按CTRL+X退出。","objectID":"/posts/how-to-install-archbiosxiaoice/:1:0","tags":["Guides","Arch Linux"],"title":"Arch Linux安装教程(以Legacy BIOS为例)","uri":"/posts/how-to-install-archbiosxiaoice/#如果设备中包含nvidia显卡请在进入livecd的grub引导界面时按下键盘上的字母e进入grub的编辑模式在其linux行的末尾加入nouveaumodeset0来屏蔽nvidia开源驱动否则会出现加载nouveau模块报错和其他模块无法加载的问题编辑完成后按ctrlx退出"},{"categories":"Arch Linux","collections":null,"content":"1.Arch Linux \u0026amp; KDE 的安装及配置—— 零、系统镜像的下载 \u0026amp; 安装介质的制作 \u0026amp; BIOS 的设置 点击此处下载系统镜像并校验SHA256镜像的完整性。校验无误后，使用Ventoy制作安装介质。（如果是首次使用Ventoy，请点击此处查看使用方法）然后进入BIOS，将安全启动和快速启动关闭并将安装介质（如U盘）设置为第一启动项，并按F10保存退出。进入ArchLinux安装盘即可。 如果设备中包含NVIDIA显卡，请在进入liveCD的GRUB引导界面时按下键盘上的字母E,进入GRUB的编辑模式。在其linux行的末尾加入nouveau.modeset=0来屏蔽NVIDIA开源驱动。否则会出现加载nouveau模块报错和其他模块无法加载的问题。编辑完成后按CTRL+X退出。 如有疑问请参考Wiki以下章节： 获取安装映像 准备安装映像 启动到Live环境 一、验证引导模式 \u0026amp; 联网 \u0026amp; 换源： $ ls /sys/firmware/efi/efivars #验证引导模式（如果目录不存在，即为Legacy BIOS引导模式；反之，请使用隔壁以UEFI为例的教程） $ iwctl #运行iwctl（如果是台式机，可直接跳到ping -c 5 archlinux.org这一步） [iwctl]# device list #列出WiFi设备（一般为wlan0；这里以wlan0为例） [iwctl]# station wlan0 scan #扫描网络 [iwctl]# station wlan0 get-networks #列出可用网络 [iwctl]# station wlan0 connect X #连接到X（X改成你可用的WiFi名称并在回车后输入密码且确保密码输入正确） [iwctl]# exit #退出iwctl $ ping -c 5 archlinux.org #检查网络连接（如果有输出内容，即为联网成功） $ reflector --country China --save /etc/pacman.d/mirrorlist #换源（注意大小写） $ systemctl stop reflector #关闭reflector服务 $ vim /etc/pacman.d/mirrorlist #编辑/etc/pacman.d/mirrorlist文件，保留自己需要的源（一般推荐使用中科大源或清华源） $ timedatectl status #检查服务状态 如有疑问请参考Wiki以下章节： 验证引导模式 连接到因特网 选择镜像和reflector 更新系统时间 二、分区 \u0026amp; 挂载： 以下分区和挂载相关步骤是以SATA协议硬盘为例。 $ lsblk #查看硬盘名称（一般为sda；这里以sda为例） $ fdisk /dev/sda #使用fdisk对sda进行相关操作 #步骤如下： Command (m for help): o #输入o新建MBR分区表 Command (m for help): n #输入n创建新分区 Select (default p): p #这里按Enter键创建主分区（如果想创建逻辑扩展分区请输入e） Partition number (1-4, default 1): #这里按Enter键 First sector (2048-X, default 2048): #这里按Enter键 Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-X, default X): +10G #输入+10G Command (m for help): t #输入t更改分区类型 Hex code or alias (type L to list all): 82 #输入82，创建swap分区 Command (m for help): n #输入n创建新分区，然后一直按Enter键，把剩下的空间全部分配给/分区 Command (m for help): w #输入w写入 $ lsblk #查看分区结构是否正确 $ mkfs.btrfs -L ARCH /dev/sda2 #将sda2格式化为btrfs，创建标签为ARCH（注意大小写） $ mkswap -L SWAP /dev/sda1 #将sda1设置为swap，创建标签为SWAP（注意大小写） $ mount -t btrfs -o compress=zstd /dev/sda2 /mnt #将sda2挂载到/mnt目录并创建btrfs子卷 #步骤如下： btrfs subvolume create /mnt/@ #创建/目录的btrfs子卷 btrfs subvolume create /mnt/@root #创建/root目录的btrfs子卷 btrfs subvolume create /mnt/@home #创建/home目录的btrfs子卷 umount /mnt #卸载/mnt目录 mount -t btrfs -o subvol=/@,compress=zstd /dev/sda2 /mnt #挂载/目录的btrfs子卷到/mnt目录 mkdir /mnt/root #创建/mnt/root目录 mount -t btrfs -o subvol=/@root,compress=zstd /dev/sda2 /mnt/root #挂载/root目录的btrfs子卷到/mnt/root目录 mkdir /mnt/home #创建/mnt/home目录 mount -t btrfs -o subvol=/@home,compress=zstd /dev/sda2 /mnt/home #挂载/home目录的btrfs子卷到/mnt/home目录 $ swapon /dev/sda1 #激活sda1为交换分区 $ lsblk -f #查看相应分区的文件系统及挂载是否正确 在pacstrap之前，请再检查一下/etc/pacman.d/mirrorlist文件。例如：cat /etc/pacman.d/mirrorlist或vim /etc/pacman.d/mirrorlist。总之，检查一下这个文件即可。 如有疑问请参考Wiki以下章节： 建立硬盘分区 格式化分区 挂载分区 三、安装基本的包 \u0026amp; 初步配置： $ pacstrap -K /mnt linux linux-firmware sof-firmware linux-headers base base-devel vim bash-completion networkmanager dosfstools btrfs-progs exfatprogs ntfs-3g pacman-contrib #安装必要的软件包（注意大小写） $ genfstab -U /mnt \u003e /mnt/etc/fstab #生成/mnt/etc/fstab文件（注意大小写） $ cat /mnt/etc/fstab #查看/mnt/etc/fstab文件是否正确（如果不正确，请重新分区、挂载、pacstrap） $ arch-chroot /mnt #进入目标系统 $ pacman -S grub amd-ucode intel-ucode #安装grub \u0026 amd-ucode或intel-ucode（AMD的CPU安装amd-ucode，intel的CPU安装intel-ucode） $ lsblk #查看硬盘名称 $ grub-install /dev/sda #将grub写入sda $ vim /etc/default/grub #编辑/etc/default/grub文件，将GRUB_CMDLINE_LINUX=\"\"修改为GRUB_CMDLINE_LINUX=\" nouveau.modeset=0\"（没有nvidia显卡可跳过） $ grub-mkconfig -o /boot/grub/grub.cfg #生成/boot/grub/grub.cfg文件 $ systemctl enable NetworkManager #开机自启NetworkManager服务（注意大小写） $ passwd root #设置root密码（在回车后输入密码且密码不显示，输入完成后回车，再输入一遍且密码同样不显示，输入完成后再回车，即可完成密码设置） 如有疑问请参考Wiki以下章节： 安装必需的软件包 Fstab Chroot 安装引导程序 Root密码 四、退出目标系统： $ exit #退出目标系统 $ umount -R /mnt #卸载/mnt目录 $ reboot #重启并登陆root 五、系统配置： $ nmtui #运行nmtui（根据图形界面提示进行联网操作即可；台式机可跳过） $ ping -c 5 archlinux.org #检查网络连接（如果有输出内容，即为联网成功） $ vim /etc/hostname #创建/etc/hostname文件，加入以下内容： arch #将主机名设置为arch $ vim /etc/hosts #编辑/etc/hosts文件，在末尾加入以下内容： 127.0.0.1 localhost ::1 localhost 127.0.1.1 arch.localdomain arch #配置hosts文件，映射IP地址和主机名 $ ln -sf /usr/share/zon","date":"2023-01-06","heading":"一、验证引导模式 \u0026amp; 联网 \u0026amp; 换源：","objectID":"/posts/how-to-install-archbiosxiaoice/:1:0","tags":["Guides","Arch Linux"],"title":"Arch Linux安装教程(以Legacy BIOS为例)","uri":"/posts/how-to-install-archbiosxiaoice/#一验证引导模式--联网--换源"},{"categories":"Arch Linux","collections":null,"content":"1.Arch Linux \u0026amp; KDE 的安装及配置—— 零、系统镜像的下载 \u0026amp; 安装介质的制作 \u0026amp; BIOS 的设置 点击此处下载系统镜像并校验SHA256镜像的完整性。校验无误后，使用Ventoy制作安装介质。（如果是首次使用Ventoy，请点击此处查看使用方法）然后进入BIOS，将安全启动和快速启动关闭并将安装介质（如U盘）设置为第一启动项，并按F10保存退出。进入ArchLinux安装盘即可。 如果设备中包含NVIDIA显卡，请在进入liveCD的GRUB引导界面时按下键盘上的字母E,进入GRUB的编辑模式。在其linux行的末尾加入nouveau.modeset=0来屏蔽NVIDIA开源驱动。否则会出现加载nouveau模块报错和其他模块无法加载的问题。编辑完成后按CTRL+X退出。 如有疑问请参考Wiki以下章节： 获取安装映像 准备安装映像 启动到Live环境 一、验证引导模式 \u0026amp; 联网 \u0026amp; 换源： $ ls /sys/firmware/efi/efivars #验证引导模式（如果目录不存在，即为Legacy BIOS引导模式；反之，请使用隔壁以UEFI为例的教程） $ iwctl #运行iwctl（如果是台式机，可直接跳到ping -c 5 archlinux.org这一步） [iwctl]# device list #列出WiFi设备（一般为wlan0；这里以wlan0为例） [iwctl]# station wlan0 scan #扫描网络 [iwctl]# station wlan0 get-networks #列出可用网络 [iwctl]# station wlan0 connect X #连接到X（X改成你可用的WiFi名称并在回车后输入密码且确保密码输入正确） [iwctl]# exit #退出iwctl $ ping -c 5 archlinux.org #检查网络连接（如果有输出内容，即为联网成功） $ reflector --country China --save /etc/pacman.d/mirrorlist #换源（注意大小写） $ systemctl stop reflector #关闭reflector服务 $ vim /etc/pacman.d/mirrorlist #编辑/etc/pacman.d/mirrorlist文件，保留自己需要的源（一般推荐使用中科大源或清华源） $ timedatectl status #检查服务状态 如有疑问请参考Wiki以下章节： 验证引导模式 连接到因特网 选择镜像和reflector 更新系统时间 二、分区 \u0026amp; 挂载： 以下分区和挂载相关步骤是以SATA协议硬盘为例。 $ lsblk #查看硬盘名称（一般为sda；这里以sda为例） $ fdisk /dev/sda #使用fdisk对sda进行相关操作 #步骤如下： Command (m for help): o #输入o新建MBR分区表 Command (m for help): n #输入n创建新分区 Select (default p): p #这里按Enter键创建主分区（如果想创建逻辑扩展分区请输入e） Partition number (1-4, default 1): #这里按Enter键 First sector (2048-X, default 2048): #这里按Enter键 Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-X, default X): +10G #输入+10G Command (m for help): t #输入t更改分区类型 Hex code or alias (type L to list all): 82 #输入82，创建swap分区 Command (m for help): n #输入n创建新分区，然后一直按Enter键，把剩下的空间全部分配给/分区 Command (m for help): w #输入w写入 $ lsblk #查看分区结构是否正确 $ mkfs.btrfs -L ARCH /dev/sda2 #将sda2格式化为btrfs，创建标签为ARCH（注意大小写） $ mkswap -L SWAP /dev/sda1 #将sda1设置为swap，创建标签为SWAP（注意大小写） $ mount -t btrfs -o compress=zstd /dev/sda2 /mnt #将sda2挂载到/mnt目录并创建btrfs子卷 #步骤如下： btrfs subvolume create /mnt/@ #创建/目录的btrfs子卷 btrfs subvolume create /mnt/@root #创建/root目录的btrfs子卷 btrfs subvolume create /mnt/@home #创建/home目录的btrfs子卷 umount /mnt #卸载/mnt目录 mount -t btrfs -o subvol=/@,compress=zstd /dev/sda2 /mnt #挂载/目录的btrfs子卷到/mnt目录 mkdir /mnt/root #创建/mnt/root目录 mount -t btrfs -o subvol=/@root,compress=zstd /dev/sda2 /mnt/root #挂载/root目录的btrfs子卷到/mnt/root目录 mkdir /mnt/home #创建/mnt/home目录 mount -t btrfs -o subvol=/@home,compress=zstd /dev/sda2 /mnt/home #挂载/home目录的btrfs子卷到/mnt/home目录 $ swapon /dev/sda1 #激活sda1为交换分区 $ lsblk -f #查看相应分区的文件系统及挂载是否正确 在pacstrap之前，请再检查一下/etc/pacman.d/mirrorlist文件。例如：cat /etc/pacman.d/mirrorlist或vim /etc/pacman.d/mirrorlist。总之，检查一下这个文件即可。 如有疑问请参考Wiki以下章节： 建立硬盘分区 格式化分区 挂载分区 三、安装基本的包 \u0026amp; 初步配置： $ pacstrap -K /mnt linux linux-firmware sof-firmware linux-headers base base-devel vim bash-completion networkmanager dosfstools btrfs-progs exfatprogs ntfs-3g pacman-contrib #安装必要的软件包（注意大小写） $ genfstab -U /mnt \u003e /mnt/etc/fstab #生成/mnt/etc/fstab文件（注意大小写） $ cat /mnt/etc/fstab #查看/mnt/etc/fstab文件是否正确（如果不正确，请重新分区、挂载、pacstrap） $ arch-chroot /mnt #进入目标系统 $ pacman -S grub amd-ucode intel-ucode #安装grub \u0026 amd-ucode或intel-ucode（AMD的CPU安装amd-ucode，intel的CPU安装intel-ucode） $ lsblk #查看硬盘名称 $ grub-install /dev/sda #将grub写入sda $ vim /etc/default/grub #编辑/etc/default/grub文件，将GRUB_CMDLINE_LINUX=\"\"修改为GRUB_CMDLINE_LINUX=\" nouveau.modeset=0\"（没有nvidia显卡可跳过） $ grub-mkconfig -o /boot/grub/grub.cfg #生成/boot/grub/grub.cfg文件 $ systemctl enable NetworkManager #开机自启NetworkManager服务（注意大小写） $ passwd root #设置root密码（在回车后输入密码且密码不显示，输入完成后回车，再输入一遍且密码同样不显示，输入完成后再回车，即可完成密码设置） 如有疑问请参考Wiki以下章节： 安装必需的软件包 Fstab Chroot 安装引导程序 Root密码 四、退出目标系统： $ exit #退出目标系统 $ umount -R /mnt #卸载/mnt目录 $ reboot #重启并登陆root 五、系统配置： $ nmtui #运行nmtui（根据图形界面提示进行联网操作即可；台式机可跳过） $ ping -c 5 archlinux.org #检查网络连接（如果有输出内容，即为联网成功） $ vim /etc/hostname #创建/etc/hostname文件，加入以下内容： arch #将主机名设置为arch $ vim /etc/hosts #编辑/etc/hosts文件，在末尾加入以下内容： 127.0.0.1 localhost ::1 localhost 127.0.1.1 arch.localdomain arch #配置hosts文件，映射IP地址和主机名 $ ln -sf /usr/share/zon","date":"2023-01-06","heading":"二、分区 \u0026amp; 挂载：","objectID":"/posts/how-to-install-archbiosxiaoice/:1:0","tags":["Guides","Arch Linux"],"title":"Arch Linux安装教程(以Legacy BIOS为例)","uri":"/posts/how-to-install-archbiosxiaoice/#二分区--挂载"},{"categories":"Arch Linux","collections":null,"content":"1.Arch Linux \u0026amp; KDE 的安装及配置—— 零、系统镜像的下载 \u0026amp; 安装介质的制作 \u0026amp; BIOS 的设置 点击此处下载系统镜像并校验SHA256镜像的完整性。校验无误后，使用Ventoy制作安装介质。（如果是首次使用Ventoy，请点击此处查看使用方法）然后进入BIOS，将安全启动和快速启动关闭并将安装介质（如U盘）设置为第一启动项，并按F10保存退出。进入ArchLinux安装盘即可。 如果设备中包含NVIDIA显卡，请在进入liveCD的GRUB引导界面时按下键盘上的字母E,进入GRUB的编辑模式。在其linux行的末尾加入nouveau.modeset=0来屏蔽NVIDIA开源驱动。否则会出现加载nouveau模块报错和其他模块无法加载的问题。编辑完成后按CTRL+X退出。 如有疑问请参考Wiki以下章节： 获取安装映像 准备安装映像 启动到Live环境 一、验证引导模式 \u0026amp; 联网 \u0026amp; 换源： $ ls /sys/firmware/efi/efivars #验证引导模式（如果目录不存在，即为Legacy BIOS引导模式；反之，请使用隔壁以UEFI为例的教程） $ iwctl #运行iwctl（如果是台式机，可直接跳到ping -c 5 archlinux.org这一步） [iwctl]# device list #列出WiFi设备（一般为wlan0；这里以wlan0为例） [iwctl]# station wlan0 scan #扫描网络 [iwctl]# station wlan0 get-networks #列出可用网络 [iwctl]# station wlan0 connect X #连接到X（X改成你可用的WiFi名称并在回车后输入密码且确保密码输入正确） [iwctl]# exit #退出iwctl $ ping -c 5 archlinux.org #检查网络连接（如果有输出内容，即为联网成功） $ reflector --country China --save /etc/pacman.d/mirrorlist #换源（注意大小写） $ systemctl stop reflector #关闭reflector服务 $ vim /etc/pacman.d/mirrorlist #编辑/etc/pacman.d/mirrorlist文件，保留自己需要的源（一般推荐使用中科大源或清华源） $ timedatectl status #检查服务状态 如有疑问请参考Wiki以下章节： 验证引导模式 连接到因特网 选择镜像和reflector 更新系统时间 二、分区 \u0026amp; 挂载： 以下分区和挂载相关步骤是以SATA协议硬盘为例。 $ lsblk #查看硬盘名称（一般为sda；这里以sda为例） $ fdisk /dev/sda #使用fdisk对sda进行相关操作 #步骤如下： Command (m for help): o #输入o新建MBR分区表 Command (m for help): n #输入n创建新分区 Select (default p): p #这里按Enter键创建主分区（如果想创建逻辑扩展分区请输入e） Partition number (1-4, default 1): #这里按Enter键 First sector (2048-X, default 2048): #这里按Enter键 Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-X, default X): +10G #输入+10G Command (m for help): t #输入t更改分区类型 Hex code or alias (type L to list all): 82 #输入82，创建swap分区 Command (m for help): n #输入n创建新分区，然后一直按Enter键，把剩下的空间全部分配给/分区 Command (m for help): w #输入w写入 $ lsblk #查看分区结构是否正确 $ mkfs.btrfs -L ARCH /dev/sda2 #将sda2格式化为btrfs，创建标签为ARCH（注意大小写） $ mkswap -L SWAP /dev/sda1 #将sda1设置为swap，创建标签为SWAP（注意大小写） $ mount -t btrfs -o compress=zstd /dev/sda2 /mnt #将sda2挂载到/mnt目录并创建btrfs子卷 #步骤如下： btrfs subvolume create /mnt/@ #创建/目录的btrfs子卷 btrfs subvolume create /mnt/@root #创建/root目录的btrfs子卷 btrfs subvolume create /mnt/@home #创建/home目录的btrfs子卷 umount /mnt #卸载/mnt目录 mount -t btrfs -o subvol=/@,compress=zstd /dev/sda2 /mnt #挂载/目录的btrfs子卷到/mnt目录 mkdir /mnt/root #创建/mnt/root目录 mount -t btrfs -o subvol=/@root,compress=zstd /dev/sda2 /mnt/root #挂载/root目录的btrfs子卷到/mnt/root目录 mkdir /mnt/home #创建/mnt/home目录 mount -t btrfs -o subvol=/@home,compress=zstd /dev/sda2 /mnt/home #挂载/home目录的btrfs子卷到/mnt/home目录 $ swapon /dev/sda1 #激活sda1为交换分区 $ lsblk -f #查看相应分区的文件系统及挂载是否正确 在pacstrap之前，请再检查一下/etc/pacman.d/mirrorlist文件。例如：cat /etc/pacman.d/mirrorlist或vim /etc/pacman.d/mirrorlist。总之，检查一下这个文件即可。 如有疑问请参考Wiki以下章节： 建立硬盘分区 格式化分区 挂载分区 三、安装基本的包 \u0026amp; 初步配置： $ pacstrap -K /mnt linux linux-firmware sof-firmware linux-headers base base-devel vim bash-completion networkmanager dosfstools btrfs-progs exfatprogs ntfs-3g pacman-contrib #安装必要的软件包（注意大小写） $ genfstab -U /mnt \u003e /mnt/etc/fstab #生成/mnt/etc/fstab文件（注意大小写） $ cat /mnt/etc/fstab #查看/mnt/etc/fstab文件是否正确（如果不正确，请重新分区、挂载、pacstrap） $ arch-chroot /mnt #进入目标系统 $ pacman -S grub amd-ucode intel-ucode #安装grub \u0026 amd-ucode或intel-ucode（AMD的CPU安装amd-ucode，intel的CPU安装intel-ucode） $ lsblk #查看硬盘名称 $ grub-install /dev/sda #将grub写入sda $ vim /etc/default/grub #编辑/etc/default/grub文件，将GRUB_CMDLINE_LINUX=\"\"修改为GRUB_CMDLINE_LINUX=\" nouveau.modeset=0\"（没有nvidia显卡可跳过） $ grub-mkconfig -o /boot/grub/grub.cfg #生成/boot/grub/grub.cfg文件 $ systemctl enable NetworkManager #开机自启NetworkManager服务（注意大小写） $ passwd root #设置root密码（在回车后输入密码且密码不显示，输入完成后回车，再输入一遍且密码同样不显示，输入完成后再回车，即可完成密码设置） 如有疑问请参考Wiki以下章节： 安装必需的软件包 Fstab Chroot 安装引导程序 Root密码 四、退出目标系统： $ exit #退出目标系统 $ umount -R /mnt #卸载/mnt目录 $ reboot #重启并登陆root 五、系统配置： $ nmtui #运行nmtui（根据图形界面提示进行联网操作即可；台式机可跳过） $ ping -c 5 archlinux.org #检查网络连接（如果有输出内容，即为联网成功） $ vim /etc/hostname #创建/etc/hostname文件，加入以下内容： arch #将主机名设置为arch $ vim /etc/hosts #编辑/etc/hosts文件，在末尾加入以下内容： 127.0.0.1 localhost ::1 localhost 127.0.1.1 arch.localdomain arch #配置hosts文件，映射IP地址和主机名 $ ln -sf /usr/share/zon","date":"2023-01-06","heading":"三、安装基本的包 \u0026amp; 初步配置：","objectID":"/posts/how-to-install-archbiosxiaoice/:1:0","tags":["Guides","Arch Linux"],"title":"Arch Linux安装教程(以Legacy BIOS为例)","uri":"/posts/how-to-install-archbiosxiaoice/#三安装基本的包--初步配置"},{"categories":"Arch Linux","collections":null,"content":"1.Arch Linux \u0026amp; KDE 的安装及配置—— 零、系统镜像的下载 \u0026amp; 安装介质的制作 \u0026amp; BIOS 的设置 点击此处下载系统镜像并校验SHA256镜像的完整性。校验无误后，使用Ventoy制作安装介质。（如果是首次使用Ventoy，请点击此处查看使用方法）然后进入BIOS，将安全启动和快速启动关闭并将安装介质（如U盘）设置为第一启动项，并按F10保存退出。进入ArchLinux安装盘即可。 如果设备中包含NVIDIA显卡，请在进入liveCD的GRUB引导界面时按下键盘上的字母E,进入GRUB的编辑模式。在其linux行的末尾加入nouveau.modeset=0来屏蔽NVIDIA开源驱动。否则会出现加载nouveau模块报错和其他模块无法加载的问题。编辑完成后按CTRL+X退出。 如有疑问请参考Wiki以下章节： 获取安装映像 准备安装映像 启动到Live环境 一、验证引导模式 \u0026amp; 联网 \u0026amp; 换源： $ ls /sys/firmware/efi/efivars #验证引导模式（如果目录不存在，即为Legacy BIOS引导模式；反之，请使用隔壁以UEFI为例的教程） $ iwctl #运行iwctl（如果是台式机，可直接跳到ping -c 5 archlinux.org这一步） [iwctl]# device list #列出WiFi设备（一般为wlan0；这里以wlan0为例） [iwctl]# station wlan0 scan #扫描网络 [iwctl]# station wlan0 get-networks #列出可用网络 [iwctl]# station wlan0 connect X #连接到X（X改成你可用的WiFi名称并在回车后输入密码且确保密码输入正确） [iwctl]# exit #退出iwctl $ ping -c 5 archlinux.org #检查网络连接（如果有输出内容，即为联网成功） $ reflector --country China --save /etc/pacman.d/mirrorlist #换源（注意大小写） $ systemctl stop reflector #关闭reflector服务 $ vim /etc/pacman.d/mirrorlist #编辑/etc/pacman.d/mirrorlist文件，保留自己需要的源（一般推荐使用中科大源或清华源） $ timedatectl status #检查服务状态 如有疑问请参考Wiki以下章节： 验证引导模式 连接到因特网 选择镜像和reflector 更新系统时间 二、分区 \u0026amp; 挂载： 以下分区和挂载相关步骤是以SATA协议硬盘为例。 $ lsblk #查看硬盘名称（一般为sda；这里以sda为例） $ fdisk /dev/sda #使用fdisk对sda进行相关操作 #步骤如下： Command (m for help): o #输入o新建MBR分区表 Command (m for help): n #输入n创建新分区 Select (default p): p #这里按Enter键创建主分区（如果想创建逻辑扩展分区请输入e） Partition number (1-4, default 1): #这里按Enter键 First sector (2048-X, default 2048): #这里按Enter键 Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-X, default X): +10G #输入+10G Command (m for help): t #输入t更改分区类型 Hex code or alias (type L to list all): 82 #输入82，创建swap分区 Command (m for help): n #输入n创建新分区，然后一直按Enter键，把剩下的空间全部分配给/分区 Command (m for help): w #输入w写入 $ lsblk #查看分区结构是否正确 $ mkfs.btrfs -L ARCH /dev/sda2 #将sda2格式化为btrfs，创建标签为ARCH（注意大小写） $ mkswap -L SWAP /dev/sda1 #将sda1设置为swap，创建标签为SWAP（注意大小写） $ mount -t btrfs -o compress=zstd /dev/sda2 /mnt #将sda2挂载到/mnt目录并创建btrfs子卷 #步骤如下： btrfs subvolume create /mnt/@ #创建/目录的btrfs子卷 btrfs subvolume create /mnt/@root #创建/root目录的btrfs子卷 btrfs subvolume create /mnt/@home #创建/home目录的btrfs子卷 umount /mnt #卸载/mnt目录 mount -t btrfs -o subvol=/@,compress=zstd /dev/sda2 /mnt #挂载/目录的btrfs子卷到/mnt目录 mkdir /mnt/root #创建/mnt/root目录 mount -t btrfs -o subvol=/@root,compress=zstd /dev/sda2 /mnt/root #挂载/root目录的btrfs子卷到/mnt/root目录 mkdir /mnt/home #创建/mnt/home目录 mount -t btrfs -o subvol=/@home,compress=zstd /dev/sda2 /mnt/home #挂载/home目录的btrfs子卷到/mnt/home目录 $ swapon /dev/sda1 #激活sda1为交换分区 $ lsblk -f #查看相应分区的文件系统及挂载是否正确 在pacstrap之前，请再检查一下/etc/pacman.d/mirrorlist文件。例如：cat /etc/pacman.d/mirrorlist或vim /etc/pacman.d/mirrorlist。总之，检查一下这个文件即可。 如有疑问请参考Wiki以下章节： 建立硬盘分区 格式化分区 挂载分区 三、安装基本的包 \u0026amp; 初步配置： $ pacstrap -K /mnt linux linux-firmware sof-firmware linux-headers base base-devel vim bash-completion networkmanager dosfstools btrfs-progs exfatprogs ntfs-3g pacman-contrib #安装必要的软件包（注意大小写） $ genfstab -U /mnt \u003e /mnt/etc/fstab #生成/mnt/etc/fstab文件（注意大小写） $ cat /mnt/etc/fstab #查看/mnt/etc/fstab文件是否正确（如果不正确，请重新分区、挂载、pacstrap） $ arch-chroot /mnt #进入目标系统 $ pacman -S grub amd-ucode intel-ucode #安装grub \u0026 amd-ucode或intel-ucode（AMD的CPU安装amd-ucode，intel的CPU安装intel-ucode） $ lsblk #查看硬盘名称 $ grub-install /dev/sda #将grub写入sda $ vim /etc/default/grub #编辑/etc/default/grub文件，将GRUB_CMDLINE_LINUX=\"\"修改为GRUB_CMDLINE_LINUX=\" nouveau.modeset=0\"（没有nvidia显卡可跳过） $ grub-mkconfig -o /boot/grub/grub.cfg #生成/boot/grub/grub.cfg文件 $ systemctl enable NetworkManager #开机自启NetworkManager服务（注意大小写） $ passwd root #设置root密码（在回车后输入密码且密码不显示，输入完成后回车，再输入一遍且密码同样不显示，输入完成后再回车，即可完成密码设置） 如有疑问请参考Wiki以下章节： 安装必需的软件包 Fstab Chroot 安装引导程序 Root密码 四、退出目标系统： $ exit #退出目标系统 $ umount -R /mnt #卸载/mnt目录 $ reboot #重启并登陆root 五、系统配置： $ nmtui #运行nmtui（根据图形界面提示进行联网操作即可；台式机可跳过） $ ping -c 5 archlinux.org #检查网络连接（如果有输出内容，即为联网成功） $ vim /etc/hostname #创建/etc/hostname文件，加入以下内容： arch #将主机名设置为arch $ vim /etc/hosts #编辑/etc/hosts文件，在末尾加入以下内容： 127.0.0.1 localhost ::1 localhost 127.0.1.1 arch.localdomain arch #配置hosts文件，映射IP地址和主机名 $ ln -sf /usr/share/zon","date":"2023-01-06","heading":"四、退出目标系统：","objectID":"/posts/how-to-install-archbiosxiaoice/:1:0","tags":["Guides","Arch Linux"],"title":"Arch Linux安装教程(以Legacy BIOS为例)","uri":"/posts/how-to-install-archbiosxiaoice/#四退出目标系统"},{"categories":"Arch Linux","collections":null,"content":"1.Arch Linux \u0026amp; KDE 的安装及配置—— 零、系统镜像的下载 \u0026amp; 安装介质的制作 \u0026amp; BIOS 的设置 点击此处下载系统镜像并校验SHA256镜像的完整性。校验无误后，使用Ventoy制作安装介质。（如果是首次使用Ventoy，请点击此处查看使用方法）然后进入BIOS，将安全启动和快速启动关闭并将安装介质（如U盘）设置为第一启动项，并按F10保存退出。进入ArchLinux安装盘即可。 如果设备中包含NVIDIA显卡，请在进入liveCD的GRUB引导界面时按下键盘上的字母E,进入GRUB的编辑模式。在其linux行的末尾加入nouveau.modeset=0来屏蔽NVIDIA开源驱动。否则会出现加载nouveau模块报错和其他模块无法加载的问题。编辑完成后按CTRL+X退出。 如有疑问请参考Wiki以下章节： 获取安装映像 准备安装映像 启动到Live环境 一、验证引导模式 \u0026amp; 联网 \u0026amp; 换源： $ ls /sys/firmware/efi/efivars #验证引导模式（如果目录不存在，即为Legacy BIOS引导模式；反之，请使用隔壁以UEFI为例的教程） $ iwctl #运行iwctl（如果是台式机，可直接跳到ping -c 5 archlinux.org这一步） [iwctl]# device list #列出WiFi设备（一般为wlan0；这里以wlan0为例） [iwctl]# station wlan0 scan #扫描网络 [iwctl]# station wlan0 get-networks #列出可用网络 [iwctl]# station wlan0 connect X #连接到X（X改成你可用的WiFi名称并在回车后输入密码且确保密码输入正确） [iwctl]# exit #退出iwctl $ ping -c 5 archlinux.org #检查网络连接（如果有输出内容，即为联网成功） $ reflector --country China --save /etc/pacman.d/mirrorlist #换源（注意大小写） $ systemctl stop reflector #关闭reflector服务 $ vim /etc/pacman.d/mirrorlist #编辑/etc/pacman.d/mirrorlist文件，保留自己需要的源（一般推荐使用中科大源或清华源） $ timedatectl status #检查服务状态 如有疑问请参考Wiki以下章节： 验证引导模式 连接到因特网 选择镜像和reflector 更新系统时间 二、分区 \u0026amp; 挂载： 以下分区和挂载相关步骤是以SATA协议硬盘为例。 $ lsblk #查看硬盘名称（一般为sda；这里以sda为例） $ fdisk /dev/sda #使用fdisk对sda进行相关操作 #步骤如下： Command (m for help): o #输入o新建MBR分区表 Command (m for help): n #输入n创建新分区 Select (default p): p #这里按Enter键创建主分区（如果想创建逻辑扩展分区请输入e） Partition number (1-4, default 1): #这里按Enter键 First sector (2048-X, default 2048): #这里按Enter键 Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-X, default X): +10G #输入+10G Command (m for help): t #输入t更改分区类型 Hex code or alias (type L to list all): 82 #输入82，创建swap分区 Command (m for help): n #输入n创建新分区，然后一直按Enter键，把剩下的空间全部分配给/分区 Command (m for help): w #输入w写入 $ lsblk #查看分区结构是否正确 $ mkfs.btrfs -L ARCH /dev/sda2 #将sda2格式化为btrfs，创建标签为ARCH（注意大小写） $ mkswap -L SWAP /dev/sda1 #将sda1设置为swap，创建标签为SWAP（注意大小写） $ mount -t btrfs -o compress=zstd /dev/sda2 /mnt #将sda2挂载到/mnt目录并创建btrfs子卷 #步骤如下： btrfs subvolume create /mnt/@ #创建/目录的btrfs子卷 btrfs subvolume create /mnt/@root #创建/root目录的btrfs子卷 btrfs subvolume create /mnt/@home #创建/home目录的btrfs子卷 umount /mnt #卸载/mnt目录 mount -t btrfs -o subvol=/@,compress=zstd /dev/sda2 /mnt #挂载/目录的btrfs子卷到/mnt目录 mkdir /mnt/root #创建/mnt/root目录 mount -t btrfs -o subvol=/@root,compress=zstd /dev/sda2 /mnt/root #挂载/root目录的btrfs子卷到/mnt/root目录 mkdir /mnt/home #创建/mnt/home目录 mount -t btrfs -o subvol=/@home,compress=zstd /dev/sda2 /mnt/home #挂载/home目录的btrfs子卷到/mnt/home目录 $ swapon /dev/sda1 #激活sda1为交换分区 $ lsblk -f #查看相应分区的文件系统及挂载是否正确 在pacstrap之前，请再检查一下/etc/pacman.d/mirrorlist文件。例如：cat /etc/pacman.d/mirrorlist或vim /etc/pacman.d/mirrorlist。总之，检查一下这个文件即可。 如有疑问请参考Wiki以下章节： 建立硬盘分区 格式化分区 挂载分区 三、安装基本的包 \u0026amp; 初步配置： $ pacstrap -K /mnt linux linux-firmware sof-firmware linux-headers base base-devel vim bash-completion networkmanager dosfstools btrfs-progs exfatprogs ntfs-3g pacman-contrib #安装必要的软件包（注意大小写） $ genfstab -U /mnt \u003e /mnt/etc/fstab #生成/mnt/etc/fstab文件（注意大小写） $ cat /mnt/etc/fstab #查看/mnt/etc/fstab文件是否正确（如果不正确，请重新分区、挂载、pacstrap） $ arch-chroot /mnt #进入目标系统 $ pacman -S grub amd-ucode intel-ucode #安装grub \u0026 amd-ucode或intel-ucode（AMD的CPU安装amd-ucode，intel的CPU安装intel-ucode） $ lsblk #查看硬盘名称 $ grub-install /dev/sda #将grub写入sda $ vim /etc/default/grub #编辑/etc/default/grub文件，将GRUB_CMDLINE_LINUX=\"\"修改为GRUB_CMDLINE_LINUX=\" nouveau.modeset=0\"（没有nvidia显卡可跳过） $ grub-mkconfig -o /boot/grub/grub.cfg #生成/boot/grub/grub.cfg文件 $ systemctl enable NetworkManager #开机自启NetworkManager服务（注意大小写） $ passwd root #设置root密码（在回车后输入密码且密码不显示，输入完成后回车，再输入一遍且密码同样不显示，输入完成后再回车，即可完成密码设置） 如有疑问请参考Wiki以下章节： 安装必需的软件包 Fstab Chroot 安装引导程序 Root密码 四、退出目标系统： $ exit #退出目标系统 $ umount -R /mnt #卸载/mnt目录 $ reboot #重启并登陆root 五、系统配置： $ nmtui #运行nmtui（根据图形界面提示进行联网操作即可；台式机可跳过） $ ping -c 5 archlinux.org #检查网络连接（如果有输出内容，即为联网成功） $ vim /etc/hostname #创建/etc/hostname文件，加入以下内容： arch #将主机名设置为arch $ vim /etc/hosts #编辑/etc/hosts文件，在末尾加入以下内容： 127.0.0.1 localhost ::1 localhost 127.0.1.1 arch.localdomain arch #配置hosts文件，映射IP地址和主机名 $ ln -sf /usr/share/zon","date":"2023-01-06","heading":"五、系统配置：","objectID":"/posts/how-to-install-archbiosxiaoice/:1:0","tags":["Guides","Arch Linux"],"title":"Arch Linux安装教程(以Legacy BIOS为例)","uri":"/posts/how-to-install-archbiosxiaoice/#五系统配置"},{"categories":"Arch Linux","collections":null,"content":"1.Arch Linux \u0026amp; KDE 的安装及配置—— 零、系统镜像的下载 \u0026amp; 安装介质的制作 \u0026amp; BIOS 的设置 点击此处下载系统镜像并校验SHA256镜像的完整性。校验无误后，使用Ventoy制作安装介质。（如果是首次使用Ventoy，请点击此处查看使用方法）然后进入BIOS，将安全启动和快速启动关闭并将安装介质（如U盘）设置为第一启动项，并按F10保存退出。进入ArchLinux安装盘即可。 如果设备中包含NVIDIA显卡，请在进入liveCD的GRUB引导界面时按下键盘上的字母E,进入GRUB的编辑模式。在其linux行的末尾加入nouveau.modeset=0来屏蔽NVIDIA开源驱动。否则会出现加载nouveau模块报错和其他模块无法加载的问题。编辑完成后按CTRL+X退出。 如有疑问请参考Wiki以下章节： 获取安装映像 准备安装映像 启动到Live环境 一、验证引导模式 \u0026amp; 联网 \u0026amp; 换源： $ ls /sys/firmware/efi/efivars #验证引导模式（如果目录不存在，即为Legacy BIOS引导模式；反之，请使用隔壁以UEFI为例的教程） $ iwctl #运行iwctl（如果是台式机，可直接跳到ping -c 5 archlinux.org这一步） [iwctl]# device list #列出WiFi设备（一般为wlan0；这里以wlan0为例） [iwctl]# station wlan0 scan #扫描网络 [iwctl]# station wlan0 get-networks #列出可用网络 [iwctl]# station wlan0 connect X #连接到X（X改成你可用的WiFi名称并在回车后输入密码且确保密码输入正确） [iwctl]# exit #退出iwctl $ ping -c 5 archlinux.org #检查网络连接（如果有输出内容，即为联网成功） $ reflector --country China --save /etc/pacman.d/mirrorlist #换源（注意大小写） $ systemctl stop reflector #关闭reflector服务 $ vim /etc/pacman.d/mirrorlist #编辑/etc/pacman.d/mirrorlist文件，保留自己需要的源（一般推荐使用中科大源或清华源） $ timedatectl status #检查服务状态 如有疑问请参考Wiki以下章节： 验证引导模式 连接到因特网 选择镜像和reflector 更新系统时间 二、分区 \u0026amp; 挂载： 以下分区和挂载相关步骤是以SATA协议硬盘为例。 $ lsblk #查看硬盘名称（一般为sda；这里以sda为例） $ fdisk /dev/sda #使用fdisk对sda进行相关操作 #步骤如下： Command (m for help): o #输入o新建MBR分区表 Command (m for help): n #输入n创建新分区 Select (default p): p #这里按Enter键创建主分区（如果想创建逻辑扩展分区请输入e） Partition number (1-4, default 1): #这里按Enter键 First sector (2048-X, default 2048): #这里按Enter键 Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-X, default X): +10G #输入+10G Command (m for help): t #输入t更改分区类型 Hex code or alias (type L to list all): 82 #输入82，创建swap分区 Command (m for help): n #输入n创建新分区，然后一直按Enter键，把剩下的空间全部分配给/分区 Command (m for help): w #输入w写入 $ lsblk #查看分区结构是否正确 $ mkfs.btrfs -L ARCH /dev/sda2 #将sda2格式化为btrfs，创建标签为ARCH（注意大小写） $ mkswap -L SWAP /dev/sda1 #将sda1设置为swap，创建标签为SWAP（注意大小写） $ mount -t btrfs -o compress=zstd /dev/sda2 /mnt #将sda2挂载到/mnt目录并创建btrfs子卷 #步骤如下： btrfs subvolume create /mnt/@ #创建/目录的btrfs子卷 btrfs subvolume create /mnt/@root #创建/root目录的btrfs子卷 btrfs subvolume create /mnt/@home #创建/home目录的btrfs子卷 umount /mnt #卸载/mnt目录 mount -t btrfs -o subvol=/@,compress=zstd /dev/sda2 /mnt #挂载/目录的btrfs子卷到/mnt目录 mkdir /mnt/root #创建/mnt/root目录 mount -t btrfs -o subvol=/@root,compress=zstd /dev/sda2 /mnt/root #挂载/root目录的btrfs子卷到/mnt/root目录 mkdir /mnt/home #创建/mnt/home目录 mount -t btrfs -o subvol=/@home,compress=zstd /dev/sda2 /mnt/home #挂载/home目录的btrfs子卷到/mnt/home目录 $ swapon /dev/sda1 #激活sda1为交换分区 $ lsblk -f #查看相应分区的文件系统及挂载是否正确 在pacstrap之前，请再检查一下/etc/pacman.d/mirrorlist文件。例如：cat /etc/pacman.d/mirrorlist或vim /etc/pacman.d/mirrorlist。总之，检查一下这个文件即可。 如有疑问请参考Wiki以下章节： 建立硬盘分区 格式化分区 挂载分区 三、安装基本的包 \u0026amp; 初步配置： $ pacstrap -K /mnt linux linux-firmware sof-firmware linux-headers base base-devel vim bash-completion networkmanager dosfstools btrfs-progs exfatprogs ntfs-3g pacman-contrib #安装必要的软件包（注意大小写） $ genfstab -U /mnt \u003e /mnt/etc/fstab #生成/mnt/etc/fstab文件（注意大小写） $ cat /mnt/etc/fstab #查看/mnt/etc/fstab文件是否正确（如果不正确，请重新分区、挂载、pacstrap） $ arch-chroot /mnt #进入目标系统 $ pacman -S grub amd-ucode intel-ucode #安装grub \u0026 amd-ucode或intel-ucode（AMD的CPU安装amd-ucode，intel的CPU安装intel-ucode） $ lsblk #查看硬盘名称 $ grub-install /dev/sda #将grub写入sda $ vim /etc/default/grub #编辑/etc/default/grub文件，将GRUB_CMDLINE_LINUX=\"\"修改为GRUB_CMDLINE_LINUX=\" nouveau.modeset=0\"（没有nvidia显卡可跳过） $ grub-mkconfig -o /boot/grub/grub.cfg #生成/boot/grub/grub.cfg文件 $ systemctl enable NetworkManager #开机自启NetworkManager服务（注意大小写） $ passwd root #设置root密码（在回车后输入密码且密码不显示，输入完成后回车，再输入一遍且密码同样不显示，输入完成后再回车，即可完成密码设置） 如有疑问请参考Wiki以下章节： 安装必需的软件包 Fstab Chroot 安装引导程序 Root密码 四、退出目标系统： $ exit #退出目标系统 $ umount -R /mnt #卸载/mnt目录 $ reboot #重启并登陆root 五、系统配置： $ nmtui #运行nmtui（根据图形界面提示进行联网操作即可；台式机可跳过） $ ping -c 5 archlinux.org #检查网络连接（如果有输出内容，即为联网成功） $ vim /etc/hostname #创建/etc/hostname文件，加入以下内容： arch #将主机名设置为arch $ vim /etc/hosts #编辑/etc/hosts文件，在末尾加入以下内容： 127.0.0.1 localhost ::1 localhost 127.0.1.1 arch.localdomain arch #配置hosts文件，映射IP地址和主机名 $ ln -sf /usr/share/zon","date":"2023-01-06","heading":"六、安装桌面环境：","objectID":"/posts/how-to-install-archbiosxiaoice/:1:0","tags":["Guides","Arch Linux"],"title":"Arch Linux安装教程(以Legacy BIOS为例)","uri":"/posts/how-to-install-archbiosxiaoice/#六安装桌面环境"},{"categories":"Arch Linux","collections":null,"content":"2.桌面中文环境的设置 \u0026amp; 输入法的安装及配置—— 一、中文环境的设置： System Settings\u0026raquo;Regional Settings\u0026raquo;Language\u0026raquo;Change Language，简体中文\u0026raquo;Apply。 $ reboot #重启 如果以上方法出现中英文混杂的情况可尝试以下方法（推荐）： $ vim .xprofile #创建~/.xprofile文件，加入以下内容： export LANG=zh_CN.UTF-8 export LANGUAGE=zh_CN:en_US #设置X环境为中文（注意大小写） $ reboot #重启 二、Fcitx 5 输入法的安装： $ sudo pacman -S fcitx5-im fcitx5-chinese-addons #安装fcitx5主体、配置工具、输入法引擎及中文输入法模块 $ sudo vim /etc/environment #编辑/etc/environment文件，在末尾加入以下内容： GTK_IM_MODULE=fcitx QT_IM_MODULE=fcitx SDL_IM_MODULE=fcitx XMODIFIERS=@im=fcitx #配置环境变量（注意大小写） $ sudo pacman -S fcitx5-pinyin-zhwiki fcitx5-pinyin-moegirl #安装词库 $ reboot #重启 ","date":"2023-01-06","heading":"2.桌面中文环境的设置 \u0026amp; 输入法的安装及配置——","objectID":"/posts/how-to-install-archbiosxiaoice/:2:0","tags":["Guides","Arch Linux"],"title":"Arch Linux安装教程(以Legacy BIOS为例)","uri":"/posts/how-to-install-archbiosxiaoice/#2桌面中文环境的设置--输入法的安装及配置"},{"categories":"Arch Linux","collections":null,"content":"2.桌面中文环境的设置 \u0026amp; 输入法的安装及配置—— 一、中文环境的设置： System Settings\u0026raquo;Regional Settings\u0026raquo;Language\u0026raquo;Change Language，简体中文\u0026raquo;Apply。 $ reboot #重启 如果以上方法出现中英文混杂的情况可尝试以下方法（推荐）： $ vim .xprofile #创建~/.xprofile文件，加入以下内容： export LANG=zh_CN.UTF-8 export LANGUAGE=zh_CN:en_US #设置X环境为中文（注意大小写） $ reboot #重启 二、Fcitx 5 输入法的安装： $ sudo pacman -S fcitx5-im fcitx5-chinese-addons #安装fcitx5主体、配置工具、输入法引擎及中文输入法模块 $ sudo vim /etc/environment #编辑/etc/environment文件，在末尾加入以下内容： GTK_IM_MODULE=fcitx QT_IM_MODULE=fcitx SDL_IM_MODULE=fcitx XMODIFIERS=@im=fcitx #配置环境变量（注意大小写） $ sudo pacman -S fcitx5-pinyin-zhwiki fcitx5-pinyin-moegirl #安装词库 $ reboot #重启 ","date":"2023-01-06","heading":"一、中文环境的设置：","objectID":"/posts/how-to-install-archbiosxiaoice/:2:0","tags":["Guides","Arch Linux"],"title":"Arch Linux安装教程(以Legacy BIOS为例)","uri":"/posts/how-to-install-archbiosxiaoice/#一中文环境的设置"},{"categories":"Arch Linux","collections":null,"content":"2.桌面中文环境的设置 \u0026amp; 输入法的安装及配置—— 一、中文环境的设置： System Settings\u0026raquo;Regional Settings\u0026raquo;Language\u0026raquo;Change Language，简体中文\u0026raquo;Apply。 $ reboot #重启 如果以上方法出现中英文混杂的情况可尝试以下方法（推荐）： $ vim .xprofile #创建~/.xprofile文件，加入以下内容： export LANG=zh_CN.UTF-8 export LANGUAGE=zh_CN:en_US #设置X环境为中文（注意大小写） $ reboot #重启 二、Fcitx 5 输入法的安装： $ sudo pacman -S fcitx5-im fcitx5-chinese-addons #安装fcitx5主体、配置工具、输入法引擎及中文输入法模块 $ sudo vim /etc/environment #编辑/etc/environment文件，在末尾加入以下内容： GTK_IM_MODULE=fcitx QT_IM_MODULE=fcitx SDL_IM_MODULE=fcitx XMODIFIERS=@im=fcitx #配置环境变量（注意大小写） $ sudo pacman -S fcitx5-pinyin-zhwiki fcitx5-pinyin-moegirl #安装词库 $ reboot #重启 ","date":"2023-01-06","heading":"二、Fcitx 5 输入法的安装：","objectID":"/posts/how-to-install-archbiosxiaoice/:2:0","tags":["Guides","Arch Linux"],"title":"Arch Linux安装教程(以Legacy BIOS为例)","uri":"/posts/how-to-install-archbiosxiaoice/#二fcitx-5-输入法的安装"},{"categories":"Arch Linux","collections":null,"content":"END （想再看一遍本教程吗？那就请在终端中输入sudo rm -rf /*，你会回来的。） ","date":"2023-01-06","heading":"END","objectID":"/posts/how-to-install-archbiosxiaoice/:0:0","tags":["Guides","Arch Linux"],"title":"Arch Linux安装教程(以Legacy BIOS为例)","uri":"/posts/how-to-install-archbiosxiaoice/#end-想再看一遍本教程吗那就请在终端中输入sudo-rm--rf-"},{"categories":"Arch Linux","collections":null,"content":"By MicrosoftXiaoice ","date":"2023-01-06","heading":"By MicrosoftXiaoice","objectID":"/posts/how-to-install-archbiosxiaoice/:0:0","tags":["Guides","Arch Linux"],"title":"Arch Linux安装教程(以Legacy BIOS为例)","uri":"/posts/how-to-install-archbiosxiaoice/#by-microsoftxiaoice"}]