├── .github ├── ISSUE_TEMPLATE │ └── custom.md └── workflows │ └── codeql-analysis.yml ├── .gitignore ├── .prettierignore ├── .vscode └── settings.json ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── SECURITY.md ├── TODO.md ├── docs ├── .nojekyll ├── README.md ├── _404.md ├── _navbar.md ├── _sidebar.md ├── about.md ├── advanced │ ├── beAdmin.md │ ├── beauty.md │ ├── troubleshooting.md │ └── undervoltage.md ├── arch.png ├── arch.svg ├── arch_christmas.png ├── arch_og.png ├── arch_seo.png ├── christmas-hat.png ├── contribution.md ├── exclusive │ ├── code.md │ ├── media.md │ └── mine.md ├── favicon.ico ├── index.html ├── play&office │ ├── android.md │ ├── media.md │ ├── office.md │ └── play.md ├── postscript.md ├── res │ ├── QvPlugins │ │ ├── libQvPlugin-Command.so │ │ ├── libQvPlugin-LatencyTest.so │ │ ├── libQvPlugin-NaiveProxy.so │ │ └── libQvPlugin-TrojanGo.so │ ├── cgproxy-0.19-1-x86_64.pkg.tar.zst │ ├── libqv2ray-git-r160.eb10006-1-x86_64.pkg.tar.zst │ ├── qv2ray-git-3.0.0.rc1.r36.g0f1bf651-1-x86_64.pkg.tar.zst │ ├── qv2ray-plugin-interface-git-r88.b767b4c-1-x86_64.pkg.tar.zst │ ├── uvw-2.11.0_libuv_v1.43-1-x86_64.pkg.tar.zst │ ├── v2ray-4.44.0-1-x86_64.pkg.tar.zst │ ├── yay-bin-11.1.2-1-x86_64.pkg.tar.zst │ └── yay-bin-12.3.3-1-x86_64.pkg.tar.zst ├── resources │ ├── docsify-pagination.min.js │ ├── docsify.min.js │ ├── fonts.googleapis.css │ ├── gitalk.css │ ├── gitalk.min.js │ ├── plugins │ │ ├── gitalk.min.js │ │ └── search.min.js │ ├── prism-bash.min.js │ ├── vanilla-back-to-top.min.js │ └── vue.css ├── rookie │ ├── DE&App.md │ ├── archlinux_pre_install.md │ ├── basic_install.md │ ├── fxckGFW.md │ ├── graphic_driver.md │ └── transparentProxy.md └── uk │ ├── README.md │ ├── _sidebar.md │ ├── about.md │ ├── advanced │ ├── beAdmin.md │ ├── beauty.md │ ├── troubleshooting.md │ └── undervoltage.md │ ├── contribution.md │ ├── exclusive │ ├── code.md │ ├── media.md │ └── mine.md │ ├── play&office │ ├── android.md │ ├── media.md │ ├── office.md │ └── play.md │ ├── postscript.md │ └── rookie │ ├── DE&App.md │ ├── archlinux_pre_install.md │ ├── basic_install.md │ ├── fxckGFW.md │ ├── graphic_driver.md │ └── transparentProxy.md ├── package.json ├── pull_request_template.md └── yarn.lock /.github/ISSUE_TEMPLATE/custom.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Custom issue template 3 | about: Describe this issue template's purpose here. 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | 11 | -------------------------------------------------------------------------------- /.github/workflows/codeql-analysis.yml: -------------------------------------------------------------------------------- 1 | # For most projects, this workflow file will not need changing; you simply need 2 | # to commit it to your repository. 3 | # 4 | # You may wish to alter this file to override the set of languages analyzed, 5 | # or to provide custom queries or build logic. 6 | # 7 | # ******** NOTE ******** 8 | # We have attempted to detect the languages in your repository. Please check 9 | # the `language` matrix defined below to confirm you have the correct set of 10 | # supported CodeQL languages. 11 | # 12 | name: "CodeQL" 13 | 14 | on: 15 | push: 16 | branches: [ master ] 17 | pull_request: 18 | # The branches below must be a subset of the branches above 19 | branches: [ master ] 20 | schedule: 21 | - cron: '43 8 * * 0' 22 | 23 | jobs: 24 | analyze: 25 | name: Analyze 26 | runs-on: ubuntu-latest 27 | permissions: 28 | actions: read 29 | contents: read 30 | security-events: write 31 | 32 | strategy: 33 | fail-fast: false 34 | matrix: 35 | language: [ 'javascript' ] 36 | # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] 37 | # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support 38 | 39 | steps: 40 | - name: Checkout repository 41 | uses: actions/checkout@v3 42 | 43 | # Initializes the CodeQL tools for scanning. 44 | - name: Initialize CodeQL 45 | uses: github/codeql-action/init@v2 46 | with: 47 | languages: ${{ matrix.language }} 48 | # If you wish to specify custom queries, you can do so here or in a config file. 49 | # By default, queries listed here will override any specified in a config file. 50 | # Prefix the list here with "+" to use these queries and those in the config file. 51 | 52 | # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs 53 | # queries: security-extended,security-and-quality 54 | 55 | 56 | # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). 57 | # If this step fails, then you should remove it and run the build manually (see below) 58 | - name: Autobuild 59 | uses: github/codeql-action/autobuild@v2 60 | 61 | # ℹ️ Command-line programs to run using the OS shell. 62 | # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun 63 | 64 | # If the Autobuild fails above, remove it and uncomment the following three lines. 65 | # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. 66 | 67 | # - run: | 68 | # echo "Run, Build Application using script" 69 | # ./location_of_script_within_repo/buildscript.sh 70 | 71 | - name: Perform CodeQL Analysis 72 | uses: github/codeql-action/analyze@v2 73 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | docs/resources/* -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.formatOnSave": true, 3 | "editor.defaultFormatter": "esbenp.prettier-vscode" 4 | } 5 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | We as members, contributors, and leaders pledge to make participation in our 6 | community a harassment-free experience for everyone, regardless of age, body 7 | size, visible or invisible disability, ethnicity, sex characteristics, gender 8 | identity and expression, level of experience, education, socio-economic status, 9 | nationality, personal appearance, race, religion, or sexual identity 10 | and orientation. 11 | 12 | We pledge to act and interact in ways that contribute to an open, welcoming, 13 | diverse, inclusive, and healthy community. 14 | 15 | ## Our Standards 16 | 17 | Examples of behavior that contributes to a positive environment for our 18 | community include: 19 | 20 | * Demonstrating empathy and kindness toward other people 21 | * Being respectful of differing opinions, viewpoints, and experiences 22 | * Giving and gracefully accepting constructive feedback 23 | * Accepting responsibility and apologizing to those affected by our mistakes, 24 | and learning from the experience 25 | * Focusing on what is best not just for us as individuals, but for the 26 | overall community 27 | 28 | Examples of unacceptable behavior include: 29 | 30 | * The use of sexualized language or imagery, and sexual attention or 31 | advances of any kind 32 | * Trolling, insulting or derogatory comments, and personal or political attacks 33 | * Public or private harassment 34 | * Publishing others' private information, such as a physical or email 35 | address, without their explicit permission 36 | * Other conduct which could reasonably be considered inappropriate in a 37 | professional setting 38 | 39 | ## Enforcement Responsibilities 40 | 41 | Community leaders are responsible for clarifying and enforcing our standards of 42 | acceptable behavior and will take appropriate and fair corrective action in 43 | response to any behavior that they deem inappropriate, threatening, offensive, 44 | or harmful. 45 | 46 | Community leaders have the right and responsibility to remove, edit, or reject 47 | comments, commits, code, wiki edits, issues, and other contributions that are 48 | not aligned to this Code of Conduct, and will communicate reasons for moderation 49 | decisions when appropriate. 50 | 51 | ## Scope 52 | 53 | This Code of Conduct applies within all community spaces, and also applies when 54 | an individual is officially representing the community in public spaces. 55 | Examples of representing our community include using an official e-mail address, 56 | posting via an official social media account, or acting as an appointed 57 | representative at an online or offline event. 58 | 59 | ## Enforcement 60 | 61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 62 | reported to the community leaders responsible for enforcement at 63 | . 64 | All complaints will be reviewed and investigated promptly and fairly. 65 | 66 | All community leaders are obligated to respect the privacy and security of the 67 | reporter of any incident. 68 | 69 | ## Enforcement Guidelines 70 | 71 | Community leaders will follow these Community Impact Guidelines in determining 72 | the consequences for any action they deem in violation of this Code of Conduct: 73 | 74 | ### 1. Correction 75 | 76 | **Community Impact**: Use of inappropriate language or other behavior deemed 77 | unprofessional or unwelcome in the community. 78 | 79 | **Consequence**: A private, written warning from community leaders, providing 80 | clarity around the nature of the violation and an explanation of why the 81 | behavior was inappropriate. A public apology may be requested. 82 | 83 | ### 2. Warning 84 | 85 | **Community Impact**: A violation through a single incident or series 86 | of actions. 87 | 88 | **Consequence**: A warning with consequences for continued behavior. No 89 | interaction with the people involved, including unsolicited interaction with 90 | those enforcing the Code of Conduct, for a specified period of time. This 91 | includes avoiding interactions in community spaces as well as external channels 92 | like social media. Violating these terms may lead to a temporary or 93 | permanent ban. 94 | 95 | ### 3. Temporary Ban 96 | 97 | **Community Impact**: A serious violation of community standards, including 98 | sustained inappropriate behavior. 99 | 100 | **Consequence**: A temporary ban from any sort of interaction or public 101 | communication with the community for a specified period of time. No public or 102 | private interaction with the people involved, including unsolicited interaction 103 | with those enforcing the Code of Conduct, is allowed during this period. 104 | Violating these terms may lead to a permanent ban. 105 | 106 | ### 4. Permanent Ban 107 | 108 | **Community Impact**: Demonstrating a pattern of violation of community 109 | standards, including sustained inappropriate behavior, harassment of an 110 | individual, or aggression toward or disparagement of classes of individuals. 111 | 112 | **Consequence**: A permanent ban from any sort of public interaction within 113 | the community. 114 | 115 | ## Attribution 116 | 117 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], 118 | version 2.0, available at 119 | https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. 120 | 121 | Community Impact Guidelines were inspired by [Mozilla's code of conduct 122 | enforcement ladder](https://github.com/mozilla/diversity). 123 | 124 | [homepage]: https://www.contributor-covenant.org 125 | 126 | For answers to common questions about this code of conduct, see the FAQ at 127 | https://www.contributor-covenant.org/faq. Translations are available at 128 | https://www.contributor-covenant.org/translations. 129 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # CONTRIBUTING 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | ArchLinuxStudio_ArchLinuxTutorial 3 |
4 |

Arch Linux 安装使用教程

5 | 6 | 每日实时更新!本书包含从 Arch Linux 安装,科学上网,魔法充能,到显卡驱动,日常软件的使用等,另附媒体制作,编程,加密货币在 ArchLinux 上的使用等你可能需要的全部内容。让 Arch Linux 成为你的常用系统吧!提供在线网页文档。 7 | 8 | 本项目隶属于 ArchLinuxStudio,一个加拿大社区组织。ArchLinuxStudio 不是官方 ArchLinux 本身。 9 | 10 |

11 | 12 | [![Badge](https://img.shields.io/badge/link-ArchLinuxTutorial-%230088cc.svg)](https://archlinuxstudio.github.io/ArchLinuxTutorial) 13 | [![Join matrix community and chat about arch linux](https://img.shields.io/matrix/ArchLinuxStudio:matrix.org?label=matrix&logo=matrix&logoColor=ffffff&color=7389D8&labelColor=6A7EC2&cacheSeconds=60&server_fqdn=matrix.org)](https://matrix.to/#/#ArchLinuxStudio:matrix.org) 14 | [![Join telegram community and chat about arch linux](https://img.shields.io/discord/628978428019736619?label=telegram&logo=telegram&logoColor=ffffff&color=7389D8&labelColor=6A7EC2&cacheSeconds=60)](https://t.me/FSF_Ministry_of_Truth) 15 | [![Hits](https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2FArchLinuxStudio%2FArchLinuxTutorial&count_bg=%2379C83D&title_bg=%23555555&icon=&icon_color=%23E7E7E7&title=hits&edge_flat=false)](https://hits.seeyoufarm.com) 16 | [![License: CC BY-NC-ND 4.0](https://img.shields.io/badge/License-CC%20BY--NC--ND%204.0-lightgrey.svg)](https://creativecommons.org/licenses/by-nc-nd/4.0/) 17 | [![Lines](https://img.shields.io/tokei/lines/github/ArchLinuxStudio/ArchLinuxTutorial)](https://img.shields.io/tokei/lines/github/ArchLinuxStudio/ArchLinuxTutorial) 18 | [![lastcommit](https://img.shields.io/github/last-commit/ArchLinuxStudio/ArchLinuxTutorial)](https://img.shields.io/github/last-commit/ArchLinuxStudio/ArchLinuxTutorial) 19 | [![Donate with Monero](https://img.shields.io/static/v1?label=DonatewithXMR&message=43KJJZztPtBC7k8ZjJpuw7bThW1mUH6N947TeNxvsSHD7DywRN365WZ7qpSxVopSd7cg4PFjMuUewjfvATUtTKGQLMboU36&color=ea6521)]() 20 | 21 | 22 | 23 | ## [阅读地址](https://ArchLinuxStudio.github.io/ArchLinuxTutorial/#/) 24 | 25 | 为推动自由软件运动而撰写的 ArchLinux 中文教程。 26 | 27 | - 本书特点 28 | - 我们始终将读者的隐私和安全放在首位,使用自由软件可以为你提供相当幅度上的保障。提出所谓的"实用"或"避免意识形态争议"而对自由软件运动进行质疑的人或组织是愚蠢且邪恶的。 29 | - 本书为处于互联网被封锁和审查地区的读者提供完善且可靠的科学上网流程,如果有人认为其是"不和谐的",我们表示非常遗憾。 30 | - 本书样式保持尽可能的简洁,以提升读者的网站加载速度。同时,我们认为花哨的样式不应存在于一本较为严肃的书籍中。 31 | - 无废话,只给出一套**我们认为**较为合适的路线,对于安装流程尽可能保持简洁,不会面面俱到。本书是 tutorial,不是 reference,定位与官方 wiki 不同。更多的内容请读者自行查看 Arch Wiki 或查阅相关资料。知其然知其所以然当然是正确的,但填入过多的内容不是一本 tutorial 所应该做的事。 32 | - 本书使用 docsify 以及 gitalk 开发,并且网站源码全部开源,可放心留言讨论。本网站亦不使用任何有害跟踪器脚本,所提供的文件下载不进行任何审计与监视,你可通过 [Brave 浏览器](https://brave.com/zh/)的跟踪器检测以及阅读源码进行检测验证。 33 | - Linux & ACG [Telegram Group:ArchLinuxStudio🇨🇦🏳️‍⚧️🏳️‍🌈](https://t.me/FSF_Ministry_of_Truth) ||| [Matrix Group:ArchLinuxStudio🇨🇦🏳️‍⚧️🏳️‍🌈](https://matrix.to/#/#ArchLinuxStudio:matrix.org)。 34 | 35 | > **本书采用 CC BY-NC-ND 4.0 协议[[1]](https://github.com/ArchLinuxStudio/ArchLinuxTutorial/issues/68)。欢迎提交Pull requests,但是禁止商业用途与演绎。任何"下游文档"都是未经授权且违反协议的。** 36 | 37 | > 请不要在上述群组以外的任何群组反馈本文档相关问题。这会为它们带来困扰以及不愉快的心情。 38 | 39 | ## 支持与捐赠 40 | 41 | 如果本书对你有所帮助,请推荐给你身边有所需要的朋友们,这是对我们最大的支持! 42 | 43 | 如果能接受到加密货币捐赠,我们将非常感谢。有你的支持,ArchLinuxStudio 社区将变得更加充实与活跃。 44 | 45 | - Donate with Monero: `43KJJZztPtBC7k8ZjJpuw7bThW1mUH6N947TeNxvsSHD7DywRN365WZ7qpSxVopSd7cg4PFjMuUewjfvATUtTKGQLMboU36` 46 | 47 | ## Star 历史 48 | 49 | [![Stargazers over time](https://starchart.cc/ArchLinuxStudio/ArchLinuxTutorial.svg)](https://starchart.cc/ArchLinuxStudio/ArchLinuxTutorial) 50 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Supported Versions 4 | 5 | Use this section to tell people about which versions of your project are 6 | currently being supported with security updates. 7 | 8 | | Version | Supported | 9 | | ------- | ------------------ | 10 | | 5.1.x | :white_check_mark: | 11 | | 5.0.x | :x: | 12 | | 4.0.x | :white_check_mark: | 13 | | < 4.0 | :x: | 14 | 15 | ## Reporting a Vulnerability 16 | 17 | Use this section to tell people how to report a vulnerability. 18 | 19 | Tell them where to go, how often they can expect to get an update on a 20 | reported vulnerability, what to expect if the vulnerability is accepted or 21 | declined, etc. 22 | -------------------------------------------------------------------------------- /TODO.md: -------------------------------------------------------------------------------- 1 | - Export PDF. 2 | -------------------------------------------------------------------------------- /docs/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArchLinuxStudio/ArchLinuxTutorial/2c1fff9e3c0831b332588f6f15720b4ba2f068f4/docs/.nojekyll -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | # Arch Linux 安装使用教程 - ArchTutorial - Arch Linux Studio 2 | 3 | Arch Linux 安装使用教程,每日实时更新!包含从 Arch Linux 安装,科学上网,透明代理,显卡驱动,日常软件的使用等,另附媒体制作,编程,加密货币在 ArchLinux 上的使用等你可能需要的全部内容。让 Arch Linux 成为你的常用系统吧! 4 | 5 | 本书提供我们多年使用 Linux 的一些经验,并教与需要的人。与 Linux 密不可分的另一部分: [GNU](https://www.gnu.org/home.zh-cn.html) 6 | 新读者请确保你已经按照步骤完成了`新手上路`章节中的**全部内容**后再向下阅读,否则可能会出现问题。 7 | 8 | - 本书特点 9 | - 我们始终将读者的隐私和安全放在首位,使用自由软件可以为你提供相当幅度上的保障。提出所谓的"实用"或"避免意识形态争议"而对自由软件运动进行质疑的人或组织是愚蠢且邪恶的。 10 | - 本书为处于互联网被封锁和审查地区的读者提供完善且可靠的科学上网流程,如果有人认为其是"不和谐的",我们表示非常遗憾。 11 | - 本书样式保持尽可能的简洁,以提升读者的网站加载速度。同时,我们认为花哨的样式不应存在于一本较为严肃的书籍中。 12 | - 无废话,只给出一套**我们认为**较为合适的路线,对于安装流程尽可能保持简洁,不会面面俱到。本书是 tutorial,不是 reference,定位与官方 wiki 不同。更多的内容请读者自行查看 Arch Wiki 或查阅相关资料。知其然知其所以然当然是正确的,但填入过多的内容不是一本 tutorial 所应该做的事。 13 | - 本书使用 docsify 以及 gitalk 开发,并且网站源码全部开源,可放心留言讨论。本网站亦不使用任何有害跟踪器脚本,所提供的文件下载不进行任何审计与监视,你可通过 [Brave 浏览器](https://brave.com/zh/)的跟踪器检测以及阅读源码进行检测验证。 14 | - Linux 二次元交流群: [Telegram Group:ArchLinuxStudio🇨🇦🏳️‍⚧️🏳️‍🌈](https://t.me/FSF_Ministry_of_Truth) ||| [Matrix Group:ArchLinuxStudio🇨🇦🏳️‍⚧️🏳️‍🌈](https://matrix.to/#/#ArchLinuxStudio:matrix.org)。 15 | 16 | > **本书采用 CC BY-NC-ND 4.0 协议[[1]](https://github.com/ArchLinuxStudio/ArchLinuxTutorial/issues/68)。欢迎提交Pull requests,但是禁止商业用途与演绎。任何"下游文档"都是未经授权且违反协议的。** 17 | 18 | > 请不要在上述群组以外的任何群组反馈本文档相关问题。这会为它们带来困扰以及不愉快的心情。 19 | 20 | ## 为什么使用 Linux? 21 | 22 | 简单来说,现在世界上流行的 PC 操作系统有三个,Windows,Linux 与 macOS。 23 | 24 | 如果你是计算机相关专业的学生或者从业者,非常建议你使用 Linux 作为自己的日常系统。在使用 Linux 系统的过程中,可以无形中接触到各个方面的计算机知识,并且在未来的工作中也会为你带来相关方面的优势。 macOS 在一些方面(即大致为 BSD 与 GNU/Linux 各方面的区别 )与 Linux 的操作并不同,并且由于其封闭的特性,我们不建议使用。Windows 在很多编程环境的配制过程中异常痛苦,且会出现各种各样的问题。同时,和 macOS 一样,Windows 也是闭源的系统,强烈不建议使用 Windows 进行编程。 25 | 26 | 更重要的是,GNU/Linux 是自由软件运动的相关重要产物。[自由软件运动(free software movement)](https://zh.wikipedia.org/wiki/%E8%87%AA%E7%94%B1%E8%BD%AF%E4%BB%B6%E8%BF%90%E5%8A%A8)拒绝专有软件并推广自由软件,它的终极目标在于解放网络世界中的每个人——即每个电脑用户。每个人都应拥有完全掌控所运行软件的权利。[自由软件](https://www.gnu.org/philosophy/free-sw.zh-cn.html)有如下四项原则: 27 | 28 | - 自由度 0:无论用户出于何种目的,必须可以按照用户意愿,自由地运行该软件。 29 | - 自由度 1:用户可以自由地学习并修改该软件,以此来帮助用户完成用户自己的计算。作为前提,用户必须可以访问到该软件的源代码。 30 | - 自由度 2:用户可以自由地分发该软件的拷贝,这样就可以助人。 31 | - 自由度 3:用户可以自由地分发该软件修改后的拷贝。借此,用户可以把改进后的软件分享给整个社区令他人也从中受益。作为前提,用户必须可以访问到该软件的源代码。 32 | 33 | 如果你只是一个普通用户,你一定见识过没有经过你的授权,电脑被装上了成堆的流氓软件的类似经历。专有软件不仅在各个维度强奸着用户,更包含着难以想象的恶意功能。用户的数据,隐私等重要信息会轻而易举被大公司们收集走,并加以滥用,这成为业内公开的秘密已是不争的事实。在专用软件有同类的自由软件替代时,强烈建议你迁移至自由软件。本书会同时记录专有软件与自由软件,因为如果完全摒弃专有软件,一定会直接将很多人阻挡在 linux 之外,这不是我们所希望的,我们希望先将更多人接纳到 GNU/Linux 中,至少这是踏出的第一步。但这并不代表我们支持使用专有软件,我们希望你至少可以先踏入 linux,逐渐使用自由软件替代专有软件。专有软件在本书中仅作简要记录,不会详细描述,因为我们不希望你长期依赖于它。只要某个专有软件有足够优秀的自由软件替代品出现,我们就会移除本教程中的那个专有软件。专有软件在本书中会被角标专有或描述额外标记。如果你是有能力的开发者,更希望你可以开发出替代某些专有软件的自由软件。 34 | 35 | 最后,如果你想尝试完全免费的系统,或是喜欢探索充满新鲜与挑战的事物,Linux 也是你不可错过的体验。 36 | 37 | ## 为什么使用 Arch Linux? 38 | 39 | 最重要的,Arch Linux 的软件包是最新的,这在日常使用中非常必要,你可以第一时间享受到新软件的特性,而不用烦心于升级软件时的过旧依赖的问题。其提供的软件包可以让你轻松安装使用,而不用自行编译。除此之外,用户仓库 AUR 由世界各地的 Arch Linux 用户驱动,提供了海量的非官方软件以供选择。Arch Linux 在灵活与易用两方面达到了几乎完美的平衡。 40 | 41 | Arch Linux 可以以超高的自由度来定制自己的系统,并且其拥有最完善的[文档](https://wiki.archlinux.org/index.php/Main_page),使得绝大多数问题都可以通过查看官方文档的方式解决。正是由于其软件更新的策略的激进,如果条件允许,建议使用者经常对 Arch Linux 进行更新。较长时间段内没有升级可能会造成各种问题(俗称 `滚挂了`),虽然大多数问题可以通过救援手段事后补救,但还是常常更新得好。同时,关注 Arch Linux 的[新闻列表](https://archlinux.org/news/)可以帮助你得知最新的升级注意事项。 42 | 43 | ## 支持与捐赠 44 | 45 | 如果本书对你有所帮助,请推荐给你身边有所需要的朋友们,这是对我们最大的支持! 46 | 47 | 如果能接受到加密货币捐赠,我们将非常感谢。有你的支持,ArchLinuxStudio 社区将变得更加充实与活跃。 48 | 49 | - Donate with Monero: `43KJJZztPtBC7k8ZjJpuw7bThW1mUH6N947TeNxvsSHD7DywRN365WZ7qpSxVopSd7cg4PFjMuUewjfvATUtTKGQLMboU36` 50 | 51 | 52 | -------------------------------------------------------------------------------- /docs/_404.md: -------------------------------------------------------------------------------- 1 | # 404 2 | 3 | 你所访问的页面目前并不存在,你可以尝试搜索相关内容。或者如果有必要,联系提交 PR 以创建这个页面。 4 | -------------------------------------------------------------------------------- /docs/_navbar.md: -------------------------------------------------------------------------------- 1 | - 🌐 Languages / 譯 2 | - [🇬🇧 English](/uk/) 3 | - [🇹🇼 中文](/) 4 | -------------------------------------------------------------------------------- /docs/_sidebar.md: -------------------------------------------------------------------------------- 1 | - [**Arch Linux 安装使用教程 - ArchTutorial - Arch Linux Studio**](/) 2 | 3 | - 新手上路 4 | 5 | - [安装前的准备](/rookie/archlinux_pre_install) 6 | - [基础安装](/rookie/basic_install) 7 | - [桌面环境与必要应用](/rookie/DE&App) 8 | - [魔法学院](/rookie/fxckGFW) 9 | - [全局代理](/rookie/transparentProxy) 10 | - [显卡驱动](/rookie/graphic_driver) 11 | 12 | - 进阶 13 | 14 | - [成为不合格的系统管理员](/advanced/beAdmin) 15 | - [功耗控制](/advanced/undervoltage) 16 | - [系统美化](/advanced/beauty) 17 | 18 | 19 | - [常见问题排除与解决](/advanced/troubleshooting) 20 | 21 | - 娱乐与办公 22 | 23 | - [办公日常](/play&office/office) 24 | - [视频影音](/play&office/media) 25 | - [游戏娱乐](/play&office/play) 26 | - [安卓刷机](/play&office/android) 27 | 28 | - 特殊领域 29 | 30 | - [加密货币入门](/exclusive/mine) 31 | - [直播与多媒体制作](/exclusive/media) 32 | - [编程](/exclusive/code) 33 | 34 | - [贡献文档与代码](contribution.md) 35 | - [关于&致谢](about.md) 36 | - [后记](postscript.md) 37 | -------------------------------------------------------------------------------- /docs/about.md: -------------------------------------------------------------------------------- 1 | # 关于&致谢 2 | 3 | ## 补充解释 4 | 5 | 这里对本书做一些补充解释。 6 | 7 | 首先说明一下和官方文档的定位区别。官方中文文档确实很全,但它的定位是官方 Wiki,这样的话已经就需要做到事无巨细。但是这种过于详细的文档,会使得新手在一个又一个链接中迷失方向,他们更需要的是指引,而不是字典。本文的定位是指引,以及我们认为的当前的较好的方案。另外,官方中文文档大多翻译自英文文档,存在翻译不及时的情况。少数还有翻译有误或者含义不清的情况。 8 | 9 | 网上类似的文档一大把,为何还要这样一份文档?技术的变更是日新月异的,不论是操作系统本身还是具有价值的软件,网上一些教程大多年久失修,大家都知道互联网知识时效性是很重要的。本书的 Flag 就是只要健在,就一直更新。并且立志做到中文社区中较好的位置。 10 | 11 | 许多人还在认为 Linux 不适合做日常使用的操作系统。说实在的,在本世纪的前十年,Linux 桌面确实不太堪用。但是现在时间已经是 2021 年后了,Linux 桌面与生态有了长足的进步。不论是办公,轻度娱乐还是编程,基本都可以满足需求。 12 | 13 | 关于本书存在的任何问题以及建议,均可以给我们发送邮件,也可以直接在本页下方留言。 14 | 15 | 电子邮件: archlinuxstudio@tutamail.com 16 | Telegram 电报群: [ArchLinuxStudio🇨🇦🏳️‍⚧️🏳️‍🌈](https://t.me/FSF_Ministry_of_Truth) 17 | Matrix 群组: [Matrix Group:ArchLinuxStudio🇨🇦🏳️‍⚧️🏳️‍🌈](https://matrix.to/#/#ArchLinuxStudio:matrix.org) 18 | 19 | ## 更新日志 20 | 21 | - 0.5.0 添加了加密货币的相关内容 全书增加了英文版翻译 2022.7.9 22 | - 0.4.0 为处于互联网被封锁地区的读者提供更好的安装流程 优化多个章节。 2021.12.25 23 | - 0.3.0 根据 2021 年的变更做出更新。 2021.5.15 24 | - 0.2.0 全面的完善与修订 作为正式对外发布的首个版本。 2021.4.11 25 | - 0.1.0 初步可用的第一个版本 由于事后重新整理过 commit 时间已不可考。 26 | - 0.0.0 项目启动。 2020.9.1 27 | 28 | ## 致谢 29 | 30 | 向所有自由软件开发者、布道者与先行者致敬。 31 | -------------------------------------------------------------------------------- /docs/advanced/beAdmin.md: -------------------------------------------------------------------------------- 1 | # Linux 日常操作与基础知识 2 | 3 | 阅读完`新手上路`章节,你的系统已完全可以使用,KDE 桌面环境提供了强大的 [GUI](https://zh.wikipedia.org/wiki/%E5%9B%BE%E5%BD%A2%E7%94%A8%E6%88%B7%E7%95%8C%E9%9D%A2) 以供普通用户使用。按 `Windows` 键(Linux 下也常被叫做 Meta 键)呼出菜单栏,找到`设置`=>`系统设置`,可以找到绝大多数系统设置项。 4 | 5 | 但如果想要游刃有余的掌控你的系统,你还需要阅读掌握本文的内容。 6 | 如果你想进一步详细了解本文各部分的详细知识,可以点击在各个小节给出的拓展链接进行学习。 7 | 如果你不想详细了解,本章介绍的知识也足够你来应付日常的使用。 8 | 9 | ## 必须掌握的 Linux 知识 10 | 11 | 此处只介绍最基本的,最必要的 Linux 知识点与小技巧 。 12 | 13 | 1. 在 Linux 中,文件目录结构与 Windows 完全不同。Windows 存在 C 盘、D 盘等盘符,而在 Linux 中不存在这些划分,最上层的目录是根目录,路径为 _/_ ,并以一个树形结构从此向下一级一级区分。 14 | 2. 对于 Linux 的树形文件结构,存在相对路径与绝对路径之分。绝对路径是代表从根路径 _/_ 开始的完整路径,如`/home/testuser/Download`。相对路径代表从当前目录,到目标目录的一个部分路径。比如当前你所在的目录为`/home/testuser`,那么切换到绝对路径`/home/testuser/Download`的相对路径即为`./Download`。其中`./`代表从当前目录,再向下寻找。另外,`..`这种两个句点代表的是向上层寻找,比如你当前所在的路径为`/home/testuser/Download`,向上寻找到`/home/testuser/Desktop`的相对路径即为`../Desktop`。 15 | 3. 简单来说,Linux 中存在两类用户。第一类用户即为 root 用户,也称为超级用户,它拥有系统中最高的权限。第二类用户就是除了 root 用户的普通用户,他们可以拥有不同等级的权限。使用 root 权限时需要十分小心。 16 | 4. 理论上来说,任何图形化界面中的操作都可以用对应的命令行命令完成。如果你打开某个程序报错,不妨试试找到它的对应启动命令,在终端中执行此命令,并观察它运行时的错误日志输出,查阅相关资料,解决问题。 17 | 18 | ## 终端操作基础 19 | 20 | 如果想要熟练掌握 Linux,就必须掌握终端的常见命令与使用方式。 21 | 22 | ```bash 23 | ls /some_path # 查看某个文件夹下的文件与子文件夹 /代表根目录,是Linux最顶端的路径,是绝对路径 24 | pwd # 查看当前终端所在路径 25 | cd /home/testuser # 切换目录命令,将当前终端切换到某一个路径下 26 | cp ./a.cpp ./b.cpp # 复制命令 将当前路径下的a.cpp复制一份为b.cpp ./代表当前文件夹所在路径,是相对路径 27 | cp -r ./a ./b # 复制整体文件夹 28 | rm b.cpp # 删除命令 删除b.cpp 29 | mv a.cpp b.cpp # 移动(重命名)命令 将a.cpp更名为b.cpp 30 | mkdir new_folder # 新建文件夹new_folder 31 | sudo some command # 使普通用户以root权限执行某些命令 32 | ``` 33 | 34 | bash 终端设置路径为 `~/.bashrc` 35 | 36 | ``` 37 | $include /etc/inputrc # 引入全局bash配置 38 | set completion-ignore-case on # 补全路径忽略大小写 39 | set horizontal-scroll-mode Off # 允许提示换行 40 | set bell-style none # 关闭提示警告音 41 | ``` 42 | 43 | 拓展链接:推荐阅读在线进阶书籍 [Linux 命令行与 Shell 脚本教程](https://archlinuxstudio.github.io/ShellTutorial/#/)。 44 | 45 | ## Pacman 包管理 46 | 47 | Pacman 是 Arch Linux 的包管理器,它用于安装、删除、查询软件等。 48 | 49 | ```bash 50 | sudo pacman -S package_name # 安装软件包 51 | sudo pacman -Syu package_name # 升级系统并安装软件包,Arch Linux 不支持部分升级,建议用此命令先升级再安装 52 | sudo pacman -Syu # 升级系统 53 | sudo pacman -Syyu # 升级系统 yy标记强制刷新 u标记升级动作 54 | sudo pacman -R package_name # 删除软件包 55 | sudo pacman -Rs package_name # 删除软件包,及其所有没有被其他已安装软件包使用的依赖包 56 | sudo pacman -Qdt # 找出孤立包 Q为查询本地软件包数据库 d标记依赖包 t标记不需要的包 dt合并标记孤立包 57 | sudo pacman -Rs $(pacman -Qtdq) # 删除孤立软件包 58 | sudo pacman -Fy # 更新命令查询文件列表数据库 59 | sudo pacman -F xxx # 当不知道某个命令属于哪个包时,用来查询某个xxx命令属于哪个包 60 | ``` 61 | 62 | 一个好用的图形化包管理软件 63 | 64 | ```bash 65 | yay -S octopi #包管理器前端界面 66 | ``` 67 | 68 | 拓展链接: [官方文档](https://wiki.archlinux.org/index.php/Pacman) 69 | 70 | ## 系统服务的操作与介绍 71 | 72 | Linux 系统中运行着各种服务,你需要掌握查询,变更服务状态的方式。同时对创建服务最好也有大致的了解。这里讲述命令`systemctl`的用法。以 dhcpcd 为例 73 | 74 | ```bash 75 | systemctl start dhcpcd # 启动服务 76 | systemctl stop dhcpcd # 停止服务 77 | systemctl restart dhcpcd # 重启服务 78 | systemctl reload dhcpcd # 重新加载服务以及它的配置文件 79 | systemctl status dhcpcd # 查看服务状态 80 | systemctl enable dhcpcd # 设置开机启动服务 81 | systemctl enable --now dhcpcd # 设置服务为开机启动并立即启动这个单元: 82 | systemctl disable dhcpcd # 取消开机自动启动 83 | systemctl daemon-reload dhcpcd # 重新载入 systemd 配置 扫描新增或变更的服务单元 不会重新加载变更的配置 加载变更的配置用 reload 84 | ``` 85 | 86 | 拓展链接: [systemctl 官方文档](https://wiki.archlinux.org/index.php/Systemd#Basic_systemctl_usage) [systemd 配置文件样例解释](https://www.freedesktop.org/software/systemd/man/systemd.service.html#Examples) 87 | 88 | ## 编辑系统配置文件 89 | 90 | #### 用 sudoedit 编辑配置文件 91 | 92 | 在前面的“[桌面环境与常用应用](../rookie/DE%26App.md)”一节中,我们已经多次编辑了系统配置文件。它们的特点是对系统中的所有用户生效、归 root 用户所有、并且只有 root 用户才拥有写入的权限,这就需要我们用 sudo 提升到 root 权限才能编辑它们。很容易想到用 sudo 命令去运行文本编辑器,以 vim 为例: 93 | 94 | ```shell 95 | sudo vim 你要编辑的文件的路径 96 | ``` 97 | 98 | 但是这样却不是最好的方式,因为它违反了“[最小权限原则](https://zh.wikipedia.org/wiki/%E6%9C%80%E5%B0%8F%E6%9D%83%E9%99%90%E5%8E%9F%E5%88%99)”。因为当我们用 sudo 执行一个命令时,整个进程都会获得 root 权限。也就是说,vim 的所有操作、甚至包括所有的 vim 插件都会在 root 权限下运行,这通常来说是非常危险的。有的文本编辑器甚至会在检测到自身以 root 权限运行的时候拒绝运行,以避免做出危险的操作。 99 | 100 | 反过来考虑,只是编辑一个文件不需要那么强大的权限,我们只需要拥有对这一个配置文件的读写权限就足够了。而 `sudoedit`(或 `sudo -e`,二者是完全等效的)是编辑一个系统配置文件的最佳实践。 101 | 102 | ```shell 103 | EDITOR=vim sudoedit 要编辑的文件 104 | ``` 105 | 106 | sudoedit 命令大致是这样工作的:它会先创建一份普通用户有权编辑的临时文件,把要编辑的文件以 root 权限复制到这个临时文件中,接着根据 EDITOR 等环境变量,**以普通用户的权限**运行文本编辑器。在文本编辑器编辑完成并退出后,它会再次以 root 权限用这个编辑好的临时文件去覆盖掉原先的配置文件。 107 | 108 | 关于 sudoedit 的更多信息,详见 [sudo 的手册](https://man.archlinux.org/man/sudo.8.en#e)。 109 | 110 | #### 配置文件的语法高亮 111 | 112 | 严格来说这不是一个关于 sudoedit 的问题,而是一个关于文本编辑器的问题,但是它经常在用 sudoedit 编辑文件时遇到。 113 | 114 | 因为 sudoedit 会创建一个随机名称的临时文件,文本编辑器可能不认识这个文件名,不知道该启用什么语法的高亮显示。这时候就需要我们主动告诉文本编辑器该使用什么语法,以 vim 为例,可以在命令行模式下用如下设置语法: 115 | 116 | ```vim 117 | :set syntax=文件的语法 118 | ``` 119 | 120 | 另一个问题是如何知道语法的名称。一方面我们可以用搜索引擎搜索,或者在 vim 的内置插件里寻找,不过对于那些普通用户也能读取的配置文件,可以直接用 vim 去查看它,这时候 vim 会以只读模式打开文件,但是会根据文件名启用语法高亮。这样只需要在命令行模式下运行: 121 | 122 | ```vim 123 | :set syntax 124 | ``` 125 | 126 | 即可查看当前 vim 所使用的高亮语法。 127 | 128 | #### 编辑 sudoers 配置文件 129 | 130 | 在前面我们编辑过 sudoers 配置文件。sudoers 算是系统配置文件中的一个特例,编辑它的最佳实践不是使用 `sudoedit`,而是 `visudo` 命令。 131 | 132 | ```shell 133 | sudo visudo # visudo 需要使用 root 权限运行。默认编辑 /etc/sudoers 134 | sudo visudo -f 要编辑的sudoers文件的路径 # 也可以指定文件路径 135 | ``` 136 | 137 | visudo 与 sudoedit 类似的是,它也会把要编辑的配置文件先复制到一个临时文件,再调用文本编辑器编辑,而不同的是,在开始编辑之前 visudo 还会锁定正在编辑的 sudoers 文件,以此避免两个人同时对它编辑;并且会在编辑完成之后检查 sudoers 的语法,如果发现错误则会拒绝这次编辑的结果。 138 | 139 | 这是因为,如果在 sudoers 文件中遇到语法错误,sudo 为了安全性,会让整个 sudoers 配置文件都不生效。这样的话,如果普通用户不慎改坏了 sudoers 文件,则有可能失去使用 sudo 命令的权限,就好像“关上了大门并把自己关在了外面”,这时候就需要直接用 root 用户登录甚至需要 live USB 急救才行。而 visudo 检查 sudoers 语法就可以很大程度上避免这种情况发生。 140 | 141 | 另一方面,visudo 需要使用 root 身份运行,这意味着它的文本编辑器实际上也是以 root 身份运行的,这一点与 sudoedit 不同。为了安全,可以配置为只使用某些受限制的“安全的”文本编辑器来编辑 sudoers 文件。详见 [ArchWiki](https://wiki.archlinux.org/title/Sudo#Using_visudo) 以及 [sudoers 手册](https://man.archlinux.org/man/sudoers.5)中的 editor 一节和 [env_editor](https://man.archlinux.org/man/sudoers.5#env_editor) 一节。 142 | 143 | 关于 visudo 的更多内容详见[手册](https://man.archlinux.org/man/visudo.8)。 144 | 145 | ## 文件传输与系统备份 146 | 147 | 有一点 Linux 经验读者应该知道[scp]()这个命令。它常被用来在服务器间传输文件。但是目前它应该被更现代的工具[rsync](https://wiki.archlinux.org/index.php/Rsync)替代,其拥有即时压缩,差量传输等新特性。同时,`rsync`也被用来进行备份操作。 148 | 149 | ```bash 150 | rsync foo.txt me@server:/home/me/ # 最基础的复制文件 与scp的操作完全相同 151 | rsync -a bar/ me@server:/home/me/ # -a 标记实现目录复制等 比scp -r 能更好的处理符号链接等情况 152 | ``` 153 | 154 | 关于全盘备份,请阅读[官方文档](https://wiki.archlinux.org/index.php/Rsync#Full_system_backup)。 155 | 156 | ## 文件解压缩 157 | 158 | 除了众所周知的 tar 命令,我们在之前安装过的 [ark](https://archlinux.org/packages/extra/x86_64/ark/) 包可以配合 dolphin 文件管理器轻松的右键直接解压缩,其可选依赖提供了各个压缩格式的支持,可以自行选择安装。需要注意的是解压 windows 下的压缩包,可能会乱码,安装 ark 的可选依赖之一 unarchiver,使用 unar 可以避免这个问题。 159 | 160 | ```bash 161 | sudo pacman -S unarchiver 162 | unar xxx.zip 163 | ``` 164 | 165 | ## 系统硬件信息检测 166 | 167 | 磁盘检测可使用 [smartmontools](https://archlinux.org/packages/extra/x86_64/smartmontools/) 168 | 169 | ```bash 170 | sudo smartctl -A /dev/sda #硬盘 171 | sudo smartctl -d sat -A /dev/sdc #usb设备 172 | ``` 173 | 174 | 磁盘空间分析可直接使用 df 命令,也可使用 [Filelight](https://archlinux.org/packages/extra/x86_64/filelight/)图形化界面直观查看磁盘占用情况 175 | 176 | ```bash 177 | df -h 178 | ``` 179 | 180 | cpu 与显卡的信息查看可使用如下两款软件 181 | 182 | ```bash 183 | yay -S cpu-x 184 | yay -S gpu-viewer 185 | ``` 186 | 187 | 使用 [dmidecode](https://archlinux.org/packages/extra/x86_64/dmidecode/) 可以完整查看系统绝大部分硬件信息,包括较难得到的内存频率,主板 BIOS 等等。 188 | 189 | ```bash 190 | sudo dmidecode 191 | ``` 192 | 193 | ## 制作 windows10 启动盘 194 | 195 | 你可能在 linux 下,有时需要制作 win10 的启动盘。在以往,在 linux 下制作一个 win10 启动盘还是很简单的,但是随着近几年微软的更新,其 iso 安装镜像中存在一个名为`install.wim`的文件,其大小已经超出了 4GB,超出了 fat32 所要求的单个文件最大 4GB 的限制。这使得必须用额外的步骤才能制作一个启动盘。这里依旧使用 fat32 格式是因为其兼容性是最好的,ntfs 的 uefi 启动盘很多情况下不被识别。 196 | 197 | 首先和基础安装中的部分步骤类似,首先用 parted 命令创建 U 盘的分区 label 为 gpt。接下来用 cfdisk 命令创建新分区,在 Type 中选择 Microsoft basic data。接下来使用 mkfs.vfat 命令格式化所创建的分区。这样 U 盘就准备好了。 198 | 199 | 接下来下载 win10 的 iso 镜像并解压。在某些文件管理器中,你会得到如下错误。 200 | 201 | ```bash 202 | This disc contains a "UDF" file system and requires an operating system 203 | that supports the ISO-13346 "UDF" file system specification.w 204 | ``` 205 | 206 | 这种情况下则需要手动挂载并复制出来 207 | 208 | ```bash 209 | mount -o loop /path/of/windows10.iso /mnt/your/mountpoint 210 | ``` 211 | 212 | 得到复制出来的文件后,最后要进行的就是压缩 install.wim 文件,这里需要首先安装一个包 213 | 214 | ```bash 215 | sudo pacman -S wimlib 216 | ``` 217 | 218 | 接下来进行压缩,这一步会持续较长时间,耐心等待。完成后可以看到文件已经被压缩到了 3.x GB。 219 | 220 | ```bash 221 | sudo wimlib-imagex optimize install.wim --solid 222 | ``` 223 | 224 | 最后把全部文件复制到 U 盘中即可。 225 | 226 | Ref: [[1]](https://www.dedoimedo.com/computers/windows-10-usb-media-linux.html) 227 | -------------------------------------------------------------------------------- /docs/advanced/beauty.md: -------------------------------------------------------------------------------- 1 | # 系统美化 2 | 3 | 本文讲述如何配置以让 KDE 桌面环境看起来更加拥有美感。 4 | 原则:美化不应该付出大量的时间折腾,既没有实际用处,也没有意义。花最少的时间完成性价比最高的美化始终是第一原则。 5 | 在美化部分,需要设置代理之后再使用`系统设置`的功能,如下载主题等。否则网速会非常慢,甚至无法使用。 6 | 经测试,需通过 proxychains 或设置全局透明代理将网络连接重定向到代理。 7 | 8 | ```bash 9 | proxychains systemsettings5 #通过代理打开系统设置 10 | ``` 11 | 12 | > 在 KDE 相关软件更新前后,出现过第三方主题不稳定/卡顿的问题,再次强调不要美化魔改的太过,这会添加更多的不确定性,让你的桌面稳定性下降。 13 | 14 | ## 壁纸 15 | 16 | 在桌面右键,选择`配置桌面`。在新出现的窗口中右下角选择`添加图片`可以选择你想要的图片。其中`位置`一项选择'缩放,保持比例',`背景`一项选择'模糊'。这样你就可以拥有一个成比例,且边缘带有高斯模糊的漂亮的桌面壁纸。 17 | 18 | ## 系统主题 19 | 20 | 使用一个高质量的系统主题可以直线提升系统的美观程度。_系统设置_ > _外观_ > _全局主题_ > _获取新的全局主题_ ,搜索主题 layan,进行设置即可。 顺便说一句,这个主题的作者 vinceliuice 是一位中国大佬,是一位设计师,他设计的主题以及图标的质量都很高,你可以去他的[主页](https://www.pling.com/u/vinceliuice/)为他打分和点赞。 21 | 22 | > 如果切换主题后,windows 键不能呼出菜单,可在左下角右键,配置程序启动器,在键盘快捷键中重新设置`windows+F1`键,windows 键会显示为 Meta 键。 23 | 24 | ## 窗口装饰 25 | 26 | 在 _系统设置_ > _外观_ > _窗口装饰_ 中,获取新窗口装饰,搜索 layan,并应用即可。 27 | 28 | ## 系统图标 29 | 30 | 如果主题中的图标不能满足你,那么可以选择一些自定义的图标。_系统设置_ > _外观_ > _图标_ > _获取新图标主题_ ,搜索图标名 Tela-icon-theme,进行安装设置即可。 31 | 32 | ## SDDM 主题 33 | 34 | 你应该注意得到,输入密码时默认的登录界面是很丑的,这里也可以替换掉。_系统设置_ > _开机和关机_ > _登录屏幕(SDDM)_ > _获取新登录屏幕_ ,搜索 SDDM 主题 layan 并设置即可 35 | 36 | ## 欢迎屏幕(splashscreen) 37 | 38 | 可以对在登录界面后的欢迎屏幕进行美化。 _系统设置_ > _外观_ > _欢迎屏幕_ > _获取新欢迎屏幕_ ,搜索 miku 进行设置即可。这个`Snowy Night Miku`是我们搜索到的最好看的二刺猿属性的初始界面了。另外,还有一个大佬做了一些二次元主题的欢迎屏幕,但是质量一般,这里是他的[主页](https://www.pling.com/u/thevladsoft/)。 39 | 40 | ## 桌面插件 41 | 42 | 在任务栏空白处右键,选择编辑面板,添加部件。 43 | 44 | - Netspeed widget 网速组件,这个很实用 45 | - todolist 任务组件 46 | 47 | 然后把你经常使用的软件固定在任务栏即可。 48 | 49 | KDE Plasma 5.22.1 更新后,需要额外安装 ksysguard 才能确保桌面插件的正常运行。[[1]](https://github.com/dfaust/plasma-applet-netspeed-widget/issues/28) 50 | 51 | ## 混成器 52 | 53 | _系统设置_ > _显示和监控_ > _混成器_ 开启混成器 54 | 55 | ## 终端样式设置 56 | 57 | 打开 konsole, _设置_ > _编辑当前方案_ > _外观_ ,选择`Red-Black` 应用确认即可。 58 | 59 | ## Kvantum Manager 60 | 61 | 主题配合 Kvantum Manager 可以达到更好的效果。 62 | 63 | ```bash 64 | sudo pacman -S kvantum 65 | ``` 66 | 67 | 在[这里](https://www.pling.com/p/1325246/)下载 Layan 的 Kvantum 主题,并解压。打开 Kvantum Manager,选择主题并安装,接下来在`Change/Delete Theme`中选择 Layan,Use this theme。最后在系统设置,外观中的应用程序风格中选择 kvantum 即可。 68 | 69 | > 如果透明的效果没有显示,确保 KDE 的全局缩放比例为整数倍。或者尝试切换混成器中 openGL 的设置。 70 | 71 | ## GRUB 主题 72 | 73 | [官方文档](https://wiki.archlinux.org/title/GRUB/Tips_and_tricks#Theme) 74 | 75 | 在[pling](https://www.pling.com/browse/cat/109/order/latest/)选择下载你想要的 GRUB 主题,比如这个[二刺螈主题](https://www.pling.com/p/1526503/)。接下来 `cd` 进解压出来的文件夹,打开 konsole 输入 76 | 77 | ```bash 78 | sudo cp -r . /usr/share/grub/themes/Nino 79 | ``` 80 | 81 | 以将主题放置在系统的 GRUB 默认文件夹内。 82 | 接着编辑 `/etc/default/grub` 文件,找到 `#GRUB_THEME=` 一行,将前面的注释去掉,并指向主题的 `theme.txt` 文件。即 83 | 84 | ```bash 85 | #GRUB_THEME= 86 | GRUB_THEME="/usr/share/grub/themes/Nino/theme.txt" #修改后 87 | ``` 88 | 89 | 然后再在终端输入 90 | 91 | ```bash 92 | sudo grub-mkconfig -o /boot/grub/grub.cfg 93 | ``` 94 | 95 | 更新 GRUB ,并重启即可。 96 | 97 | ## 开机动画 98 | 99 | [Plymouth](https://fedoraproject.org/wiki/Releases/FeatureBetterStartup) 是一个来自于 Fedora 社区的提供美化启动图形界面的功能的项目,如有需要,可以参考[官方文档]()进行配置。不建议新手在此项配置上花费太多时间。 100 | 101 | --- 102 | 103 | 其余 KDE 桌面有很多配置项,大家可以自行探索。 104 | -------------------------------------------------------------------------------- /docs/advanced/troubleshooting.md: -------------------------------------------------------------------------------- 1 | # 常见问题排除与解决 2 | 3 | 本节描述一些在日常使用过程中你有很大概率可能遇到的问题,并提供解决方法。 4 | 5 | ### 使用 BIOS+GPT 模式安装 Arch Linux 6 | 7 | 虽然使用传统 BIOS 模式安装的场景已经越来越少,但是在某些特殊场景,如在 VPS 上安装 Arch Linux,可能依然需要使用到 BIOS 模式。本小节讲述在使用 BIOS+GPT 模式安装时,与 UEFI+GPT 模式安装的不同点,其中绝大多数步骤是相同的。 8 | 9 | - 安装前,在主板的 BIOS 设置中,或在 VPS 的启动设置中(如有),将启动模式调整为传统 BIOS 模式启动。 10 | - 在分区时,需要额外分出一个 2M 大小的 BIOS boot 模式的分区,此分区无需进行格式化与挂载。 11 | - 在安装引导程序时,对应的命令修改为: `grub-install --target=i386-pc /dev/vda` 以及 `grub-mkconfig -o /boot/grub/grub.cfg`。其中,第一条命令中的`/dev/vda`为安装 GRUB 的磁盘,而非分区。具体的名字根据安装者的实际情况进行更改。 12 | 13 | ### 静态 IP 设置 14 | 15 | 虽然使用可以自动获取 ip 地址的工具可以覆盖绝大多数场景,但是仍有部分特殊场景,如校园网,VPS 等环境下需要进行静态 IP 的设置。本小节给出一个简略的设置静态 IP 的方式。如需要设置静态 IP,需要首先禁用 dhcpcd 或 NetworkManager 等自动获取 ip 的工具。 16 | 17 | ```bash 18 | sudo systemctl stop dhcpcd NetworkManager 19 | sudo systemctl disable dhcpcd NetworkManager 20 | ``` 21 | 22 | 接下来启用 systemd-networkd 23 | 24 | ```bash 25 | sudo systemctl enable --now systemd-networkd 26 | ``` 27 | 28 | 使用`ip ad`命令查看当前网卡的名字,如这里使用名字 ens3。随后创建配置文件`/etc/systemd/network/10-static-ens3.network`。接下来在其中填入内容。其中的 ip 地址和网关需要从你的网络提供商处获取。其中的 DNS 设置同样需要在`/etc/resolv.conf`中按照前文中的方式进行设置。 29 | 30 | ```conf 31 | [Match] 32 | Name=ens3 33 | 34 | [Network] 35 | Address=YOUR_IPV4_ADDRESS/MASK 36 | Gateway=YOUR_IPV4_GATEWAY 37 | DNS=8.8.8.8 38 | 39 | [Network] 40 | Address=YOUR_IPV6_ADDRESS/MASK 41 | Gateway=YOUR_IPV6_GATEWAY 42 | DNS=2001:4860:4860::8888 43 | ``` 44 | 45 | 最后,重启服务即可。 46 | 47 | ```bash 48 | sudo systemctl restart systemd-networkd 49 | ``` 50 | 51 | ### 鼠标出现按键不灵敏或失灵的现象 52 | 53 | 一般来说大多数鼠标都是即插即用的,但 5.14 内核前后更新后可能遇到失灵的情况。根据自身鼠标品牌安装对应的驱动即可解决。[[1]](https://openrazer.github.io/#arch) 54 | 55 | ### 关机时卡住很久才能关机 56 | 57 | 一般屏幕会出现形如`A stop job is running for...(1m30s)`的信息,这是经常会遇到的关机卡住 1 分 30 秒的问题,一般来说这种情况是出现了某个进程在关机时不愿停止,需要等到超时时间到达强行停止。通用的解决办法是调整缩短这个等待时间,建议从 1 分 30 秒调整至 30 秒,30 秒已经足够几乎所有进程正常结束。 58 | 59 | 编辑 `/etc/systemd/system.conf` 60 | 61 | ```bash 62 | sudo vim /etc/systemd/system.conf 63 | ``` 64 | 65 | 找到其中`DefaultTimeoutStopSec`一项,将其前方的井号去掉,并赋值为 30s 即可。最后执行 daemon-reload 使其生效。 66 | 67 | ```bash 68 | sudo systemctl daemon-reload 69 | ``` 70 | 71 | 上述解决方案其实只是将这个等待时间缩小了,并没有解决实际问题。如果你想排查问题真正的原因所在,在关机时如果出现了`A stop job is running for...(1m30s)`的信息,耐心等待其结束关机,然后重新启动电脑,执行以下命令: 72 | 73 | ```bash 74 | journalctl -p5 75 | ``` 76 | 77 | 按/(斜杠键)搜索`Killing`关键字,找到你关机的时间附近所在的匹配行,你可以在附近看到到底是哪一个进程导致了 timeout,然后再去排查这个进程有什么问题即可。 78 | 79 | ref: [[1](https://forum.manjaro.org/t/a-stop-job-is-running-for-user-manager-for-uid-1000-during-shutdown/37799)][[2](https://unix.stackexchange.com/questions/273876/a-stop-job-is-running-for-session-c2-of-user)] 80 | 81 | ### 磁盘容量不足的处理方式 82 | 83 | 一般使用 LVM 安装 Linux 系统则不用担心这种情况发生。但是我们使用的是传统的 ext4 经典分区方式。这种情况下一般建议在安装的开始就将根目录设置的大一些,如 100G。如果/home 分区大小不够了,可以新安装一块硬盘,将其挂载到你想要的位置,再按照`基础安装`的步骤中重新 genfstab 一下就行了。 84 | 85 | 除此之外,如果根目录容量不足,可以不定期清理一下 pacman 的缓存,详见[archwiki](https://wiki.archlinux.org/title/Pacman#Cleaning_the_package_cache)。太长不看的可以直接用下面这一行命令清理没有安装的所有缓存的包,和没有被使用的同步数据库。 86 | 87 | ```bash 88 | sudo pacman -Sc 89 | ``` 90 | 91 | ### 软件的降级 92 | 93 | 在 archlinux 上 偶尔会出现某一个包的最新版本有各种问题的情况,如某些软件过新, 而一些依赖并没有支持,比如[virtualbox 在 linux5.18 内核下的崩溃](https://bugs.archlinux.org/task/74900),此时需要降级该包以正常使用。包可以是普通软件,也可以是内核。 94 | 95 | ```bash 96 | yay -S downgrade 97 | ``` 98 | 99 | 安装此包即可,使用方法也很简单,downgrade 后加上需要降级的包名即可,随后会提示你选择需要降级到的版本,点选即可。 100 | 101 | ### 升级系统时出现形如 unable to lock database 的错误 102 | 103 | 可能存在升级系统时异常关机或程序异常退出的情况,或者多个 pacman 的相关程序在同时执行。移除 pacman 的 db 锁即可 104 | 105 | ```bash 106 | sudo rm /var/lib/pacman/db.lck 107 | ``` 108 | 109 | ### 手动开关混成器 110 | 111 | 有时混成器会因为某些原因需要手动开启或关闭,但是目前在 KDE 下混成器在设置里无法在不关机的情况下直接关闭,下面命令提供手动开关混成器的效果。[[1]](https://unix.stackexchange.com/questions/597736/disabling-kwin-compositor-from-command-line) 112 | 113 | ```bash 114 | qdbus org.kde.KWin /Compositor suspend #禁用 115 | 116 | qdbus org.kde.KWin /Compositor resume #开启 117 | 118 | 119 | ``` 120 | 121 | ### 屏幕溢出: overscan 122 | 123 | 在连接一些老式的显示设备时,可能与出现[overscan](https://en.wikipedia.org/wiki/Overscan)的现象,简单来说就是电视屏幕四圈会有一圈溢出了,不显示出来。对于英特尔核芯显卡,可以选择 intel panel fitter 的方式[[1]](https://askubuntu.com/questions/508358/overscanning-picture-problem-using-hdmi-with-intel-graphics)。最后就是要加入到一个 service 里开机自动启动,并且是在 DE 加载完成后执行[[2]](https://unix.stackexchange.com/questions/397853/how-to-set-a-systemd-unit-to-start-after-loading-the-desktop)。 124 | 125 | ``` 126 | sudo intel_panel_fitter -p A -x 1230 -y 700 127 | ``` 128 | 129 | --- 130 | 131 | ## Ref 132 | 133 | - [[1]GUID 分区表*(GPT)*特殊操作]() 134 | -------------------------------------------------------------------------------- /docs/advanced/undervoltage.md: -------------------------------------------------------------------------------- 1 | # 功耗控制 2 | 3 | 针对散热不好的设备,功耗控制显得非常必要。这里说的功耗控制不是指直接对处理器的频率做出限制,而是对处理器的电压进行最大限度的下探,在挖掘 cpu 体质的极限的同时,起到既能降低发热,又能最大限度保持性能的效果。除了电压的下探,同时也可以尝试对处理器的功率墙(又常被称为 TDP)做出降低的限制,比如考虑这种情况,在 cpu 满睿频时,其实不需要默认的那么多功耗来维持,也许在默认功耗的基础上减几瓦,也能维持满睿频,这样就又可以进一步降低温度。对功率墙进行限制不同于对电压进行下探,若限制功率墙的参数较低,这会不可避免的损失较多的性能,但是在散热过差的设备上这也是一个好办法。 4 | 5 | ## 电压下探 6 | 7 | [官方参考文档](https://wiki.archlinux.org/index.php/Undervolting_CPU) 8 | 9 | 如果正常操作,降低电压一般不会损害 cpu,一般建议从 50 毫伏进行尝试,每次降压尝试多增加 10 毫伏。只要确保在降低电压前,系统中任务均被正确保存即可。网络上传言的降低 cpu 电压会"缩肛"是谣言[[1]](https://www.zhihu.com/question/62335676)。 10 | 11 | ### 英特尔 四代酷睿 Haswell 及更新的 cpu 12 | 13 | 如文档中所说,使用 intel-undervolt 即可降压。对于其配置文件中降压部分的五个参数含义如下: 14 | 15 | - 0:cpu 核心电压 16 | - 1:cpu 核芯显卡电压 17 | - 2:cpu 缓存电压 18 | - 3:系统周边电压,与内存等设备相关 19 | - 4:模拟 I/O 电压 20 | 21 | 一般来说只调整 0 和 2 两项电压即可。 22 | 23 | 在调整完电压,apply 之后,可以尝试使用 [s-tui](https://archlinux.org/packages/community/any/s-tui/) 这个工具进行烤机测试,同时观察温度、频率、TDP 的数据。 24 | 25 | 在调整到一个合适的降压配置后,开启其对应 service 即可。 26 | 27 | ```bash 28 | sudo systemctl enable --now intel-undervolt 29 | ``` 30 | 31 | ### 英特尔 四代酷睿 Haswell 之前的 cpu 32 | 33 | arch 官方文档中提到,二代酷睿及以前的 cpu 可使用 PHC 的方式进行降压。经测试,在 i7-2760QM 上不能直接使用,需要在内核启动参数中加入`intel_pstate=disable`才能正确识别到 phc 的 driver,[参考 1](https://wiki.archlinux.org/index.php/CPU_frequency_scaling),可用命令`cpupower frequency-info`验证。接下来进行降压尝试,按照 archwiki 的操作始终不能更改 phc_vid 文件,其中内容始终为 0,即便已经用 vim 将其更改为其他值。也许是 cpu/主板 BIOS 不支持降频。翻阅了 phc-intel 的官方文档,其说明只支持酷睿,酷睿 2 及之前的 cpu 系列,不支持酷睿 i,这与 archwiki 的描述相矛盾。 34 | 35 | 对于夹在中间的三代酷睿 lvy bridge,[有项目](https://github.com/tiziw/iuvolt)称可以使用 intel-undervolt 的原理进行降压,但是经测试失败了,尝试用 PHC 的方式依旧失败。目前应该没有什么好的办法可以降压三代酷睿。 36 | 37 | 对于此范围内的老设备降压,我将不会花费更多时间探索。如果你知道有办法可以正确降压,欢迎提交 PR,或[进群讨论](https://t.me/FSF_Ministry_of_Truth)。 38 | 39 | ref: [[1]](https://www.reddit.com/r/intel/comments/8ubdsg/undervolting_intel_i5_3230m/) [[2]](https://forum.thinkpads.com/viewtopic.php?t=128707) 40 | 41 | ### AMD 42 | 43 | 可按照 wiki 中使用 amdctl 尝试降压。 44 | 45 | ## 降低功率墙 46 | 47 | 对于功率墙的调整,有些主板在 BIOS 中提供了设置项可以直接调整。对于没有设置项的主板,有的主板是锁定了瞬时和长时功率墙,这种情况就无法调整功率墙了。有的主板 BIOS 随没有提供功率墙调整项,但依旧可以通过命令行设置。通过以下的命令可以查看主板是否可以调整功率墙。 48 | 49 | ```bash 50 | grep . /sys/class/powercap/intel-rapl/intel-rapl:0/* 51 | ``` 52 | 53 | 如果在输出中看到了如下的 enable 值为 1,即可以调整。第一行的代表现有的功率墙限制。 54 | 55 | ```bash 56 | /sys/class/powercap/intel-rapl/intel-rapl:0/constraint_0_power_limit_uw:100000000 57 | /sys/class/powercap/intel-rapl/intel-rapl:0/enabled:1 58 | ``` 59 | 60 | 具体的调整步骤参考[这个链接](https://askubuntu.com/questions/1226254/set-max-tdp-of-intel-h-series-cpu)。有空的时候我再翻译整理。 61 | 62 | Ref: [[1]](https://askubuntu.com/questions/1231091/tee-constraint-0-power-limit-uw-no-data-available),[[2]](https://miloserdov.org/?p=1932),[[3]](https://zhuanlan.zhihu.com/p/25537264) 63 | 64 | 此外,intel-undervolt 也可直接进行功率墙限制。如看到`package power limit is locked`,则说明这台电脑不可更改功率墙。 65 | -------------------------------------------------------------------------------- /docs/arch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArchLinuxStudio/ArchLinuxTutorial/2c1fff9e3c0831b332588f6f15720b4ba2f068f4/docs/arch.png -------------------------------------------------------------------------------- /docs/arch_christmas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArchLinuxStudio/ArchLinuxTutorial/2c1fff9e3c0831b332588f6f15720b4ba2f068f4/docs/arch_christmas.png -------------------------------------------------------------------------------- /docs/arch_og.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArchLinuxStudio/ArchLinuxTutorial/2c1fff9e3c0831b332588f6f15720b4ba2f068f4/docs/arch_og.png -------------------------------------------------------------------------------- /docs/arch_seo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArchLinuxStudio/ArchLinuxTutorial/2c1fff9e3c0831b332588f6f15720b4ba2f068f4/docs/arch_seo.png -------------------------------------------------------------------------------- /docs/christmas-hat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArchLinuxStudio/ArchLinuxTutorial/2c1fff9e3c0831b332588f6f15720b4ba2f068f4/docs/christmas-hat.png -------------------------------------------------------------------------------- /docs/contribution.md: -------------------------------------------------------------------------------- 1 | # 贡献文档与代码 2 | 3 | 点击本文右上角的 github 图标,即可查看本工程。在每一页的最下方也有`编辑本文`的链接,点击即可跳转到 github 编辑。 4 | 5 | 本书的大纲目录由项目组成员把控,文章内容可自由编辑。本书主线内容以实用为主旨,只提供一条我们认为当前较优的、简洁的安装主线。冗余且无意义的内容不被接受。 6 | 7 | 对于项目资源的添加,如图片,非必要 js 文件,非必要 css 文件等均不被接受。因为某些国家对于 github 的封锁和限制,导致直连下如有此类文件会更大的拖慢网页加载速度。 8 | 9 | 本项目最初采用 CC BY-SA 4.0 许可,最终改用 CC BY-NC-ND 4.0 许可,原因参见[Why we changed the license to CC BY-NC-ND 4.0](https://github.com/ArchLinuxStudio/ArchLinuxTutorial/issues/68)。 10 | 11 | ## 文档贡献 12 | 13 | 文档贡献非常简单,你只需要拥有一个编辑器,将工程 fork,修改,提交 pull request 即可。注意,如果你提交了一个语言的相关修改,请同时提交另外一种语言对应的修改。 14 | 15 | ## 格式约定 16 | 17 | 本系列文档的理念是不必过于苛求格式,因为内容才是真正重要的东西。但是也有少量规范必需遵守,否则会影响阅读。 18 | 19 | - 使用 OSS code 进行开发,配合 Prettier 插件默认配置进行格式化代码,写完部分文档后使用 ctrl+s 自动格式化保存。 20 | - 每个 md 文档标题按层级编排内容,大标题为#,其次##,再次###,以此类推。 21 | - 代表片段需用 markdown 语法包裹,并指定代码类型,如 bash。 22 | - 一般情况下,请尽量正常使用句号、顿号、引号、冒号等标点符号。 23 | - 需要引起注意的部分可使用 markdown 引用语法。 24 | - 专有名词可使用行内代码``语法进行提示,其比加粗更为明显。 25 | - 行内代码请使用行内代码进行提示。 26 | 27 | ## 代码贡献 28 | 29 | 本工程使用 [docsify](https://docsify.js.org/#/) 编写而成。如果想贡献相关代码请先阅读 docsify 的项目文档。 30 | 31 | 本工程使用 yarn 管理依赖,结构非常简单。如果没有接触过,你可能需要简单了解一下[yarn](https://classic.yarnpkg.com/en/) 32 | 33 | 本地调试 34 | 35 | ```bash 36 | yarn install 37 | yarn start 38 | ``` 39 | -------------------------------------------------------------------------------- /docs/exclusive/code.md: -------------------------------------------------------------------------------- 1 | # 编程软件 2 | 3 | 很多人不清楚的是,Linux 几乎是最适合编程的操作系统,其对于各个方向的编程支持非常到位(微软与苹果的专有系统编程除外),可以为你省去很多痛苦。本文介绍各个编程方向优质的软件介绍。我们建议读者使用自由软件进行编程工作,本节也仅列出自由软件。 4 | 5 | ## 前端编程 6 | 7 | 对于前端来说,一般需要浏览器以及 IDE(或编辑器) 即可,附加一些网络工具。 8 | 9 | 关于 IDE(或编辑器),可以使用 [OSS code](https://archlinux.org/packages/extra/x86_64/code/),它是由官方仓库的生成的开源构建。[vscodium-bin](https://aur.archlinux.org/packages/vscodium-bin/)AUR是社区驱动的 vs code 版本。 10 | 11 | > 微软公司 Visual Studio Code 的二进制构建实际为专有软件。很多人在此存在误解。如此偷梁换柱的手段越来越被更多公司发掘使用。[[1]](https://carlchenet.com/you-think-the-visual-studio-code-binary-you-use-is-a-free-software-think-again/) 12 | 13 | 浏览器方面有 [firefox](https://archlinux.org/packages/extra/x86_64/firefox/),[chromium](https://archlinux.org/packages/extra/x86_64/chromium/),[firefox-developer-edition](https://archlinux.org/packages/extra/x86_64/firefox-developer-edition/),[brave](https://aur.archlinux.org/packages/brave-dev-bin/)AUR等众多软件可供选择。 14 | 15 | 网络工具常使用 [httptoolkit](https://aur.archlinux.org/packages/httptoolkit/)AUR(作为 charles 的代替),以及 [wireshark-qt](https://archlinux.org/packages/extra/x86_64/wireshark-qt/)。 16 | 17 | 至于 [yarn](https://archlinux.org/packages/extra/any/yarn/)、[npm](https://archlinux.org/packages/extra/any/npm/) 等前端常用工具,也均可用 pacman 安装。 18 | 19 | ## 后端编程 20 | 21 | Jetbrains 公司开源的 IDE 可在 archlinux 官方仓库中找到,如[IntelliJ Idea](https://archlinux.org/packages/extra/x86_64/intellij-idea-community-edition/),[PyCharm](https://archlinux.org/packages/extra/x86_64/pycharm-community-edition/)等。 22 | 无开源版本的 Jetbrains 产品也可以在 AUR 社区中找到,如[rubymine](https://aur.archlinux.org/packages/rubymine),[webstorm](https://aur.archlinux.org/packages/webstorm)。但可能只提供了安装而未提供卸载,如[jetbrains-toolbox](https://aur.archlinux.org/packages/jetbrains-toolbox) 23 | 24 | > Jetbrains 产品在 linux 下输入法均会产生光标不跟随的现象,Jetbrains 一直未修复该 bug,解决办法为[替换 jbr](https://github.com/RikudouPatrickstar/JetBrainsRuntime-for-Linux-x64) 25 | 26 | 较为传统的 IDE 有 [Netbeans](https://archlinux.org/packages/extra/any/netbeans/) 以及 eclipse,eclipse 有多种版本,可在 AUR 中自行搜索。 27 | 28 | 关于编程语言自身,更是不必多说,除了 c 语言和 c++安装好系统即支持外,java, node,等都可以被轻易安装。 29 | 30 | 除了默认安装好的 gcc,也可以安装 clang 以及 llvm 以供使用 31 | 32 | 关于数据库相关软件,也有多种选择。 33 | 34 | - [Mysql Workbench](https://archlinux.org/packages/extra/x86_64/mysql-workbench/) 35 | - [pgadmin4](https://archlinux.org/packages/extra/x86_64/pgadmin4/) 36 | - [dbeaver](https://archlinux.org/packages/extra/x86_64/dbeaver/) 37 | - [robo3t](https://aur.archlinux.org/packages/robo3t-bin/)AUR 38 | - [RESP.app](https://aur.archlinux.org/packages/resp-app/)AUR (原 redis-desktop-manager) 39 | - [rdm-bin](https://aur.archlinux.org/packages/rdm-bin/)AUR 如果上面的编译有问题,可用这个 bin 版本 40 | 41 | 针对大数据方面,可安装[hadoop](https://aur.archlinux.org/packages/hadoop/)AUR等包。如有包长期没有更新或包不存在,如 hbase 和 hive,则只能去官网自行下载并配置。 42 | 43 | 关于软件测试,[junit](https://archlinux.org/packages/extra/any/junit/)等常见软件也可轻松安装,配合你喜欢的 IDE 来使用。 44 | 45 | ## 安卓客户端编程 46 | 47 | 目前来说,安卓开发已经统一到了 [Android Studio](https://aur.archlinux.org/packages/android-studio/)AUR 进行开发。当然传统的 Eclipse 也可以用来使用。常用的安卓模拟器则也可使用[Anbox](https://wiki.archlinux.org/title/Anbox#Installation)或 [Waydriod](https://wiki.archlinux.org/title/Waydroid#Installation)。 48 | 49 | ## 桌面应用编程 50 | 51 | 目前桌面开发较为流行的是 [electron](https://archlinux.org/packages/extra/x86_64/electron/) 和 [Qt](https://archlinux.org/packages/extra/x86_64/qt6-base/) 应用。electron 可直接用 OSS Code 进行开发,Qt 应用使用 [Qt Creator](https://archlinux.org/packages/extra/x86_64/qtcreator/) 进行开发。 52 | 53 | ## 机器学习与深度学习 54 | 55 | 针对机器学习方面的编程,IDE 可使用同后端编程中一样的软件。机器学习常用的[jupyter-notebook](https://archlinux.org/packages/extra/any/jupyter-notebook/) 以及所需要的相关库如[numpy](https://archlinux.org/packages/extra/x86_64/python-numpy/)、[sklearn](https://archlinux.org/packages/extra/x86_64/python-scikit-learn/)、[pandas](https://archlinux.org/packages/extra/x86_64/python-pandas/)等,也均可在源中找到。同时,[tensorflow](https://archlinux.org/packages/extra/x86_64/tensorflow/)、[pytorch](https://archlinux.org/packages/?sort=&q=python-pytorch&maintainer=&flagged=)以及其相关的 cuda 支持包等深度学习相关的包也均可安装使用。 56 | 57 | ## 科学计算 58 | 59 | [SageMath](https://www.sagemath.org/)(原名 Sage)是免费的、自由的数学软件,支持代数、几何、数论、密码学、数值计算和相关领域的研究和教学,可作为 MATLAB 的替代。Sage 的开发模式和 Sage 本身的技术都非常强调开放性、社区性、合作性和协作性:我们在制造汽车,而不是重新发明轮子。Sagemath 的总体目标是为"4M"(即 Maple、Mathematica、Magma 和 Matlab)提供一个可行的、免费的、自由的替代品。SageMath 为目前科学计算领域的大多数开源软件/库统一重写了接口,提供了一种类兼容 python 的语法,可以说集开源数学软件之大成。目前已可部分替代"4M"。 60 | 61 | [Arch Wiki](https://wiki.archlinux.org/title/SageMath) ||| [中文教程及文档](https://www.osgeo.cn/sagemath/index.html) 62 | 63 | ## 逆向工程 64 | 65 | 可安装知名的[ghidra](https://archlinux.org/packages/extra/x86_64/ghidra/)作为 IDA 的替代,更多替代选项可参考[alternativeto](https://alternativeto.net/software/ida/)。除此之外再介绍一个好用的十六进制编辑器[Bless](https://archlinux.org/packages/extra/any/bless/)。 66 | -------------------------------------------------------------------------------- /docs/exclusive/media.md: -------------------------------------------------------------------------------- 1 | # 直播与多媒体制作 2 | 3 | 本节将列出多媒体制作方向的各类优质软件,包括做直播,视频剪辑,图像编辑与绘制等方向所需的软件。 4 | 5 | ## 直播推流及弹幕姬辅助软件 6 | 7 | 直播以及录制在 linux 上使用[obs-studio](https://www.archlinux.org/packages/community/x86_64/obs-studio/)完成,用法与 windows 下基本一致。 8 | 9 | b 站直播时的弹幕可以使用[弹幕库](https://www.danmaku.live/),这个历史比较复杂,v1 版本的仓库在[这里](https://github.com/pandaGao/bilibili-live-helper),但是作者说不更新了。v2 版本的作者目前没有开源,并且说以后[也不会更新了](https://t.bilibili.com/378501835576827480)。AUR:[bilibili-live-helper-bin](https://aur.archlinux.org/packages/bilibili-live-helper-bin/)。 10 | 11 | 除此之外还有一个[bilibili-live-chat](https://github.com/Tsuk1ko/bilibili-live-chat),这是一个浏览器的弹幕实现,风格仿照 youtube 的弹幕风格,也是很多弹幕软件的基础,直接在 web 上使用。除了 B 站直播,twitch 等其他平台的直播方式大同小异,只不过你需要寻找不同的弹幕插件,如在 twitch 上可参考[这篇文章](https://www.bilibili.com/read/cv10092277/)。 12 | 13 | > bilibili-live-chat 等基于浏览器的弹幕姬实现需要使用有浏览器插件集成的 obs, arch 官方仓库中默认的 obs-studio 是无此功能的,如需使用 bilibili-live-chat,请安装 AUR 中的[obs-studio-browser](https://aur.archlinux.org/packages/obs-studio-browser/) 14 | 15 | 如果你使用较新的英伟达显卡,可以使用 NVENC 编码器,这将大大降低直播或录制过程中 cpu 的压力,详情可见[NVIDIA NVENC OBS 指南](https://www.nvidia.cn/geforce/guides/broadcasting-guide/) 16 | 17 | 注意,如果你使用 qv2ray+cgproxy 开启了透明代理,那么需要将 obs 加入到/etc/cgproxy/config.json 的 program_noproxy 的值中。 18 | 19 | ## 视频制作剪辑与特效 20 | 21 | 视频剪辑与制作推荐使用自由软件[shotcut](https://www.archlinux.org/packages/community/x86_64/shotcut/)。它可以满足大多数的视频剪辑制作需求。同类的软件还有[kdenlive](https://www.archlinux.org/packages/extra/x86_64/kdenlive/)以及[mkvtoolnix](https://archlinux.org/packages/extra/x86_64/mkvtoolnix-gui/)。 22 | 23 | 在视频录制时,一些 KDE 的辅助功能非常实用。在 KDE 的系统设置中,找到工作区行为->桌面特效,在无障碍功能中勾选`鼠标定位`与`鼠标点击动效`两项,并使用。这两项设置在视频制作中可以突出的显示鼠标位置与点击效果,对于视频制作来说相当有用。 24 | 25 | 对于键盘的输入,可以安装包[screenkey](https://archlinux.org/packages/community/any/screenkey/),它可以将键盘的键入显示在显示屏上,对于视频的制作同样相当有用。 26 | 27 | ## 绘图、制图与修饰 28 | 29 | 在 linux 上的修饰图片可用[gimp](https://www.archlinux.org/packages/extra/x86_64/gimp/)。如果你需要配合数位板绘图,可使用[krita](https://www.archlinux.org/packages/extra/x86_64/krita/),krita 同时也提供一定的制图功能。矢量图片操作可使用 [inkscape](https://www.archlinux.org/packages/extra/x86_64/inkscape/) 30 | 31 | [Aseprite](https://www.aseprite.org/) 是一款像素艺术绘制工具,可以使用 yay 安装包[aseprite](https://aur.archlinux.org/packages/aseprite/)。 32 | 33 | [RawTherapee](https://archlinux.org/packages/community/x86_64/rawtherapee/) 是一个自由开源的跨平台 RAW 格式图像处理程序。 34 | 35 | [hugin](https://archlinux.org/packages/community/x86_64/hugin/)是一个可以对图片进行景深进行合成、对图片进行拼接的开源软件,可以以此替代 PhotoShop 的自动对齐图层和自动合并图层。 36 | 37 | 至于格式转换,可以使用 [imagemagick](https://archlinux.org/packages/extra/x86_64/imagemagick/) 的 convert 功能进行图片格式之间的转换。 38 | 39 | 手绘以及各种手写需求,可以尝试使用[rnote](https://archlinux.org/packages/community/x86_64/rnote/) 40 | 41 | ## 建模 42 | 43 | - [blender](https://archlinux.org/packages/community/x86_64/blender/) 强大的 3D 建模软件 44 | - [Sweet Home 3D](https://archlinux.org/packages/community/x86_64/sweethome3d/) Sweet Home 3D 是一款免费的家装辅助设计软件。它能帮您通过二维的家居平面图来设计和布置您的家具,还可以用三维的视角浏览整个装修布局的全貌。 45 | - [Synfig Studio](https://archlinux.org/packages/community/x86_64/synfigstudio/) Synfig Studio 是一款免费开源的 2D 动画软件,用于使用矢量和位图图稿创建电影质量的动画。 46 | 47 | ## 音频 48 | 49 | 专业的音频制作可使用如下软件。 50 | 51 | - [Kwave](https://archlinux.org/packages/extra/x86_64/kwave/) Kwave 是 KDE 开发的一款自由开源的音频编辑软件,可以录制、播放、导入和编辑许多音频文件,包括多声道文件。 52 | - [lmms](https://archlinux.org/packages/community/x86_64/lmms/) LMMS 是免费自由开源并且跨平台的作曲工具。通过制作旋律和节拍,合成和混合音频,安排音频片段等方法创作音乐。 53 | - [carla](https://archlinux.org/packages/community/x86_64/carla/) Carla 是一个功能齐全的模块化音频插件主机,支持许多音频驱动程序和插件格式。 54 | - [Ardour](https://archlinux.org/packages/community/x86_64/ardour/) Ardour 是一款自由开源的让你可以在 Linux 上录音、编辑和混音的软件。 55 | - [vcvrack](https://aur.archlinux.org/packages/vcvrack-bin/) VCV Rack 是一款开源、可视化、模块化的音响合成器。 56 | - [Mixxx](https://archlinux.org/packages/community/x86_64/mixxx/) Mixxx 集成了 DJ 使用数字音乐文件进行创造性现场混音所需的工具。 57 | - [MuseScore](https://archlinux.org/packages/community/x86_64/lmms/) MuseScore 是 Muse Group 开发的一个跨平台的自由开源制谱软件。 58 | - [SoundConverter](https://archlinux.org/packages/community/any/soundconverter/) SoundConverter 是 GNOME 桌面的音频文件转换器(这不影响在 Plasma 桌面环境下使用)。 59 | - [Reaper](https://archlinux.org/packages/community/x86_64/reaper/) REAPER 是一个完整的计算机数字音频制作软件,提供完整的多轨音频和 MIDI 录音、编辑、处理、混音和母带制作工具集。 60 | 61 | ## UI/UX 设计 62 | 63 | - [figma-linux](https://github.com/Figma-Linux/figma-linux) figma 在线版,或者使用一个非官方的 Linux figma 桌面端软件 64 | - [Akira](https://aur.archlinux.org/packages/akira/) 使用 Vala 和 GTK 构建的 UI/UX 设计 Linux 原生应用 65 | 66 | ## 字幕制作 67 | 68 | 一般情况来讲,一个视频加上外带的 srt 字幕是较为普遍的情况。这里描述如何为 youtube 视频加入字幕。 69 | 首先要进行视频字幕的下载,这里可以使用一个 chrome 拓展:[YouTube™ 双字幕](https://chrome.google.com/webstore/detail/youtube-dual-subtitles/hkbdddpiemdeibjoknnofflfgbgnebcm),即可下载你所需要的字幕文件。如果你有更方便的下载方式,欢迎告诉我们。 70 | 接下来进行字幕与视频的重新烧录。MKVToolNix 只能做那种分离的字幕,但是 如 B 站等某些视频网站需要上传烧录好的,为了更好的兼容性,建议始终将视频和文件重新烧录。使用 ffmpeg 进行操作: 71 | 72 | ```bash 73 | ffmpeg -i input.mp4 -vf subtitles=input.srt output.mp4 74 | ``` 75 | 76 | 如果需要制作双语字幕(同时显示,而不是分字幕轨道),在 youtube 选择自动翻译后,点击中文,如视频支持,会出现双语字幕的文件下载。如视频不支持双语字幕下载,可以使用两次 ffmpeg 命令,第一次添加主字幕,第二次添加副字幕。第一次操作使用 MarginV 进行垂直方向的区分。更多参数可以自行参考 ffmpeg 文档。 77 | 78 | ```bash 79 | ffmpeg -i hack.mp4 -strict -2 -vf subtitles=hack_zh.srt:force_style='Fontsize=20\,Fontname=FZYBKSJW--GB1-0\,MarginV=30\,Bold=-1\,BorderStyle=1' -qscale:v 3 hack_with_zh.mp4 80 | ffmpeg -i hack_with_zh.mp4 -strict -2 -vf subtitles=hack_en.srt:force_style 81 | ='Fontsize=15\,Fontname=FZYBKSJW--GB1-0\,Bold=-1\,BorderStyle=1' -qscale:v 3 hack_with_double_subtitles.mp4 82 | ``` 83 | 84 | 除此之外,ffmpeg 还可以进行转码等诸多操作,是一个非常强大的工具,其也是很多音视频软件的重要组件。关于 ffmpeg 更多可自行查询。 85 | 86 | ## 视觉小说的素材提取 87 | 88 | 目前一般常用的为 [GARbro](https://github.com/morkt/GARbro),但是其在 linux 下通过 wine 无法正常使用。这里提供一个跨平台的 gal game 内容提取工具[arc_unpacker](https://aur.archlinux.org/packages/arc_unpacker-git/)。详细用法可自行查看其 github。 89 | 90 | 93 | -------------------------------------------------------------------------------- /docs/exclusive/mine.md: -------------------------------------------------------------------------------- 1 | # 加密货币入门 2 | 3 | 本节将简述加密货币的一些基本概念,以及我们的解读。同时,将教授读者如何在 Arch Linux 上进入加密货币的世界。一提到加密货币与挖矿,很多中国读者对加密货币与挖矿有着很深的误解与偏见,这实际上与其国家政府及其控制的媒体、自媒体的宣传导向有关。我们不希望我们的读者被蒙蔽,所以在本文中将进行一些解释。 4 | 5 | ## 什么是加密货币 6 | 7 | 加密货币是一种使用密码学原理来确保交易安全及控制交易单位创造的交易介质。这种维基百科式的描述较难懂。我们尝试用更简单的语言进行描述。加密货币的鼻祖是比特币(BTC),其始发与 2009 年。在比特币的创世区块中,嵌入了一句话`The Times 03/Jan/2009 Chancellor on brink of second bailout for banks.`。这对传统金融行业进行了讽刺,同时表明了创始人中本聪的立场。符合比特币理念的加密货币一般都有如下特点。 8 | 9 | - 去中心化,货币的分布和决策不由中心化的组织,如政府,银行等任何集权形式的组织决定。参与挖矿,就能得到属于自己的一份收益。 10 | - 在正确使用的前提下,一般都能很大程度的保护使用者的个人隐私。 11 | - 货币本身**真正**由其拥有者所持有,真正实现了私有财产不可侵犯。货币的拥有者持有私钥,其他没有私钥的人无法扣押、冻结、没收其加密货币资产。 12 | 13 | ## 为什么使用加密货币? 14 | 15 | 作为自由软件运动的支持者,我们同时支持使用加密货币,原因如下: 16 | 17 | - 第一,使用加密货币对于无处不在的监视与审计进行反抗。在一些国家中,各种应用广泛的支付手段已经被完全绑定实名,以及进行了全面的监视与审查,个人隐私丝毫没有保障。使用加密货币可以很好的保护你自身的隐私。即使不使用 XMR 等能够高度保证隐私的加密货币,仅仅只使用(正确的使用)普通加密货币也能在很大程度上保障你个人的隐私。 18 | - 第二,因为一些国家的法定货币没有或几乎没有信用,使用加密货币可以抵御这种风险,作为资产多样化的一种工具。即使很多政府以及各类名流不断的对加密货币进行禁止和否定,加密货币依然安然度过了十余个年头。法币是否稳定?这个问题读者可以自行思考一些国几十年来法币购买力的变化,一些国家全面禁止加密货币起因何在?读者们应该能够有自己的理解。持有在全世界广泛流通的加密货币,能够提升你在抵御法币风险时的能力,保障自身的权益。 19 | - 第三,即使没有加密货币,恐怖主义、诈骗与洗钱仍然广泛存在于世界,不能因为加密货币可以用于这些用途,就将其归罪与加密货币,这是荒唐的逻辑,提出此类观点的人或组织一般都存在其他的目的。 20 | 21 | 为什么有人反对加密货币? 22 | 23 | - 第一,加密货币在某些极权政府中被视为会威胁其独裁统治的存在,是极其危险与不可控的,所以要进行全面禁止。 24 | - 第二,加密货币已经形成较为庞大的交易市场,其已经对传统的金融行业产生了一定的影响与冲击,所以以巴菲特为首的部分商界代表公开反对加密货币。 25 | - 第三,加密货币在恐怖主义、诈骗与洗钱方面的应用,以及加密货币不环保等较为边缘的理由。 26 | 27 | ## 在 Arch Linux 上进入加密货币的世界 28 | 29 | ### 钱包与地址 30 | 31 | 如果要使用加密货币,首先要拥有一个钱包。目前来说使用最广泛的浏览器钱包是[Metamask](https://metamask.io/),在你所使用的浏览器的扩展商店中,安装 Metamask 插件即可使用。浏览器钱包可以使你方便的使用目前海量的去中心化程序,包括很多金融应用以及社区、游戏等,但是一般来说其安全性并不如其他非托管式钱包以及冷钱包。 32 | 33 | 关于在 Arch Linux 上钱包的选择与地址的获取,在[现代隐私保护指南](https://archlinuxstudio.github.io/ModernSecurityProtectionGuide/#/anonymous_pay)的章节中有详细描述,本文不再赘述。 34 | 35 | 如果你需要匿名购买加密货币的渠道,可以考虑使用[localmonero](https://localmonero.co/)提供的购买门罗币的服务。在购买后门罗币地址间的互转是匿名的,对外部不可见的。如需转换门罗币至其他币种,以使用非中国大陆的加密货币兑换平台如[changenow](https://changenow.io/)。 36 | 37 | ### 挖矿 38 | 39 | 挖矿是进入加密货币世界最直接的方式,本节描述如何在 Arch Linux 中进行加密货币挖矿。 40 | 41 | 由于我们的读者大多来自中国,他们通过正规且安全的渠道购买加密货币的手段已经越来越少,从 2022 年目前来看,他们可以获取加密货币的途径只有以下几种: 42 | 43 | - 使用仍允许中国用户进行交易的交易所进行买入 44 | - 线下交易 45 | - 通过挖矿获取 46 | 47 | 通过简单的搜索即可发现,目前仍可使用的交易所,某些具有强劲的政府背景,这样的交易所几乎无法保证安全。即使你可以通过此类交易所进行买入与转出,与你实名认证相关的持有、交易、提现到链的记录也可以被轻松获取。实际上,你不应该使用任何中心化交易所。 48 | 49 | 线下交易则是更难,而且风险更高的方式,这一点应该无需赘述。 50 | 51 | 所以综上所述,挖矿是对于处在被压迫的国家或地区的人们**唯一**安全且方便的获取加密货币的方式。 52 | 53 | 如果你对于加密货币一无所知,可以参考[币安学院](https://academy.binance.com/zh/search?page=1)的系列文章入门,数百篇从低阶到高阶的文章可以供你阅读。 54 | 55 | --- 56 | 57 | 在进行挖矿前,在安全方面与使用方面,均有一些重要事项需要提前提醒: 58 | 59 | - 由于个别国家对于加密货币的全面禁止与管制,在进行挖矿的设备上需要使用全局代理,包括代理 DNS。这不仅能够使你连接到矿池等网站,也可以帮助你隐藏自己正在访问加密货币相关网站的动作,从而避开 ISP 或者政府相关部门的监视。这里可以使用 v2rayA,它可以使你通过浏览器远程管理挖矿设备的网络,而不用在挖矿设备上安装任何图形化界面程序。 60 | - 在添加新设备之后,可能需要移除主板 BIOS 电池来放电,注意在放电后系统时间会重置,这会导致 v2ray 无法使用。这种情况下记得先重新校准系统时间。 61 | - 控制你进行挖矿场所的电费使用情况在一个合理范围内。如果电费使用情况过于离谱,可能会引起某些政府部门的怀疑和监视。 62 | - 主板 BIOS 设置中,需要开启`Above 4G Decoding`选项以支持多张(一般为 4 张以上)图形显示卡。此设置一般存在于 PCIE 设置中。此设置启用芯片组 64bit 兼容性硬件物理寻址,在关闭时 BIOS 只能使用 32bit 硬件物理寻址。 63 | - 主板 BIOS 设置中,将 PCI-E 速率调整为 Gen2 或 Gen1。否则可能发生无法识别显卡的问题。 64 | 65 | --- 66 | 67 | 在获得自己的加密货币地址后,要进行矿池的选择。简单来说,加密货币矿工自行进行挖矿,效率是较为低下的。加入矿池,并进行分成是更具效率的挖矿方式。矿池有非常多,有着各自不同的手续费收取方式以及收取比例。对于新手来讲,选择[unmineable](https://unmineable.com/)矿池是不错的选择,它的界面简单易用。 68 | 69 | 在进入矿池后,可以选择你需要进行挖矿的币种。注意,这里可以选择的一些实际不能挖矿的币种,不是你实际进行此币种的挖矿操作,而是你进行 Ethereum 等可以挖掘币种的挖矿,然后 unmineable 矿池将收益转化成你所选择的币种再支付给你。具体的操作可以参考 unmineable 网站的文章。在达到要求提现的最小限额后,你即可在矿池发起提现。提现有一定等待时间,需要耐心等待。 70 | 71 | --- 72 | 73 | 使用 Nvidia 显卡挖矿时,需要首先安装 [cuda](https://archlinux.org/packages/community/x86_64/cuda/)。 74 | 75 | 在使用 AMD 显卡进行挖矿时,如果你使用 AMD 开源 mesa 驱动则有可能无法运行挖矿软件。解决方案是暂时使用专有 AMD 驱动 [opencl-amd](https://aur.archlinux.org/packages/opencl-amd/)。然而在 AUR 中最新版本的 opencl-amd 驱动仍可能无法作用,如果你遇到此问题,解决方案是使用[旧版的 20.45 版本的驱动程序](https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=opencl-amd&id=99929da87153c0f36a2a9497c38221c12307ecfc)。将 PKGBUILD 下载后使用 makepkg 生成包并安装。使用其他 AMD 挖矿程序时均可能需要此操作。 76 | 77 | 挖矿工具也有很多以供选择,[ethminer](https://github.com/ethereum-mining/ethminer)则是使用 GPL-3.0 协议的自由软件,是一款通用的以太坊挖矿软件。一般来说,使用 GPU 进行 Ethereum 挖矿效率更高。另外还存在一些流行的专有挖矿软件如 LoLMiner 以及 T-Rex。具体的操作可以参考他们的官方文档。 78 | 79 | [xmrig](https://github.com/xmrig/xmrig) 可用于 XMR 的挖矿。xmrig 是使用 GPL-3.0 许可的自由软件。xmrig-cuda 是 xmrig cuda backends 的插件,你可以根据需要自行选择。 80 | 81 | --- 82 | 83 | 一般来说,挖矿程序需要设置为自动重启与开机自启,对于这点可以使用 supervisor 来实现,首先进行安装与启动 84 | 85 | ```bash 86 | sudo pacman -S supervisor 87 | sudo systemctl enable --now supervisord.service 88 | ``` 89 | 90 | 随后,在目标目录下建立配置文件,如`/etc/supervisor.d/eth.ini`,随后重启 supervisord 服务使配置生效。这样即可实现自动重启与开机自启的需求。如下是一个样例配置文件。 91 | 92 | ```ini 93 | [program:eth] 94 | directory=/home/testuser 95 | command=YOUR_MINE_COMMAND 96 | autostart=true 97 | autorestart=true 98 | ``` 99 | 100 | ### Headless 条件下的风扇转速调节 101 | 102 | 在不接入显示器,也即 Headless 的条件下,显卡风扇转速的调节是一件棘手的事情。 103 | 104 | 对 AMD 显卡的风扇风速进行设定。安装软件 amdgpu-fan 并启用服务即可。amdgpu-fan 会根据显卡温度自动调整风扇转速。注意,[AUR 当前的版本](https://github.com/zzkW35/amdgpu-fan/issues/2)存在开机无法自动启动生效的问题,根据[Issue](https://github.com/zzkW35/amdgpu-fan/issues/2)描述,其上游[源仓库](https://github.com/chestm007/amdgpu-fan)不存在此问题。 105 | 106 | ``` 107 | yay -S amdgpu-fan 108 | sudo systemctl enable --now amdgpu-fan 109 | ``` 110 | 111 | 关于更多 AMD 显卡风扇转速的设置方法可参考 [Arch Wiki](https://wiki.archlinux.org/title/fan_speed_control#AMDGPU_sysfs_fan_control). 112 | 113 | --- 114 | 115 | 使用英伟达显卡挖矿也需要额外对风扇转速进行设置,否则风扇不会根据温度来调整转速,即使温度较高,也近会运行在较低的转速,这个问题在进行深度学习等操作时仍然存在。如果你启动了图形化界面,则可通过 nvidia-settings 进行转速设置。英伟达显卡的转速设置依赖 X server 造成的,所以默认情况下,如果不启动 X server 则无法进行风扇调速。此时可以使用工具[coolgpus](https://github.com/andyljones/coolgpus),其工作原理是,它会为每个 GPU 设置一个临时 X server。然后,它每隔几秒钟循环查看一次 GPU,并根据它们的温度设置风扇速度。当脚本终止时,它会将风扇的控制权返回给驱动程序并清理 X server。pip 安装的 coolgpus 位于`~/.local/bin/coolgpus`。 116 | 117 | - https://ximikang.icu/2021/03/09/ubuntu%E7%B3%BB%E7%BB%9F%E8%B0%83%E8%8A%82GPU%E9%A3%8E%E6%89%87%E8%BD%AC%E9%80%9F 118 | 119 | --- 120 | 121 | coolgpus 在一些显卡无法生效,这种情况下可以使用[set_gpu_fans_public](https://github.com/boris-dimitrov/set_gpu_fans_public)。下载 set_gpu_fans_public 后,需要更改其 cool_gpu 以及 nvscmd 两个脚本中 `nvidia-smi`以及`nvidia-settings` 命令的路径为正确路径,除此之外还需修改 cool_gpu 中 dir 的路径为正确路径。随后需要安装包[xorg-xinit](https://archlinux.org/packages/extra/x86_64/xorg-xinit/)。最后创建符号链接,在位于 /opt 其目录中用 tcsh 启动,详见其代码注释。 122 | 123 | - https://www.codeleading.com/article/26244997267/ 124 | - https://www.jianshu.com/p/ab956df5e40c 125 | 126 | --- 127 | 128 | Ref: 129 | 130 | - https://forums.developer.nvidia.com/t/set-fan-speed-without-an-x-server-solved/35627 131 | - https://forums.developer.nvidia.com/t/fan-speed-without-x-headless-powermizer-drops-card-to-p8/37917 132 | - https://github.com/boris-dimitrov/set_gpu_fans_public 133 | - https://github.com/iaalm/GPUFanSpeed 134 | - https://www.google.com/search?q=TOC-Faking-a-Head-for-a-Headless-X-Server+347 135 | 136 | ### Headless 条件下的显卡超频 137 | 138 | 在启动图形界面的情况下,Nvidia 显卡超频较为简单,具体请参考[arch wiki](https://wiki.archlinux.org/title/NVIDIA/Tips_and_tricks#Overclocking_and_cooling)。本节讲述在不启动图形界面的情况下,也即 headless 环境下 Nvidia 显卡的超频操作。 139 | 140 | 以太坊相关一般的超频思路是:超显存,降/锁核心,有必要的情况下限制最大功率。 141 | 142 | 较为完整的步骤可以参考文章[Linux 透過命令行對顯示卡超頻](https://jybb.me/linux-overclock-graphic-card-via-cli),按照其中的步骤执行即可。这里列出一些需要额外注意的事项: 143 | 144 | - 在编辑`/etc/X11/xorg.conf`时,`ConnectedMonitor`的值需要根据你自身生成文件中的实际值来填写。在 ArchLinux 中其值一般为`Monitor0`而不是`DFP-0`。 145 | - 在超频时对不同 perf 级别进行设置时,一般[4]的值对应的是当前偏好的最大性能等级。nvidia-smi 中显示的等级似乎并不和此处的数字对应。如果不确定当前等级,可以从 1 到 4 依次尝试。 146 | - 如果你仍不确定 perf 等级,可以直接使用对应所有等级的调整,如`GPUMemoryTransferRateOffsetAllPerformanceLevels`以及`GPUGraphicsClockOffsetAllPerformanceLevels`。 147 | - 如果在终端直接执行超频命令,nvidia-settings 的-a 选项后续的参数可以不加单引号包裹,但是如果在脚本中执行,需要用单引号包裹参数。 148 | - 通过此命令锁定某个显卡的核心频率: `nvidia-smi -i 0 -lgc 1075`。此命令将第零张显卡的核心频率限制为 1075。注意,如将频率限制过高,但是功率或性能不足的情况下,频率会下降,并最终稳定在一个低于所设置的锁定频率的值上。 149 | - 即使是相同型号的显卡,显存的体质、类型都可能不同。所以你需要根据自己显卡的实际体质来慢慢调整,找到最稳定的超频参数,网络上现有的超频参数仅能做一个大致的参考。 150 | - 显卡的灯光问题,很多 20,30 系新显卡采用 I2C 控制,而英伟达 linux 驱动不支持,传统的通过`GPULogoBrightness`参数控制已经不能生效。详见[github issue](https://github.com/NVIDIA/nvidia-settings/issues/48) 151 | - 若无法进行超频,可以尝试重新启动 lightdm 服务,再进行超频。 152 | 153 | Ref: 154 | 155 | - [ethminer overlock guide](https://github.com/ethereum-mining/ethminer/issues/456#issuecomment-370224878) 156 | - [NVIDIA-SMI 系列命令总结](https://blog.csdn.net/handsome_bear/article/details/80903477) 157 | - [nvidia-smi: Control Your GPUs](https://www.microway.com/hpc-tech-tips/nvidia-smi_control-your-gpus/) 158 | 159 | --- 160 | 161 | AMD 显卡 headless 环境下超频相较 Nvidia 显卡则容易很多,参考 wiki 即可,对于超频工具,推荐使用[amdgpu-clocks-git](https://aur.archlinux.org/packages/amdgpu-clocks-git)。 162 | 163 | Ref: 164 | 165 | - [AMD RX 470(D) Linux 挖矿](https://reimu.moe/2021/03/10/AMD-RX470-D-Linux-Mining/) 166 | - [Arch wiki](https://wiki.archlinux.org/title/AMDGPU#Overclocking) 167 | 168 | --- 169 | 170 | ### 防火墙防护 171 | 172 | 如果你在内网环境中启用一些监控面板以便使用,则需要注意开启防火墙防护,因为你的内网中的设备,可能存在恶意软件,对网络中的端口、服务进行扫描、监视并上报。 173 | 174 | 这里采用 ufw 工具进行防火墙防护。第一,因为其使用简单,第二,因为 ufw 与 v2raya 无冲突,可正常使用。firewalld 默认情况下无法与 v2raya 同时正常使用。 175 | 176 | ```bash 177 | sudo pacman -S ufw 178 | sudo systemctl enable --now ufw 179 | 180 | sudo ufw default deny #默认拒绝 181 | 182 | sudo ufw allow from YOUR_TRUST_LAN_IP #只允许你信任的内网 ip 连接 183 | sudo ufw allow ssh #允许 ssh 以便内网以及外网通过 nps 的ssh连接 184 | sudo ufw allow 8024 #允许 nps 的默认网桥通信端口工作 185 | 186 | sudo ufw enable #设置完成后启用 187 | sudo ufw status #检查状态 188 | ``` 189 | 190 | Ref: https://wiki.archlinux.org/title/Uncomplicated_Firewall 191 | 192 | ### 辅助命令 193 | 194 | 你可用如下命令查看识别到的显卡编号,此命令将列出真正被系统识别可用的显卡编号。 195 | 196 | ```bash 197 | ls /sys/class/drm | grep "^card[[:digit:]]$" 198 | ``` 199 | 200 | 你可用如下命令查看各个显卡设备的详情 201 | 202 | ```bash 203 | sudo lspci -vnn | grep VGA -A 12 204 | ``` 205 | 206 | 你可用[speedtest-cli](https://archlinux.org/packages/community/any/speedtest-cli/)在终端下测试网速情况 207 | 208 | ```bash 209 | sudo pacman -S speedtest-cli 210 | speedtest-cli 211 | ``` 212 | -------------------------------------------------------------------------------- /docs/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArchLinuxStudio/ArchLinuxTutorial/2c1fff9e3c0831b332588f6f15720b4ba2f068f4/docs/favicon.ico -------------------------------------------------------------------------------- /docs/play&office/android.md: -------------------------------------------------------------------------------- 1 | # 安卓刷机 2 | 3 | [Arch Wiki 安卓文档](https://wiki.archlinux.org/index.php/android) 4 | 5 | ## 为什么要刷机 6 | 7 | 在目前市面上可见的各个手机品牌中,除了其自己魔改的闭源安卓手机系统外,几乎任何一个品牌都会预装上一系列的出厂应用,如浏览器,通讯录,应用市场等。这些应用均为闭源软件,由各个手机厂商开发提供。这里就存在严重的问题,这些魔改系统以及闭源应用软件可能会进行各种间谍功能,对使用者进行监控以及审计。据报告,小米以及华为手机均会对用户的搜索以及浏览进行上报,匹配到关键词如"西藏自由","台湾独立","民主自由"等词即会进行加密上报,这些关键词可能有成百上千个。由于此类原因,使得使用者必须对手机的系统进行重新刷入,选择一个开源可靠的 ROM 刷入手机可以保障自己的隐私及安全。在硬件层面,也存在审计与监控的可能性,但是目前尚未知明确且可靠的报告,如有条件,可选择非人身所在国家品牌的手机。 8 | 9 | > 华为鸿蒙与小米的 MIUI 等中国大陆厂商存在着与威权政府合作的风险,并且这种风险目前来看越来越大,操作系统层面来看,整合所谓"反诈系统"几乎已经是箭在弦上的事情。是否会有硬件级别的监控和审计,目前尚无明确证据。为了你的隐私与安全,如果这些厂商的手机无法自行刷入安全的 ROM,那么你需要拒绝使用这些厂商的产品。 10 | 11 | 同时,大陆厂商预装的魔改 ROM 中普遍存在大量广告,其中「手机鸿蒙」和「MIUI国内版」最多,大量的广告会占满系统通知栏,给使用者造成很差的使用体验,虽然可以通过冻结相应软件的方法来关闭。但随着时间的流逝,厂商也逐渐堵死了这条路,将「手机管家」、「软件商店」、「智慧XX」、「系统桌面」、「主题商店」等广告软件锁死,如果没有 root 权限则禁止冻结,就算是 adb shell 也不行,此行为广泛出现于「ColorOS」、「OriginOS/FuntouchOS」、「手机鸿蒙/MagicUI」等。此外,在 MIUI 中,虽然 shell 权限允许冻结一些广告软件,但冻结后可能会出现重启系统后卡死在开机第二屏的情况,也就是所谓的「卡米」,防不胜防。 12 | 13 | 最后,许多大陆厂商的魔改 ROM 的大陆版本会存在一些「流氓行为」,目前比较猖狂的是「锁死默认应用」,尤其是桌面应用「启动器」,在此,我想说: 14 | 15 | 虽然恶意应用可能会引诱用户将其设置为默认应用然后向用户进行勒索诈骗等恶意行为,但是,难道用户连这点判断能力都没有吗?真把用户当傻子?**人人生而自由,在尊严和权利上一律平等。** 为什么要剥夺用户自由地更换系统默认应用的权利,难道就是为了推广自己那几个广告满天飞,功能远远落后于其他优秀的自由软件的应用吗?为了挣这几个钱脸都不要了?随便找了个看似有点道理但其实漏洞百出的理由就开始剥夺手机用户的基本权利,吃相难看!再者,为什么只在大陆版的 ROM 上推出这些『特色功能』,海外版就没有,难道中国人都是傻子,外国人就比中国人聪明吗?自己把自己当傻子?「禽兽之变诈几何哉?止增笑耳。」 16 | 17 | 同时,「手机鸿蒙3」中出现的『纯净模式』以及「ColorOS」中安装应用强制登录OPPO账号且无法关闭的行为也都是「流氓行为」,同上。 18 | 19 | 买手机最好买开放 BootLoader 解锁(刷机的前提)并且官方最好有可用的开源内核(第三方开源 ROM 适配的前提)品牌,较热门的机型,比如小米/红米、Google Pixel、Realme、Fairphone等,避免一些既不开放 BootLoader 解锁,官方系统也不好用的品牌,比如华为/荣耀(如果刷机有难度,华为就是地狱级)、Vivo/iQOO(不存在难度,因为几乎所有机型都没有刷机的可能)等,这样在刷机时可以方便的找到官方的 twrp 和知名的 ROM 包,如[PixelExperience](https://get.pixelexperience.org/devices),[LineageOS](https://lineageos.org/),[crDroid](https://crdroid.net/),[Resurrection Remix](https://resurrectionremix.com/)(不建议,官方已经停更),[Havoc-OS](https://havoc-os.com/),[ArrowOS](https://arrowos.net/),[Evolution X](https://evolution-x.org/)(虽然功能比较丰富,但有过「kang」的行为,介意者误用),[dotOS](https://www.droidontime.com/devices),[grapheneos](https://grapheneos.org/)等,我们统称为「类原生」(相对于真原生 AOSP 而言)。如果是较冷门的品牌或冷门机型,各大官方类原生网站可能没有提供 ROM,只能在网上自行寻找个人改造过的 twrp 和上述 ROM 包的 unofficial ROM,搜索的方式一般为手机或手机代号+ROM,比如「Xiaomi Redmi K60 Pro ROM」或者「mi socrates rom」,必要时也可以在[XDA论坛](https://forum.xda-developers.com/),资源会相对较多一些。这种个人改造版本的安全性一般不会有啥问题,但稳定性比较难说,而且还可能出现更多的 bug。也有可能你翻遍全网,也找不到冷门机型能用(指好用的、非硬件提供商的官方 ROM)的 twrp 和 ROM。硬件方面,一般推荐买高通骁龙平台的手机,不推荐买联发科平台的,因为更多 ROM 的版本都是适配高通硬件的(高通的包多),同时联发科平台的设备刷机过程中出现问题后救砖的便捷性和简单性也不如高通平台(高通的只要硬件没坏基本都能救回来)。 20 | 21 | 首先需要安装 linux 上的安卓工具包 22 | 23 | ```bash 24 | sudo pacman -S android-tools 25 | ``` 26 | 27 | ## 解锁 bootloader 28 | 29 | 再次提醒要购买或使用有官方提供 bootloader 解锁的手机品牌。一般来说像小米这种品牌,官方会提供解锁 bootloader 的途径和工具,但是小米的解锁工具基本在 Microsoft Windows 系统下用。这时候你就只能用一台 Windows 电脑操作,或者使用虚拟机(不推荐,可能会出问题)。 30 | 31 | 除此之外,如果你能获取,或通过很 hack 的方式拿到 bootloader 的解锁码(华为设备,大部分需要花钱或者拆机短接),那么也可以使用 adb 在 fastboot 模式下进行解锁。 32 | 33 | ```bash 34 | $ adb reboot bootloader #手机先链接电脑,重启到fastboot 35 | $ fastboot oem unlock 1234567890ABCDEF #在fastboot模式下解锁,要加上正确的16位解锁码才能解锁,否则会出现类似以下报错 36 | FAILED (remote: 'check password failed!') 37 | fastboot: error: Command failed 38 | ``` 39 | 40 | ## 刷入 twrp 并进行刷机 41 | 42 | 没有官方 twrp 的设备,可以在[unofficialtwrp](https://unofficialtwrp.com/devices/)查看下是否有。 43 | 44 | 如果没有相关信息有几个论坛和网站可以看看 45 | 46 | - xda https://forum.xda-developers.com/ 47 | - https://androidfilehost.com/ 搜索 开发代号 + 你想要的系统名字 48 | 49 | 一般 twrp 的版本和 ROM 包有对应关系,刷机前先确认你的两个版本是兼容的,否则刷机过程可能报奇怪的错误,如 unable to mount /system 50 | 51 | 去下载你机型对应的 twrp。在[官网](https://twrp.me/Devices/)搜索你的机型,下载。如果没有看到你的机型说明官方不支持,你需要自行搜索别人修改的版本。将手机连接电脑,注意要连到 USB2.0 的接口,否则可能有兼容性问题。 52 | 53 | 让手机进入 fastboot 模式,对于非华为设备,在电脑打开终端,执行 54 | 55 | ```bash 56 | fastboot flash recovery ./path/of/your-twrp.img 57 | 58 | fastboot boot ./path/of/your-twrp.img 59 | ``` 60 | 61 | 终端执行完毕的后,手机会自动重启到 Recovery。这里注意,第一个命令执行完毕后执行`fastboot reboot`可以重启,但是许多设备会在首次启动时自动覆盖替换你刷入的自定义 Recovery,这样直接重启可能会发现启动的依旧是官方 Recovery 而非刚才刷的,一些 ROM 甚至会报错不是官方系统等类似信息。为防止这种情况,在手机上通过硬件按键重启进入 recovery,TWRP 将给 ROM 打 patch,以防止 ROM 替换 TWRP。[[1]](https://twrp.me/xiaomi/xiaomimi5.html) 62 | 63 | 剩下的步骤就是普通的进入 twrp,双清,刷机即可。 64 | 65 | > 有时双清或者进入 twrp 可能看到报错,用高级清理,从 ext4 改一下格式,再改回 ext4 可能就解决了 66 | 67 | 更多命令: 68 | 69 | ```bash 70 | $ adb shell #打开adb shell 71 | $ adb root #在手机已经root的情况下打开root权限的adb shell 72 | ``` 73 | 74 | ## 去除网络限制提示 75 | 76 | 谷歌从 Android 5.0 开始就引入了「Captive Portal」机制,主要用来检测 WiFI 网络认证是否正常,默认检测访问的是谷歌墙外服务器。在使用国际上常见的类原生安卓时,身处墙内环境此服务会提示网络受限,即使已经开启 Shadowsocks 等服务。针对此问题可使用 adb 命令修改检测访问的服务器为 google.cn 解决。 77 | 78 | ``` 79 | adb shell settings put global captive_portal_server www.google.cn 80 | adb shell settings put global captive_portal_https_url https://www.google.cn/generate_204 81 | adb shell settings put global captive_portal_mode 0 82 | ``` 83 | 84 | 最后切换一下飞行模式再切回即可解决。 85 | 86 | ## 刷入谷歌套件 87 | 88 | 一些场景下因为需要使用 Google play,需要刷入谷歌套件。可选的项目有[opengapps](https://opengapps.org/)、[nikgapps](https://nikgapps.com/)以及[lineageos 提供的套件](https://wiki.lineageos.org/gapps)。一般推荐刷稳定性高些 opengapps ,但其目前更新似乎已经陷入停滞。nikgapps 可以自行定制。 89 | 90 | ## 解锁 root 权限 91 | 92 | 如果你的设备可以使用[KernelSU](https://kernelsu.org/zh_CN/),则首先推荐 KernelSU,因为 KernelSU 运行在内核空间,对用户空间应用有更强的掌控,同时被检测到的概率也极小。 93 | 94 | 对于无法使用 KernelSU 的设备,使用 Magisk 以解锁 root 权限。在其[官方 release 界面](https://github.com/topjohnwu/Magisk/releases)下载 Magisk apk 文件,将其重命名为.zip 后缀。然后将其拷贝到手机中,最后进入 twrp 刷入此 zip 包即可。 95 | 96 | 对于Android 5.1 以下设备,如果 Magisk 无法运行或运行出现问题,则可以尝试[SuperSU](https://supersuroot.org/)。注意:此应用属于**专有软件**,且已经停更,除非万不得已,否则不推荐使用 97 | 98 | Ref: 99 | 100 | - [小米刷机教程](http://www.romleyuan.com/news/readnews?newsid=938) 101 | 102 | 详细刷机教程参考[刷机指南](https://jesse205.github.io/FlashAndroidDevicesGuidelines/)。 103 | -------------------------------------------------------------------------------- /docs/play&office/media.md: -------------------------------------------------------------------------------- 1 | # 视频影音 2 | 3 | 本节记录在 arch linux 上观看影视,收听音乐等相关信息。 4 | 5 | ## 在线听歌与音频播放器 6 | 7 | 网络音乐收听可以使用网易或腾讯出品的[网易云音乐](https://aur.archlinux.org/packages/netease-cloud-music/),[qq 音乐](https://aur.archlinux.org/packages/qqmusic-bin/),但它们都年久失修,或者质量惨不忍睹。显然这些大公司是不会愿意向 Linux 桌面投放精力的,我们更推荐你来使用维护更到位的自由软件。 8 | 9 | [yesplaymusic](https://github.com/qier222/YesPlayMusic) 是一款全平台的开源听歌软件,颜值高、无社交功能,并且是全网资源整合,推荐使用 10 | 11 | ```bash 12 | yay -S yesplaymusic 13 | ``` 14 | 15 | [listen1](https://github.com/listen1/listen1_desktop) 是一款老牌的听歌软件,功能完善,同样资源全网整合,推荐使用 16 | 17 | ```bash 18 | yay -S listen1-desktop-appimage 19 | ``` 20 | 21 | [Electron Netease Cloud Music](https://github.com/Rocket1184/electron-netease-cloud-music) 是一款用 Electron 和 Vue 编写的网易云音乐 Linux 客户端,支持歌曲下载,这是它的优势,但是曲库没有前两款软件齐全。 22 | 23 | ```bash 24 | yay -S electron-netease-cloud-music 25 | ``` 26 | [FeelUOwn](https://github.com/feeluown/FeelUOwn) 是一个符合 Unix 哲学的跨平台的音乐播放器,安装简单,新手友好,默认提供国内各音乐平台插件。 27 | 28 | ```bash 29 | yay -S feeluown 30 | # 按需安装以下插件 31 | yay -S feeluown-local feeluown-netease feeluown-qqmusic feeluown-kuwo 32 | ``` 33 | 34 | ## 视频播放器 35 | 36 | 本地音视频播放一般使用 vlc 或 mpv 37 | 38 | ```bash 39 | sudo pacman -S vlc #VLC 播放器 40 | sudo pacman -S mpv #MPV 播放器 41 | ``` 42 | 43 | 除此之外,如果你想收看在线影视资源,[zy-player](https://aur.archlinux.org/packages/zy-player-bin/)是一个很好的选择,它是一个跨平台视频资源播放器, 整合全网资源,可以播放一些电影。 44 | -------------------------------------------------------------------------------- /docs/play&office/office.md: -------------------------------------------------------------------------------- 1 | # 办公日常 2 | 3 | 本章记录日常办公需要用到的软件及配置。同时包括各类即时通讯软件和网盘、远程协助等软件的配置与使用。 4 | 5 | > QQ 与微信等中国国内知名闭源专有 IM 软件均存在不同程度的间谍行为(实际上不仅仅是 IM 软件,几乎所有你能见到的中国国内大型互联网 APP 均有严重的间谍行为,美其名曰:用户行为监测或用户画像描述)。收集用户信息,扫描用户手机存储内容,监控粘贴版内容,记录手机安装 APP 列表等无耻行为几乎已经成为业内公开的秘密。除了自身作恶,这类专有间谍软件还与威权政府狼狈为奸,迫害与追捕民运人士以及异议人士。同时,腾讯一直以来不遗余力的封杀第三方客户端,导致始终没有一个稳定可用的版本。腾讯于 2020 年出品了官方版本 LinuxQQ,其品质可以用惨不忍睹形容。**我们不支持你使用 QQ 或微信这类专有间谍通讯软件作为你的主要通讯方式。本教程亦不提供任何支持。** 6 | 7 | > 欧盟于近些年出台了[GDPR 通用数据保护条例](https://en.wikipedia.org/wiki/General_Data_Protection_Regulation),国内各大知名互联网软件公司在开发海外版软件时均需严格遵守上传数据、用户隐私等规定。然而在开发中国国内版时,则尽可能上传其能获取到的全部用户个人隐私数据,这是无耻且邪恶的。我们希望尽可能多的人抵制使用这种专有软件。 8 | 9 | > 希望所有人抵制或放弃此类恶意专有软件是不现实的,如果你不能舍弃使用这些软件,我们只能希望你可以在一个较为安全的隔离环境中使用它们,如一个不存在任何敏感个人信息的隔离物理设备中使用。使用自由开源的,注重隐私保护的通讯软件始终是正确的选择。 10 | 11 | ## 即时通讯 12 | 13 | **我们强烈建议你使用开源自由的通讯软件,这是为了你自身的自由,也是为了身边人的自由。** 14 | 15 | ### 即时通讯软件的分类 16 | 17 | 除了 p2p 的模式,即时通讯软件分为客户端软件与服务端软件。你应该选择开源的客户端软件来使用。而对于服务端,除非你打算自行部署服务器程序,否则讨论某个即时通讯软件的服务端是否开源毫无意义,因为永远也没有人知道被部署的是否是被声称的那一份代码。 18 | 19 | 除了自身是否是开源自由的软件外,即时通讯软件从其服务端部署的形式上,可以分为三类。 20 | 21 | - 第一类是完全中心化的通讯软件,这些软件的服务器被运营企业完全控制,并为用户提供服务。典型的例子有微信、QQ、Telegram、Signal 以及 Keybase 等。 22 | - 第二类是分布式的,联邦式的通讯软件,这些软件的运营企业或组织一般会提供官方的服务器,但是同时支持任何人或组织自行部署服务器。同时这些服务器之间可以互相通讯。典型的例子如基于 Matrix 的通讯软件 Element。 23 | - 第三类是完全去中心化,p2p 的通讯软件。这些软件基本无需任何服务器进行服务的提供(可能有少量的引导节点,但其除了引导不提供任何服务),而是通讯双方直接和对方进行通讯沟通。这是一种最自由,但同时提供功能较为有限的模式。典型的例子如基于 Tox 协议的通讯软件 qTox。 24 | 25 | 下面介绍一些我们较为推荐的通讯软件。 26 | 27 | ### Telegram 28 | 29 | Telegram,中文名一般称为电报,是一个在世界广泛应用的开源通讯软件,注重隐私保护和单人通讯加密。我们一向提醒读者不应该相信企业不作恶,但是某些极少数的企业在经过时间的检验后确实证明它们是较为值得信赖的,如 Lavabit 以及 Telegram。如过你没有进行极度敏感的活动,那么 Telegram 目前看来是值得信赖的。使用 Telegram 请不要使用+86 的中国境内电话号码注册,**请务必使用虚拟电话注册**,这是为了你的安全着想。如果你可以使用加密货币购买谷歌语音虚拟电话账户,可在[群组](https://t.me/FSF_Ministry_of_Truth)中说明"我想购买谷歌语音账户",会有我们的管理员与你私聊,协助完成你的购买。或者,你也可以直接联系我们的[管理员](https://t.me/LLC_XMR)进行购买。注册完成后,需要在 Telegram 设置中的`Privacy and Security`中进行如下设置来保障你的隐私安全: 30 | 31 | - Phone number 中的 Who can see my phone number 设置为 Nobody; 32 | - Phone number 中的 Who can find me by my number 设置为 My contacts; 33 | - 把 Contacts 一节中的 Sync contact 关闭 (仅能在手机端操作); 34 | - 把 Contacts 一节中的 Suggest Frequent Contacts 关闭 (仅能在手机端操作); 35 | - 点击 Contacts 一节中的 Delete synced contacts,这样即使之前有联系人,也无法再次关联到你(仅能在手机端操作); 36 | 37 | > 注意,上述的三个仅能在手机端操作,建议在 Arch Linux 中的安卓模拟器中完成。或者在一个纯净的,刷入开源可信的 ROM 的,并未安装任何中国的闭源间谍软件的手机上操作,这是因为如果你使用了中国手机厂商的闭源操作系统以及闭源间谍软件,它们是可以获取你安装 Telegram 的行为的,并有可能与威权政府合作对你进行进一步的监视甚至抓捕。 38 | 39 | 通过以下命令在 Arch Linux 上安装 Telegram: 40 | 41 | ```bash 42 | sudo pacman -S telegram-desktop 43 | ``` 44 | 45 | > 任何技术始终都是双刃剑。Telegram 上进行恐怖活动和诈骗活动是事实,Telegram 官方也在进行持续封禁。但是不能因为这些原因就否定或质疑其存在的意义。Telegram 同时为处于威权和独裁国家中的异议人士与民运人士提供了可靠的平台进行通讯和活动。你一定不想成为这些独裁国家政府的帮凶。 46 | 47 | 最后,如果你当前使用的设备非常敏感,那么需要在设置、高级中 关闭媒体自动下载。实际上,最安全的方式是在敏感设备上不安装使用 Telegram。 48 | 49 | ### Element 50 | 51 | Element 是一款基于开源 Matrix 协议的分布式、联邦式的即时通讯应用客户端。它所对应的服务端 synapse 同样是自由软件,你可以自行部署服务端程序。 52 | 53 | ```bash 54 | sudo pacman -S element-desktop 55 | ``` 56 | 57 | Element 相较于 Telegram 的最大优势是其服务端程序是开源自由的,并且可以自行部署。如果进行自行部署,这样可以保障你在与他人进行通讯时,不仅可以确定你使用的客户端是安全的,同时也能确定使用的服务端是安全的。除此之外,Element 支持群组聊天的端对端加密,这也是 Telegram 所不支持的。 58 | 59 | 由此可以看出,从部署的形势来看,Element 比 Telegram,在自行部署服务端的情况下可以获得更高强度的安全性。如果你从事极度敏感的线上活动,使用 Element 并自行部署 synapse 是比 Telegram 更好的选择。但是,在部署服务器程序的同时也要付出更多的精力与资金进行维护。 60 | 61 | Element 官方也提供了官方的服务器 matrix.org 以供用户免费使用。如果其部署的服务确实是其宣称的那部分代码,那么这些服务器在端对端加密的情况下仅能获取一些用户的元数据。如上线时间以及交流对象等。如果自行部署服务器,这些元数据也将掌控在你自己手中。需要提醒的是,如果自行部署了服务器,还对于隐私安全要求程度很高,那么在自行部署的服务器上存在的端对端加密群组中的成员应该均在你自己的服务器上进行注册,在其他服务器,如 matrix.org 中注册的用户应该被禁止加入你自己的群组。因为如果他们加入,你自行部署的服务器上的群组中的元数据以及加密聊天数据会流转至其他服务器,这是一种危险。 62 | 63 | ### qTox 64 | 65 | qTox 是一款基于 tox 协议制作的端对端加密即时通讯工具。除了 tox 的基本功能,qTox 还实现了离线消息发送的功能。tox 最初的想法就是创建一个即时通讯工具,无需使用中央服务器即可运行,并且点对点,端到端加密,保证用户通信的保密性和安全性。然而正是由于它的这种特性,qTox 提供的功能较为有限,如 qTox 中的群组,如果有人下线,那么他就无法接收到离线期间的群组信息。 66 | 67 | ```bash 68 | sudo pacman -S qtox 69 | ``` 70 | 71 | qTox 在注册时会生成 Tox ID,这个 ID 用来添加好友,并且在此 ID 中存在注册时的用户 IP 信息,用来作为未来进行连接的一种方式。qTox 的连接方式如下,首先 qTox 会去连接一些[启动节点](https://nodes.tox.chat/),这些启动节点会获取你当前的 IP 并为你提供你想要通讯的对象的 IP。如果启动节点没有你想要通讯的对象的 IP,那么则会尝试使用对方 Tox ID 中的 IP 进行连接。如果均无法建连,则失败。qTox 在中国被屏蔽的原因可能是因为中国政府屏蔽了所有启动节点,同时由于大多数人没有稳定可达的公网 IP,所以导致在不翻墙时无法正确建连。 72 | 73 | ### IRC 74 | 75 | IRC,因特网中继聊天,是一种古老的交流方式,在开源社区中仍被广泛使用,常用的客户端有 WeeChat,以及 Emacs 的 erc。 76 | 77 | ```bash 78 | sudo pacman -S weechat 79 | ``` 80 | 81 | ### 屏幕分享 82 | 83 | 手机通讯软件在电脑上的投屏可以尝试使用[scrcpy](https://archlinux.org/packages/extra/x86_64/scrcpy/)。 84 | 85 | ``` 86 | sudo pacman -S scrcpy 87 | ``` 88 | 89 | 也建议使用 [KDE Connect](https://archlinux.org/packages/extra/x86_64/kdeconnect/) 实现多端设备互联。 90 | 91 | ``` 92 | sudo pacman -S kdeconnect 93 | sudo pacman -S sshfs # 文件系统挂载,Dolphin完美集成 94 | ``` 95 | 96 | ## 办公套件 97 | 98 | 主要两个选择是 [LibreOffice](https://wiki.archlinux.org/index.php/LibreOffice)以及[onlyoffice](https://aur.archlinux.org/packages/onlyoffice-bin/)AUR。 我们建议你使用开源的 LibreOffice 以及 onlyoffice,而不是专有软件 WPS,前两者其目前的安装已经非常简单。 99 | 100 | ```bash 101 | sudo pacman -S libreoffice-still #稳定版 102 | sudo pacman -S libreoffice-fresh #尝鲜版 103 | yay -S onlyoffice-bin 104 | ``` 105 | 106 | 一些老式的 chm 文档的阅读,可以安装`kchmviewer`。 107 | 108 | ```bash 109 | sudo pacman -S kchmviewer 110 | ``` 111 | 112 | ## 打印机 113 | 114 | 对于日常办公来说,打印机是非常必要的。除此之外,我们建议读者维持一份纸质的密码,包括你可以将你加密货币钱包中的私钥打印出来保存,这是非常好的一个方案。对于打印机的品牌,我们建议使用惠普打印机。其对于 Linux 的支持非常全面,可以去其[网站](https://hplipopensource.com/)查看所支持的设备等详情。在 Arch Linux 上,安装包 hplip 以及 cups ,启动服务后即可使用。 115 | 116 | ```bash 117 | sudo pacman -S system-config-printer 118 | sudo pacman -S hplip 119 | sudo pacman -S cups 120 | sudo systemctl enable --now cups.service 121 | ``` 122 | 123 | ## 笔记本 124 | 125 | Joplin 是一个简单的 markdown 笔记本,具有标签和层级等基础功能。并且具有 cli 和 desktop 两个版本。其 LICENSE 为 MIT 。 126 | 127 | ``` 128 | yay -S joplin # cli 129 | yay -S joplin-desktop # desktop 130 | ``` 131 | 132 | Trilium 是一个开源的 electron 笔记软件,它支持 markdown 还有 evernote 格式的导入,并且支持 markdown 和 html 的导出格式。其本身具有标签、无限层级、关系图以及历史记录等功能,基于 CKEditor 所见即所得的 markdown 编辑器。并且支持在服务器上自己搭建。其 LICENSE 为 AGPL 3.0 。 133 | 134 | ``` 135 | yay -S trilium-bin 136 | yay -S trilium-server-bin 137 | ``` 138 | 139 | VNote 是一个专注于 Markdown 的基于 Qt 的开源免费的笔记应用。其 LICENSE 为 LGPL-3.0 。 140 | 141 | ``` 142 | yay -S vnote 143 | ``` 144 | 145 | ## 电子书 146 | 147 | pdf 可直接用浏览器打开,也可选用其他专用的阅读软件,如[okular](https://archlinux.org/packages/extra/x86_64/okular/)或者[calibre](https://archlinux.org/packages/extra/x86_64/calibre/)。okular 在打开大型 epub 时会非常卡顿,并且图片模糊不清,[Foliate](https://archlinux.org/packages/extra/x86_64/foliate/) 是阅读 epub 的更佳选择。 148 | 149 | ## RSS 阅读器 150 | 151 | RSS 阅读器 newsflash 是 feedreader 的精神继承者,支持本地 RSS 源和 RSS API 的读取,由 Rust 写成。 目前 feedreader 已经不再维护。也可使用 liferea。 152 | 153 | ``` 154 | sudo pacman -S newsflash 155 | ``` 156 | 157 | ## 文献管理 158 | 159 | JabRef 是 java 编写的并且与 LaTeX 协作较好的开源文献管理软件,可以与 vim, Emacs 协作,并通过 bib 格式管理文献。 160 | 161 | ``` 162 | yay -S jabref 163 | ``` 164 | 165 | Zotero 是一个开源的,基于 Firefox 解决方案的应用,其可以通过 VSCode 插件和 vim 插件进行引用。beta 版本具有笔记和内置 PDF 阅读器功能。 166 | 167 | ``` 168 | yay -S zotero 169 | yay -S zotero-beta #具有笔记和内置 PDF 阅读器 170 | ``` 171 | 172 | ## 截图 173 | 174 | 推荐使用 flameshot 火焰截图 175 | 176 | ``` 177 | sudo pacman -S flameshot 178 | ``` 179 | 180 | 快捷键的命令是`flameshot gui`,可在 KDE 设置中加入设置快捷键为你所熟悉的键位。或者尝试另一种流行的 KDE 出品的截图软件 [spectacle](https://archlinux.org/packages/extra/x86_64/spectacle/) 181 | 182 | ## 下载存储 183 | 184 | > 不要使用任何墙国国内的网盘存储你的个人数据,他们可以根据"相关条款与规定",或者"自我阉割"的精神觉悟随意处置你的所有数据,在仔细阅读过他们的用户协议后,你会觉得毛骨悚然。墙国网盘只能用来存储无关紧要的垃圾数据。 185 | 186 | > 不要使用迅雷、旋风等墙国类似软件。关于 BT 的原理及迅雷的恶行可参考文章[为什么国内 BT 环境如此恶劣?](https://zhuanlan.zhihu.com/p/87193566) 187 | 188 | - [Mega](https://aur.archlinux.org/packages/megasync/)AUR 新西兰注重隐私的老牌网盘,也可直接使用 [web 版本](https://mega.nz/fm/dashboard) 189 | > Mega 网盘也许存在一些争议,但是选择 Mega 还是选择一些和威权政府合作非常愉快的网盘,结论非常明显。 190 | - [onedrive](https://aur.archlinux.org/packages/onedrive-abraunegg/)AUR 微软创办的网盘业务,linux 下存在一个命令行客户端 191 | - [qbtorrent-enhance-version](https://aur.archlinux.org/packages/qbittorrent-enhanced/)AUR 老牌 BT 客户端增强版,支持填入 tracker 的 URL 网址进行拉取,配合[TrackersListCollection 项目](https://github.com/XIU2/TrackersListCollection)使用更佳。 192 | 193 | ## 图片浏览 194 | 195 | 在桌面环境与必要应用一节中已经安装了 [gwenview](https://archlinux.org/packages/extra/x86_64/gwenview/),它基本可以满足日常看图的需求。如果另需快速看图软件,可以尝试以下软件。 196 | 197 | - [feh](https://www.archlinux.org/packages/extra/x86_64/feh/) 198 | - [nomacs](https://aur.archlinux.org/packages/nomacs) 199 | 200 | ## 常用系统组件 201 | 202 | 日常办公中所需要用到的各类小工具有很多实现,其中 KDE 的套件中就有很多,可以自行查询,此处仅列出几个常用的例子。 203 | 204 | - [Kcalc](https://archlinux.org/packages/extra/x86_64/kcalc/) 计算器 205 | - [Kamoso](https://archlinux.org/packages/extra/x86_64/kamoso/) 相机 206 | - [Cheese](https://archlinux.org/packages/extra/x86_64/kamoso/) 茄子相机 207 | - [KTimer](https://archlinux.org/packages/extra/x86_64/ktimer/) 倒计时执行器 208 | 209 | ## 远程协助 210 | 211 | 如需连接 windows 远程机器,你可以使用开源的[freerdp](https://archlinux.org/packages/extra/x86_64/freerdp/)协议,配合开源实现[Xrdp](https://wiki.archlinux.org/title/Xrdp),或者[Rdesktop](https://wiki.archlinux.org/title/Rdesktop)即可。 212 | 213 | 如需链接 Linux 服务器,大多数场景使用 ssh 即可。 214 | 215 | 如果以上解决方案不能满足你,那么可以尝试免费使用的专有软件[teamviewer](https://aur.archlinux.org/packages/teamviewer/)AUR,其完善的功能基本可以满足全部需求。需要注意安装后需按照提示启动服务。 216 | 217 | ```bash 218 | sudo systemctl enable --now teamviewerd 219 | ``` 220 | 221 | ## 病毒防护 222 | 223 | 人们往往认为 Linux 由于其完美的设计和开源特性不易感染病毒,从而不用安装防毒软件,这其实是不正确的。随着 Linux 的普及,更多针对 Linux 的病毒在陆续涌现。除此之外,随着 Wine 以及 Proton 越来越多的应用,Windows 系统上病毒的威胁性也在 Linux 系统中持续提高。在 Arch Linux 中,可以使用[ClamAV](https://wiki.archlinux.org/title/ClamAV)对系统进行扫描,进而删除存在的病毒文件。根据 wiki 说明,添加更多病毒特征库后会可以进行更加完善的病毒扫描,注意,如果你的文件系统非常巨大,扫描过程可能长达数十小时。如果你有意使用付费闭源软件,根据我们的调查,目前针对个人 Linux PC 端,仍在更新且较为完善的软件是[Dr.Web](https://products.drweb.cn/home/linux/),俗称大蜘蛛,你可自行决定是否使用。 224 | -------------------------------------------------------------------------------- /docs/play&office/play.md: -------------------------------------------------------------------------------- 1 | # 娱乐软件 2 | 3 | ## 网游网络加速 4 | 5 | 对于在 Linux 上玩网游,网络加速一直是一个难题,尤其是在玩一些外服网游的时候。这里提供一些思路来在 Linux 下对网游加速。 6 | 7 | - 一些机场会提供网游游戏节点,这些节点专门为游戏优化,限制流量并且提高倍率,一般可以得到较好的加速效果。在 Linux 中配合 [透明代理](/advanced/transparentProxy),同时开启对 UDP 流量的代理加速,即可以得到优化网游网速的效果。 8 | - 一些中端或者高端的路由器,会内置一些市面上常见的网游加速器,如果你的路由器有这个功能,那可以直接使用路由器内置的加速器加速本机的网游流量。或者你也可以使用 openwrt 配合安装支持 openwrt 的加速器插件。不要使用网易 uu 路由器加速插件,它会错误的将 Linux PC 识别为安卓手机,根据它的逻辑,如果设备被识别为手机,那只能加速手游而不能加速 PC 游戏。目前,网易 uu 加速器已将 Linux PC 移出识别范围,如有需求,请使用其他品牌的路由器加速插件。 9 | - 在虚拟机或 wine 执行市面上常见的网游加速客户端,理论上也是可以起到加速效果的。但是目前来说执行起来较为复杂,理论上是可行的,未来可能会有更方便的工具出现。关于原理可以参考[Wine 待研究课题:让 Windows 版网游加速器的虚拟网卡模式可在 Linux 下工作](https://hu60.cn/q.php/xsBEbMHq-5hkgyEFTaIlwB-00AAA/bbs.topic.95016.html)以及[在 Linux 中通过虚拟机使用 Windows 版网游加速器](https://hu60.cn/q.php/bbs.topic.95932.html) 10 | 11 | ## 原生仓库游戏 12 | 13 | Arch Linux 官方仓库和 AUR 中存在一些原生支持的游戏,列举如下 14 | 15 | - [shattered-pixel-dungeon](https://aur.archlinux.org/packages/shattered-pixel-dungeon/) 破碎像素地牢 生存游戏 16 | - [0ad](https://archlinux.org/packages/extra/x86_64/0ad/) 被誉为开源帝国时代 17 | - [openra](https://archlinux.org/packages/community/any/openra/) 红警 1 的开源实现 18 | 19 | ## Steam 20 | 21 | [官方文档](https://wiki.archlinux.org/index.php/Steam) 22 | 23 | 一些字体和驱动已经在`新手上路`章节中配置完成。若有安装问题请自查。 24 | 25 | 此外,如果某些游戏启动或者游玩有问题,可以用终端使用`steam`命令启动 steam 客户端,并观察游戏崩溃时的终端报错。一般都是缺少某种依赖造成的,可以根据具体情况自行安装依赖。同时,archlinux 官方文档也提供了一个 [查错页面](https://wiki.archlinux.org/index.php/Steam/Game-specific_troubleshooting),记录了一些游戏崩溃的解决方式。 26 | 27 | 安装 Steam专有: 28 | 29 | ```bash 30 | sudo pacman -S steam 31 | ``` 32 | 33 | steam 上的游戏可分为有 Linux 原生支持的,以及通过[Steam Play](https://wiki.archlinux.org/index.php/Steam#Proton_Steam-Play)游玩的两大类。Steam Play(Proton) 基于 Wine,可以让你在 Linux 上游玩只支持 Windows 平台的游戏。关于非 Linux 平台的游戏,通过 Steam Play 运行的可玩程度,可通过[protondb](https://www.protondb.com/)这个网站进行查询。如果玩某个游戏出现问题,在这个网站里你也可以找到玩家发布的各个游戏的修正方式。有时最新版 Proton 可能存在问题,这时自行尝试其他版本即可。 34 | 35 | 另外,github 上还存在一些官方 Proton 的 fork 版本,如 [Proton GE](https://github.com/GloriousEggroll/proton-ge-custom),可以支持一些额外的,官方暂不支持或支持不完善的游戏。使用方式也很简单,根据官方文档,下载 release 的压缩包到指定位置,重启 steam 后即可选择特定版本的 GE proton。 36 | 37 | 如有些游戏启动器启动不了,可以去游戏目录尝试直接执行游戏本体的可执行文件。 38 | 39 | 有问题还可以去 github 查询。如 V 社的 [csgo 仓库](https://github.com/ValveSoftware/csgo-osx-linux/issues) 40 | 41 | 最近的 steam 官方的 proton 不能正确检测系统的 fsync,依然以 esync 模式启动游戏。更换 GE 版本的 proton 可以正确检测并使用 fsync 模式启动游戏。 42 | 43 | > 游戏锁区解决办法:让你的 steam 处于一个国家的代理下,如日本。先随便加一个游戏到购物车,在购物车右上角国家地区改成日本,再去访问已锁区的游戏,就可以浏览购买了。 44 | 45 | ## Lutris 46 | 47 | Lutris 基于 Wine,提供了大量游戏在 Linux 下的解决方案。其为你已经配置好了 Wine 相关的一切配置,你只需要安装游玩即可。一般极少需要额外配置。进入 [官网](https://lutris.net/) 在右上角搜索你想玩的游戏。点击进入游戏页面后,可以看到在相应版本右侧有一个 install 按钮,点击后即可拉起 Lurtis 进行安装。玩游戏前要先装好 [驱动](https://github.com/lutris/docs/blob/master/InstallingDrivers.md) 和 [依赖](https://github.com/lutris/docs/blob/master/WineDependencies.md)。注意,此两个文档中没有列出 vkd3d 与 lib32-vkd3d 两个可选安装项,然而目前大多数大型游戏均需安装此两个包,读者需按需添加安装。同时在 lutris 中,需要根据容器种类选择开启 Esync 或 Fsync。 48 | 49 | 在 Lutris 的各个游戏页面,一般有玩家上传的报告,如你遇到不能运行的状况,可以详细翻阅一下历史 Issue,包括已经标记为已解决的。 50 | 51 | 如果你发现还是无法登陆某些游戏,检查你的代理设置。比如你是国服的帐号,但是代理挂的是日本的,那是无法登陆的,可以换一个香港的代理再尝试。 52 | 53 | 如果无法更新游戏,在需要更新游戏的时候,将 Wine 版本设置为系统的 Wine staging 版本,如果最新的 wine-staging 版本仍然闪退,可以退回到以前可用的容器版本。如果依旧无法更新,可以尝试重新安装游戏启动器。在更新完毕后,需要启动游戏时,再将 wine 版本设置为 Lutris 自带的版本。 54 | 55 | 如遇到无法启动闪退的情况,可以尝试在命令行启动 Lutris,再启动游戏即可,玄学、不知道原因。如果启动器中启动游戏还是闪退,可以尝试把 Lutris 容器的启动文件从启动器改到游戏本体的可执行文件。还有另一个更通用的方式,可以使用 Lutris 的功能 `Run EXE inside wine prefix`,然后选择游戏本体就可以通过验证玩游戏了。`Run EXE inside wine prefix` 的位置在 Lutris 下方,点击小酒杯,最后一个。 56 | 57 | 如果习惯使用各类游戏插件,也可以安装在同一个容器里,一般功能是可以正常使用的。 58 | 59 | ## 原生 Wine 60 | 61 | 安装使用原生 [Wine](https://wiki.archlinux.org/index.php/Wine) 也可运行 windows 游戏,但是很多情况下需要你自行处理 Windows 下的依赖问题,常用的工具是 [winetricks](https://archlinux.org/packages/multilib/x86_64/winetricks/)。这种方式费时费力,只运行无需处理依赖的小游戏或者 gal 还好。 62 | 63 | 终端运行 winecfg,可以开启 wine 设置页面,按照终端提示可以安装缺少的包。 64 | 65 | ## Galgame 66 | 67 | 本小节对 Wine 运行 Galgame 可能存在的问题进行描述。 68 | 69 | 如果存在某些语言的字体问题,最直接的方法是将所需要的字体放置于容器的字体目录中。wine 的默认目录为`~/.wine`。 70 | 71 | 使用 Wine 运行游戏可能会出现 [GStreamer](https://wiki.archlinux.org/title/GStreamer) 插件缺失的问题,如 72 | 73 | ```bash 74 | Missing decoder: Advanced Streaming Format (ASF) (video/x-ms-asf) 75 | ``` 76 | 77 | 在按照 Wiki 安装好各个插件后,错误可能依然存在,这是因为大多 Galgame 需要 32 位兼容库,而目前 arch linux 官方 Multilib 仓库中的 gst32 位兼容库并不完整,如目前缺失`lib32-gst-plugins-ugly`这个包,此包目前只存在于 AUR 中,但是目前其 PKGBUILD 存在诸多问题导致无法直接安装成功。ASF 存在于此包中,因此缺失导致此报错。解决方式如下: 78 | 79 | 首先,`lib32-gst-plugins-ugly`的依赖之一`lib32-lv2`存在构建拼写检查问题。将`lib32-lv2`仓库 clone 到本地后,修改其 PKGBUILD 文件,将其中的 check 部分删除,然后使用`makepkg -si`手动安装即可。 80 | 81 | 接下来,`lib32-gst-plugins-ugly`依赖了另一个包`lib32-shaderc`,这个包的构建同样存在错误,并且它并不是必要的,所以直接在`lib32-gst-plugins-ugly`的 PKGBUILD 中将其删除,然后手动安装即可。 82 | 83 | 最后,通过 ldd 命令查询,目前`lib32-gst-plugins-ugly`中的 libgstlibav.so 所使用的 libvpx.so.8 无法找到,原因是因为目前`lib32-libvpx`包中的 libvpx.so 已经更新为 libvpx.so.9。由此在/usr/lib32 文件夹中创建指向 libvpx.so.9.0.0 的名为 libvpx.so.8 的符号链接即可解决。后续由于版本不匹配的类似问题均可依次类比解决。 84 | 85 | Ref: 86 | 87 | - https://bbs.archlinux.org/viewtopic.php?id=249982 88 | - https://archlinux.org/packages/?q=gst 89 | - https://aur.archlinux.org/packages/lib32-gst-plugins-ugly 90 | - https://docs.usebottles.com/faq/video-gstreamer-problems 91 | 92 | ## 性能提升 93 | 94 | 关闭 KDE 的合成器(Compositor)能显著提升游戏性能,解决画面撕裂不稳定等问题。 95 | 96 | ref: https://linux-gaming.kwindu.eu/index.php?title=Improving_performance 97 | 98 | 在进行某些游戏时,如《Total War: THREE KINGDOMS》,如遇到性能问题,可尝试调节 cpu 频率调节器[[1]](https://support.feralinteractive.com/docs/zh_cn/threekingdomstw/1.0.15/linux/faqs/?access=zooevrj6xb&utm_source=game_linux&utm_medium=link&utm_campaign=game_linux_threekingdomstw_support#i_linux_cpu_governor)。 99 | 100 | [GameMode](https://github.com/FeralInteractive/gamemode) 是一款综合性的游戏性能调整软件,其提供了多种游戏性能优化功能。如有需要可以查询 github 页面查看详情。 101 | 102 | ## 性能监控 103 | 104 | 和微星的 Afterburner 软件中性能显示的部分类似,Linux 上也有一款同类软件可以监控游戏中的电脑性能,名为[MangoHud](https://github.com/flightlessmango/MangoHud)。使用方式可参见此项目的 readme。在 ArchLinux 中,安装包 mangohud 以及 lib32-mangohud。 105 | 106 | 此外,MangoHud 官方提供图形化的参数设置软件 [GOverlay](https://github.com/benjamimgois/goverlay#arch--manjaro--other-arch-derivatives),可以自行选择安装。 107 | 108 | ## 可选内核更换 109 | 110 | 一般来说,采用了 fsync 的 patch 的内核游戏性能会更好。尤其在一些采用.Net 的 wine 游戏中,fsync 会有明显的性能提升[[1]](https://github.com/ValveSoftware/Proton/issues/3706#issuecomment-636632984)。目前 Linux 内核并没有加入 fsync 功能,可以更换 zen 内核。 111 | 112 | ```bash 113 | sudo pacman -S linux-zen linux-zen-headers 114 | ``` 115 | 116 | 安装完毕后重新更新一下 grub 即可。 117 | 118 | ```bash 119 | sudo grub-mkconfig -o /boot/grub/grub.cfg 120 | ``` 121 | 122 | > 如果你使用英伟达显卡,记得更换驱动为相应的 dkms 版本。一般来说较新的显卡安装 nvidia-dkms 即可。 123 | 124 | ## 游戏手柄 125 | 126 | 在 Arch Linux 中兼容性最好的手柄是 Xbox 手柄,其余手柄不建议使用。如果你使用无线适配器连接,安装使用[xone](https://github.com/medusalix/xone)。如果你使用蓝牙连接,安装使用[xpadneo](https://aur.archlinux.org/packages/xpadneo-dkms)。对于蓝牙连接,需要进行额外配置。 127 | 128 | 1. 首先需要启用 UserspaceHID,如果不这样做,手柄将无法正常连接,并开始循环连接和断开连接,并且 Xbox 按钮将不断闪烁。编辑配置文件: 129 | 130 | ```bash 131 | vim /etc/bluetooth/input.conf 132 | ``` 133 | 134 | 去掉`UserspaceHID`的注释并将值改为 true。 135 | 136 | 2. 接下来在主蓝牙配置文件中进行一些设置,以便 xpadneo 能够按预期工作,还需要解决输入延迟问题。编辑主文件: 137 | 138 | ```bash 139 | vim /etc/bluetooth/main.conf 140 | ``` 141 | 142 | 将以下参数改为以下值 143 | 144 | ```bash 145 | [General] 146 | Privacy = device 147 | JustWorksRepairing = always 148 | Class = 0x000100 149 | FastConnectable = true 150 | 151 | [LE] 152 | MinConnectionInterval=7 153 | MaxConnectionInterval=9 154 | ConnectionLatency=0 155 | ``` 156 | 157 | 最后重启电脑,进行连接即可。 158 | 159 | ref: https://www.reddit.com/r/linux_gaming/comments/smxqm2/how_to_use_xpadneo_with_an_xbox_series_controller/ 160 | 161 | ## Gamescope 162 | 163 | Gamescope 是 Valve 支持的专门针对游戏开发的独立合成器,其可以解决一些游戏的显示问题,如部分游戏在开启虚拟桌面时,虽然能全屏窗口化,但是依旧不能达到全屏展开的程度(依旧是原来游戏的低分辨率)。Gamescope 可在 lutris 中配合使用。目前 Gamescope 仍处于早期阶段。 164 | 165 | 注意英伟达显卡使用 Gamescope 必须使用英伟达闭源驱动,nvidia-open 开源驱动不受支持。除此之外必须添加内核参数`nvidia-drm.modeset=1`。 166 | 167 | Gamescope 的前任是 Xephyr,现已处于停滞状态。 168 | 169 | 详情查阅 Gamescope 文档:https://wiki.archlinux.org/title/Gamescope 170 | 171 | ## protonhax 172 | 173 | 有时,需要在 Proton 容器中运行游戏以外的其他程序,如修改器等。目前 Proton 默认无法满足此需求。这里使用 [protonhax](https://github.com/aoleg94/protonhax) 来完成在与游戏同一 Proton 容器这种运行其他程序。 174 | 175 | ```bash 176 | yay -S protonhax 177 | ``` 178 | 179 | 在游戏运行参数中设置`protonhax init %COMMAND%`,随后执行`protonhax ls`获取正在运行的游戏 appid。最后使用` protonhax run `在目标容器中运行其他程序。更多用法可参考项目仓库页面。 180 | 181 | Ref: https://www.reddit.com/r/linux_gaming/comments/pxs5es/running_a_second_program_inside_a_proton_prefix/?rdt=44318 182 | -------------------------------------------------------------------------------- /docs/postscript.md: -------------------------------------------------------------------------------- 1 | # 后记 2 | 3 | ArchLinuxStudio 始终将读者的隐私和安全放在首位,并持续为推动自由软件运动的发展做出努力,而这本`ArchLinux 安装使用教程`是本组织的初始项目,我们将最优先的保证它的项目质量。它将起到带领更多人进入自由软件世界的作用。 4 | 5 | 自由软件可以为大众带来什么?这是一个值得深入探究的问题。简单来说,它对每个用户都赋予足够的尊重,并给予用户选择的权利。专有软件践踏用户的隐私、尊严,做着无数无耻且肮脏的行为。用户在这些专有软件的眼中仅仅是一个个可以随意用来使用、贩卖与压迫的数据,而不是一个人。 6 | 7 | 然而更危险的是,在很多极权与威权国家,专有软件所属的商业公司与这些极权与威权政府狼狈为奸,不仅仅对人们进行全方面的监视,更加对民运人士以及异议人士进行秘密抓捕与迫害。很多时候,每当我们目睹这样的事件发生,就会为这些人们没有掌握使用自由软件,没有认识到自由软件的价值而叹息。 8 | 9 | > 哪里有压迫,哪里就有反抗。 10 | 11 | 这句话如今说来,恐怕会让世界上的某些政党羞愧与恐惧,这是非常讽刺的。有一些人会认为支持自由软件运动的人和组织关注政治是完全不可理解的,仿佛政治是与他们毫不相干的问题。实际上,这种看法是十分无知与愚蠢的。自由软件运动的主要目标就是保障用户本应享有的自由和尊严。然而在专制国家,人们在选举层面,金融层面,网络层面,言论层面等等方面被全方位的压制与压迫,这使得自由软件运动的支持者们无法袖手旁观。对于网络方面,他们开发出了突破互联网封锁的软件,如 V2ray 与 Shadowsocks,重新赋予人们自由访问互联网的权利。对于金融方面,他们开发出了区块链以及生长其上的加密货币体系,重新赋予人们**真正**掌握自己财产的权利,并且免于政府滥发货币而造成的财富掠夺。对于行政、选举以及决策方面,区块链的透明及不可篡改的特性保证了一切的公开、透明与公正。对于言论方面,长毛象、Telegram、Matrix 等软件重新赋予人们自由表达自己的言论的权利。 12 | 13 | > 兼听则明,偏信则暗。 14 | 15 | 这句中国的成语在很多方面都非常适用。编写代码,在阅读尽可能多的类似项目的源代码后,才能对所需要做的项目有更好的掌握。观看新闻,只有听取世界上各个国家、各个媒体的报道,并结合自己的思考才能得到一个较为理性的结论。做出决策,只有在听取相关人员的各个意见后,才能做出一个符合更多人利益的、更加合理与理性的决定。然而在威权与极权国家。我们看不到任何这种可能。互联网的封锁,使得这些国家的人们很难顺畅的或者根本不可能获取世界上的新闻资讯,最新的软件与技术,只能听到和看到威权与极权国家政府想让他们看到的东西。捂住人们的眼睛、耳朵,最后缝住他们的嘴巴。在这种情况下,人们只会被愈发变本加厉的蒙蔽,最终变得极端和愚笨。**我们无法做到目睹这一切,却无动于衷、袖手旁观。** 16 | 17 | 实际上,我们所做的一切几乎没有任何金钱收入,这对于很多奉行金钱至上理念的人是无法理解的。当然,这恰恰说明了我们与这些人有着本质的不同。士不可以不弘毅,任重而道远,很多人的志向是赚钱,但在这里不是。 18 | 19 | 随后也会有其他教程与读者们见面,同时 ArchLinuxStudio 也会继续开发各类自由软件、以及能够做到"Equal Internet access for all."的各类工具。只不过由于人力以及经济原因,我们无法保证更新的速度,但是我们可以保证的是,我们的速度可能会很慢,但是绝不会停止。 20 | 21 | --- 22 | 23 | 专有软件作恶、极权政府监控、抓捕和迫害,与冠绝全球的 Great Firewall 并驾齐驱,"我们赢了 🎉!" 24 | -------------------------------------------------------------------------------- /docs/res/QvPlugins/libQvPlugin-Command.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArchLinuxStudio/ArchLinuxTutorial/2c1fff9e3c0831b332588f6f15720b4ba2f068f4/docs/res/QvPlugins/libQvPlugin-Command.so -------------------------------------------------------------------------------- /docs/res/QvPlugins/libQvPlugin-LatencyTest.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArchLinuxStudio/ArchLinuxTutorial/2c1fff9e3c0831b332588f6f15720b4ba2f068f4/docs/res/QvPlugins/libQvPlugin-LatencyTest.so -------------------------------------------------------------------------------- /docs/res/QvPlugins/libQvPlugin-NaiveProxy.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArchLinuxStudio/ArchLinuxTutorial/2c1fff9e3c0831b332588f6f15720b4ba2f068f4/docs/res/QvPlugins/libQvPlugin-NaiveProxy.so -------------------------------------------------------------------------------- /docs/res/QvPlugins/libQvPlugin-TrojanGo.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArchLinuxStudio/ArchLinuxTutorial/2c1fff9e3c0831b332588f6f15720b4ba2f068f4/docs/res/QvPlugins/libQvPlugin-TrojanGo.so -------------------------------------------------------------------------------- /docs/res/cgproxy-0.19-1-x86_64.pkg.tar.zst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArchLinuxStudio/ArchLinuxTutorial/2c1fff9e3c0831b332588f6f15720b4ba2f068f4/docs/res/cgproxy-0.19-1-x86_64.pkg.tar.zst -------------------------------------------------------------------------------- /docs/res/libqv2ray-git-r160.eb10006-1-x86_64.pkg.tar.zst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArchLinuxStudio/ArchLinuxTutorial/2c1fff9e3c0831b332588f6f15720b4ba2f068f4/docs/res/libqv2ray-git-r160.eb10006-1-x86_64.pkg.tar.zst -------------------------------------------------------------------------------- /docs/res/qv2ray-git-3.0.0.rc1.r36.g0f1bf651-1-x86_64.pkg.tar.zst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArchLinuxStudio/ArchLinuxTutorial/2c1fff9e3c0831b332588f6f15720b4ba2f068f4/docs/res/qv2ray-git-3.0.0.rc1.r36.g0f1bf651-1-x86_64.pkg.tar.zst -------------------------------------------------------------------------------- /docs/res/qv2ray-plugin-interface-git-r88.b767b4c-1-x86_64.pkg.tar.zst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArchLinuxStudio/ArchLinuxTutorial/2c1fff9e3c0831b332588f6f15720b4ba2f068f4/docs/res/qv2ray-plugin-interface-git-r88.b767b4c-1-x86_64.pkg.tar.zst -------------------------------------------------------------------------------- /docs/res/uvw-2.11.0_libuv_v1.43-1-x86_64.pkg.tar.zst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArchLinuxStudio/ArchLinuxTutorial/2c1fff9e3c0831b332588f6f15720b4ba2f068f4/docs/res/uvw-2.11.0_libuv_v1.43-1-x86_64.pkg.tar.zst -------------------------------------------------------------------------------- /docs/res/v2ray-4.44.0-1-x86_64.pkg.tar.zst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArchLinuxStudio/ArchLinuxTutorial/2c1fff9e3c0831b332588f6f15720b4ba2f068f4/docs/res/v2ray-4.44.0-1-x86_64.pkg.tar.zst -------------------------------------------------------------------------------- /docs/res/yay-bin-11.1.2-1-x86_64.pkg.tar.zst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArchLinuxStudio/ArchLinuxTutorial/2c1fff9e3c0831b332588f6f15720b4ba2f068f4/docs/res/yay-bin-11.1.2-1-x86_64.pkg.tar.zst -------------------------------------------------------------------------------- /docs/res/yay-bin-12.3.3-1-x86_64.pkg.tar.zst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArchLinuxStudio/ArchLinuxTutorial/2c1fff9e3c0831b332588f6f15720b4ba2f068f4/docs/res/yay-bin-12.3.3-1-x86_64.pkg.tar.zst -------------------------------------------------------------------------------- /docs/resources/docsify-pagination.min.js: -------------------------------------------------------------------------------- 1 | !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e():"function"==typeof define&&define.amd?define(e):e()}(0,function(){"use strict";var t,p=(function(t,e){function n(t,e){return e.querySelector(t)}(e=t.exports=function(t,e){return n(t,e=e||document)}).all=function(t,e){return(e=e||document).querySelectorAll(t)},e.engine=function(t){if(!t.one)throw new Error(".one callback required");if(!t.all)throw new Error(".all callback required");return n=t.one,e.all=t.all,e}}(t={exports:{}},t.exports),t.exports);p.all,p.engine;try{var a=p}catch(t){a=p}var e=Element.prototype,r=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector,u=function(t,e){if(!t||1!==t.nodeType)return!1;if(r)return r.call(t,e);for(var n=a.all(e,t.parentNode),i=0;i*{line-height:1;vertical-align:middle}.pagination-item-label svg{height:.8em;width:auto;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1px}.pagination-item--next{margin-left:auto;text-align:right}.pagination-item--next svg{margin-left:.5em}.pagination-item--previous svg{margin-right:.5em}.pagination-item-title{font-size:1.6em}.pagination-item-subtitle{text-transform:uppercase;opacity:.3}");var o=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},l=function(){function i(t,e){for(var n=0;n ul > li"),p("p",e)),this.hyperlink=m(t))}return l(n,[{key:"toJSON",value:function(){if(this.hyperlink)return{name:this.hyperlink.innerText,href:this.hyperlink.getAttribute("href"),chapterName:this.chapter&&this.chapter.innerText||""}}}]),n}();var x={container:function(){return'
'},inner:function(t,e){return[t.prev&&'\n \n ",t.next&&'\n \n "].filter(Boolean).join("")}};window.$docsify=window.$docsify||{},window.$docsify.plugins=[function(t,e){var n=c({},s(e.config),e.config.pagination||{});function i(){var t=p("."+h);t&&(t.innerHTML=x.inner(function(t,e){var n=e.crossChapter,i=e.routerMode;try{var a=i===d.HISTORY?t.route.path:"#"+t.route.path,r=g(p.all(".sidebar-nav li a")).filter(function(t){return!u(t,".section-link")}),o=r.find(v(a)),l=g((f(o,"ul")||{}).children).filter(function(t){return"LI"===t.tagName.toUpperCase()}),c=n?r.findIndex(v(a)):l.findIndex(function(t){var e=m(t);return e&&v(a,e)}),s=n?r:l;return{prev:new y(s[c-1]).toJSON(),next:new y(s[c+1]).toJSON()}}catch(t){return{}}}(e,n),n))}t.afterEach(function(t){return t+x.container()}),t.doneEach(function(){return i()})}].concat(window.$docsify.plugins||[])}); -------------------------------------------------------------------------------- /docs/resources/plugins/gitalk.min.js: -------------------------------------------------------------------------------- 1 | $docsify.plugins=[].concat(function(i){var e=Docsify.dom;i.mounted(function(i){var n=e.create("div");n.id="gitalk-container";var t=e.getNode("#main");n.style="width: "+t.clientWidth+"px; margin: 0 auto 20px;",e.appendTo(e.find(".content"),n)}),i.doneEach(function(i){for(var n=document.getElementById("gitalk-container");n.hasChildNodes();)n.removeChild(n.firstChild);gitalk.render("gitalk-container")})},$docsify.plugins); -------------------------------------------------------------------------------- /docs/resources/plugins/search.min.js: -------------------------------------------------------------------------------- 1 | !function(){var u={},m={EXPIRE_KEY:"docsify.search.expires",INDEX_KEY:"docsify.search.index"};function p(e){var n={"&":"&","<":"<",">":">",'"':""","'":"'"};return String(e).replace(/[&<>"']/g,function(e){return n[e]})}function h(e){return e.text||"table"!==e.type||(e.cells.unshift(e.header),e.text=e.cells.map(function(e){return e.join(" | ")}).join(" |\n ")),e.text}function f(e){return e.text||"list"!==e.type||(e.text=e.raw),e.text}function g(i,e,r,o){void 0===e&&(e="");var s,e=window.marked.lexer(e),c=window.Docsify.slugify,d={},l="";return e.forEach(function(e,n){if("heading"===e.type&&e.depth<=o){var t=function(e){void 0===e&&(e="");var a={};return{str:e=e&&e.replace(/^('|")/,"").replace(/('|")$/,"").replace(/(?:^|\s):([\w-]+:?)=?([\w-%]+)?/g,function(e,n,t){return-1===n.indexOf(":")?(a[n]=t&&t.replace(/"/g,"")||!0,""):e}).trim(),config:a}}(e.text),a=t.str,t=t.config;s=t.id?r.toURL(i,{id:c(t.id)}):r.toURL(i,{id:c(p(e.text))}),a&&(l=a.replace(//,"").replace(/{docsify-ignore}/,"").replace(//,"").replace(/{docsify-ignore-all}/,"").trim()),d[s]={slug:s,title:l,body:""}}else{if(0===n&&(s=r.toURL(i),d[s]={slug:s,title:"/"!==i?i.slice(1):"Home Page",body:e.text||""}),!s)return;d[s]?d[s].body?(e.text=h(e),e.text=f(e),d[s].body+="\n"+(e.text||"")):(e.text=h(e),e.text=f(e),d[s].body=d[s].body?d[s].body+e.text:e.text):d[s]={slug:s,title:"",body:""}}}),c.clear(),d}function y(e){return e&&e.normalize?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e}function r(i,r){var t,a,n,e,o="auto"===i.paths,s=o?(t=r.router,a=[],Docsify.dom.findAll(".sidebar-nav a:not(.section-link):not([data-nosearch])").forEach(function(e){var n=e.href,e=e.getAttribute("href"),n=t.parse(n).path;n&&-1===a.indexOf(n)&&!Docsify.util.isAbsolutePath(e)&&a.push(n)}),a):i.paths,c="";s.length&&o&&i.pathNamespaces?(n=s[0],Array.isArray(i.pathNamespaces)?c=i.pathNamespaces.filter(function(e){return n.slice(0,e.length)===e})[0]||c:i.pathNamespaces instanceof RegExp&&((d=n.match(i.pathNamespaces))&&(c=d[0])),e=-1===s.indexOf(c+"/"),d=-1===s.indexOf(c+"/README"),e&&d&&s.unshift(c+"/")):-1===s.indexOf("/")&&-1===s.indexOf("/README")&&s.unshift("/");var d,l=((d=i.namespace)?m.EXPIRE_KEY+"/"+d:m.EXPIRE_KEY)+c,p=((d=i.namespace)?m.INDEX_KEY+"/"+d:m.INDEX_KEY)+c,c=localStorage.getItem(l)l.length&&(a=l.length),t="..."+c.substring(n,a).replace(t,function(e){return''+e+""})+"...",o+=t)}),0\n

'+e.title+"

\n

"+e.content+"

\n\n"}),t.classList.add("show"),a.classList.add("show"),t.innerHTML=r||'

'+s+"

",o.hideOtherSidebarContent&&(i&&i.classList.add("hide"),n&&n.classList.add("hide"))}function d(e){o=e}function l(e,n){var t,a,i=n.router.parse().query.s;d(e),Docsify.dom.style("\n.sidebar {\n padding-top: 0;\n}\n\n.search {\n margin-bottom: 20px;\n padding: 6px;\n border-bottom: 1px solid #eee;\n}\n\n.search .input-wrap {\n display: flex;\n align-items: center;\n}\n\n.search .results-panel {\n display: none;\n}\n\n.search .results-panel.show {\n display: block;\n}\n\n.search input {\n outline: none;\n border: none;\n width: 100%;\n padding: 0 7px;\n line-height: 36px;\n font-size: 14px;\n border: 1px solid transparent;\n}\n\n.search input:focus {\n box-shadow: 0 0 5px var(--theme-color, #42b983);\n border: 1px solid var(--theme-color, #42b983);\n}\n\n.search input::-webkit-search-decoration,\n.search input::-webkit-search-cancel-button,\n.search input {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n}\n.search .clear-button {\n cursor: pointer;\n width: 36px;\n text-align: right;\n display: none;\n}\n\n.search .clear-button.show {\n display: block;\n}\n\n.search .clear-button svg {\n transform: scale(.5);\n}\n\n.search h2 {\n font-size: 17px;\n margin: 10px 0;\n}\n\n.search a {\n text-decoration: none;\n color: inherit;\n}\n\n.search .matching-post {\n border-bottom: 1px solid #eee;\n}\n\n.search .matching-post:last-child {\n border-bottom: 0;\n}\n\n.search p {\n font-size: 14px;\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n}\n\n.search p.empty {\n text-align: center;\n}\n\n.app-name.hide, .sidebar-nav.hide {\n display: none;\n}"),function(e){void 0===e&&(e="");var n='
\n \n
\n \n \n \n \n \n
\n
\n
\n ',e=Docsify.dom.create("div",n),n=Docsify.dom.find("aside");Docsify.dom.toggleClass(e,"search"),Docsify.dom.before(n,e)}(i),n=Docsify.dom.find("div.search"),a=Docsify.dom.find(n,"input"),e=Docsify.dom.find(n,".input-wrap"),Docsify.dom.on(n,"click",function(e){return-1===["A","H2","P","EM"].indexOf(e.target.tagName)&&e.stopPropagation()}),Docsify.dom.on(a,"input",function(n){clearTimeout(t),t=setTimeout(function(e){return c(n.target.value.trim())},100)}),Docsify.dom.on(e,"click",function(e){"INPUT"!==e.target.tagName&&(a.value="",c())}),i&&setTimeout(function(e){return c(i)},500)}function v(e,n){var t,a,i,r,o;d(e),t=e.placeholder,a=n.route.path,(r=Docsify.dom.getNode('.search input[type="search"]'))&&("string"==typeof t?r.placeholder=t:(i=Object.keys(t).filter(function(e){return-1>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:a},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:a},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:a.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:a.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var o=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],s=a.variable[1].inside,i=0;i0&&void 0!==arguments[0]?arguments[0]:{},r=i.backgroundColor,d=void 0===r?"#000":r,a=i.cornerOffset,c=void 0===a?20:a,s=i.diameter,l=void 0===s?56:s,u=i.ease,p=void 0===u?function(o){return.5*(1-Math.cos(Math.PI*o))}:u,m=i.id,h=void 0===m?"back-to-top":m,b=i.innerHTML,v=void 0===b?'':b,f=i.onClickScrollTo,x=void 0===f?0:f,w=i.scrollContainer,g=void 0===w?document.body:w,k=i.scrollDuration,y=void 0===k?100:k,T=i.showWhenScrollTopIs,M=void 0===T?1:T,z=i.size,E=void 0===z?l:z,C=i.textColor,L=void 0===C?"#fff":C,N=i.zIndex,I=void 0===N?1:N,A=g===document.body,B=A&&document.documentElement;o=Math.round(.43*E),t=Math.round(.29*E),e="#"+h+"{background:"+d+";-webkit-border-radius:50%;-moz-border-radius:50%;border-radius:50%;bottom:"+c+"px;-webkit-box-shadow:0 2px 5px 0 rgba(0,0,0,.26);-moz-box-shadow:0 2px 5px 0 rgba(0,0,0,.26);box-shadow:0 2px 5px 0 rgba(0,0,0,.26);color:"+L+";cursor:pointer;display:block;height:"+E+"px;opacity:1;outline:0;position:fixed;right:"+c+"px;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;-webkit-transition:bottom .2s,opacity .2s;-o-transition:bottom .2s,opacity .2s;-moz-transition:bottom .2s,opacity .2s;transition:bottom .2s,opacity .2s;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:"+E+"px;z-index:"+I+"}#"+h+" svg{display:block;fill:currentColor;height:"+o+"px;margin:"+t+"px auto 0;width:"+o+"px}#"+h+".hidden{bottom:-"+E+"px;opacity:0}",(n=document.createElement("style")).appendChild(document.createTextNode(e)),document.head.insertAdjacentElement("afterbegin",n);var D=function(){var o=document.createElement("div");return o.id=h,o.className="hidden",o.innerHTML=v,o.addEventListener("click",function(o){o.preventDefault(),function(){var o="function"==typeof x?x():x,t=window,e=t.performance,n=t.requestAnimationFrame;if(y<=0||void 0===e||void 0===n)return q(o);var i=e.now(),r=j(),d=r-o;n(function o(t){var e=Math.min((t-i)/y,1);q(r-Math.round(p(e)*d)),e<1&&n(o)})}()}),document.body.appendChild(o),o}(),H=!0;function S(){j()>=M?function(){if(!H)return;D.className="",H=!1}():function(){if(H)return;D.className="hidden",H=!0}()}function j(){return g.scrollTop||B&&document.documentElement.scrollTop||0}function q(o){g.scrollTop=o,B&&(document.documentElement.scrollTop=o)}(A?window:g).addEventListener("scroll",S),S()} -------------------------------------------------------------------------------- /docs/rookie/archlinux_pre_install.md: -------------------------------------------------------------------------------- 1 | # 安装前的准备 2 | 3 | 由于当前 UEFI 已普及十余年,安装将全部以 UEFI+GPT 的形式进行,传统 BIOS 方式不再赘述。 4 | 5 | ## 0.终端编辑器 vim 的使用 6 | 7 | 在安装 Arch Linux 的过程中,需要使用到 vim 编辑器,如果你不会使用,这里首先进行一个简要的介绍,你需要掌握如下基本操作。实践的环境可以找一个在线的 Linux 体验环境进行 vim 的尝试,如[copy.sh](https://copy.sh/v86/?profile=archlinux)。注意,由于其是在线环境,所以性能较差,执行 vim 命令时需要耐心等待。 8 | 9 | ```bash 10 | vim 1.txt #创建并编辑名为1.txt的文件 11 | ``` 12 | 13 | 你可以看到进入了一个空的界面。此时你处在 vim 的`命令模式`。在`命令模式`下,可以用一些快捷指令来对文本进行操作。 14 | 现在我们输入`a`进入 vim 的`编辑模式`,此时输入任意文本,即可进行编辑。 15 | 在输入完成后,我们按下 Esc 键,即可从`编辑模式`退出到`命令模式`。此时输入`:wq`即可保存并退出 vim。 16 | 下面介绍一些在命令模式下常用的命令 17 | 18 | ```bash 19 | :wq # 保存退出 20 | :q! # 不保存,强制退出 21 | dd # 删除一行 22 | 2dd # 删除两行 23 | gg # 回到文本第一行 24 | shift+g # 转到文本最后一行 25 | /xxx # 在文中搜索内容'xxx' 回车搜索,按n键转到下一个 26 | ?xxx # 反向搜索 27 | ``` 28 | 29 | 拓展链接:需要完整教程的读者可以在终端中输入命令`vimtutor`来学习完整的 vim 教程。 30 | 31 | ## 1.确保网络环境 32 | 33 | 如果你可以使用路由器分接出来的网线,以 dhcp 的方式直接上网,那么不用准备什么。如果你的环境只能使用无线网络安装,需要事先把自己所用的 wifi 名称改成自己能记住的英文名称。因为**安装时无法显示和输入中文名的 wifi**,你会看到一堆不知道是什么的方块,并且在安装过程中你将没有办法输入中文的无线名称进行连接。虽然通过一些繁琐的步骤可以解决终端中文的问题,但是显然这么做在安装 Arch Linux 时毫无必要。 34 | 35 | 其次,有些笔记本电脑上存在无线网卡的硬件开关或者键盘控制,开机后安装前需要**确保你的无线网卡硬件开关处于打开状态**。 36 | 37 | ## 2.刻录启动优盘 38 | 39 | 准备一个 2G 以上的优盘,刻录一个安装启动盘。安装镜像 iso 在[下载页面](https://archlinux.org/download/)下载,注意,你需要选择最新的镜像下载,选择通过磁力链接或 torrent 下载,下载完成后,还需要在 archlinux 下载页面下载`PGP signature`签名文件(不要从镜像源下载签名文件),将签名文件和 iso 镜像置于同一文件夹,随后进行对镜像的签名校验,以保证下载的镜像是完整,无错误的,未被篡改的。若你使用 Linux,执行以下命令,确保输出完好的签名。具体镜像名根据名字自行修改。如果你使用其他系统,请自行搜索验证签名的方式。 40 | 41 | ```bash 42 | gpg --keyserver-options auto-key-retrieve --verify archlinux-202x.0x.01-x86_64.iso.sig 43 | ``` 44 | 45 | 注意,这里的签名校验**非常重要**,这可以保证你的安装镜像是未被篡改的,同时可以保证你在使用安装盘安装系统时,用正确的公钥校验安装包。 46 | 47 | --- 48 | 49 | Windows 下推荐使用[ventoy](https://www.ventoy.net/cn/doc_start.html)或者[Rufus](https://rufus.ie/)或者[etcher](https://github.com/balena-io/etcher)进行优盘刻录。三者皆为自由软件。具体操作请自行查阅,都非常简单。 50 | 51 | Linux 下可以直接用 dd 命令进行刻录。注意 of 的参数为 sdx,不是 sdx1 sdx2 等。 52 | 53 | ```bash 54 | sudo dd bs=4M if=/path/to/archlinux.iso of=/dev/sdx status=progress oflag=sync 55 | ``` 56 | 57 | > bs=4M 指定一个较为合理的文件输入输出块大小。 58 | > status=progress 用来输出刻录过程总的信息。 59 | > oflag=sync 用来控制写入数据时的行为特征。确保命令结束时数据及元数据真正写入磁盘,而不是刚写入缓存就返回。 60 | 61 | ## 3.进入主板 BIOS 进行设置 62 | 63 | 插入优盘并开机。在开机的时候,按下 F2/F8/F10/DEL 等(取决与你的主板型号,具体请查阅你主板的相关信息)按键,进入主板的 BIOS 设置界面。 64 | 65 | ## 4.关闭主板设置中的 Secure Boot 66 | 67 | 在类似名为 `security` 的选项卡中,找到一项名为 Secure Boot(名称可能略有差异)的选项,选择 Disable 将其禁用。 68 | 69 | ## 5.调整启动方式为 UEFI 70 | 71 | 在某些旧的主板里,需要调整启动模式为 UEFI,而非传统的 BIOS/CSM。在类似名为 `boot` 的选项卡中,找到类似名为 Boot Mode 的选项,确保将其调整为 UEFI only,而非 legacy/CSM。 72 | 73 | ## 6.调整硬盘启动顺序 74 | 75 | 在类似名为 `boot` 的选项卡中,找到类似名为 Boot Options(名称可能略有差异)的设置选项,将 USB 优盘的启动顺序调至首位。 76 | 77 | ## 7.准备安装 78 | 79 | 最后保存 BIOS 设置并退出,一般的按键是 F10。此时系统重启,不出意外你应该已经进入 archlinux 的安装界面。 80 | -------------------------------------------------------------------------------- /docs/rookie/basic_install.md: -------------------------------------------------------------------------------- 1 | # Arch Linux 基础安装 2 | 3 | 本节从安装最基础的无图形化 ArchLinux 系统开始。[官方安装指南](https://wiki.archlinux.org/index.php/Installation_guide) 4 | 5 | ## 0.禁用 reflector 6 | 7 | reflector 会为你选择速度合适的镜像源,但其结果并不准确,同时会清空配置文件中的内容,对于新人来讲并不适用,我们首先对其进行禁用。 8 | 9 | ```bash 10 | systemctl stop reflector.service 11 | ``` 12 | 13 | ## 1.再次确保是否为 UEFI 模式 14 | 15 | 在一系列的信息刷屏后,可以看到已经以 root 登陆安装系统了,此时可以执行的命令: 16 | 17 | ```bash 18 | ls /sys/firmware/efi/efivars 19 | ``` 20 | 21 | 若输出了一堆东西,即 efi 变量,则说明已在 UEFI 模式。否则请确认你的启动方式是否为 UEFI。 22 | 23 | ## 2.连接网络 24 | 25 | 一般来说,你连接的网络几乎均可以通过 DHCP 的方式来进行 IP 地址和 DNS 的相关设置,你无需进行额外操作。在没有合适网络的情况下,使用手机的移动热点也是很方便的选择。如果你的网络环境需要配置静态 IP 和 DNS,请自行参考 Arch Wiki。 26 | 27 | 对于有线连接来说,直接插入网线即可。 28 | 29 | 对于无线连接,则需进行如下操作进行网络连接。 30 | 31 | 无线连接使用 iwctl 命令进行,按照如下步骤进行网络连接: 32 | 33 | ```bash 34 | iwctl #执行iwctl命令,进入交互式命令行 35 | device list #列出设备名,比如无线网卡看到叫 wlan0 36 | station wlan0 scan #扫描网络 37 | station wlan0 get-networks #列出网络 比如想连接YOUR-WIRELESS-NAME这个无线 38 | station wlan0 connect YOUR-WIRELESS-NAME #进行连接 输入密码即可 39 | exit #成功后exit退出 40 | ``` 41 | 42 | 可以等待几秒等网络建立链接后再进行下面测试网络的操作。 43 | 44 | ```bash 45 | ping www.gnu.org 46 | ``` 47 | 48 | --- 49 | 50 | **如果**你不能正常连接网络,首先确认系统已经启用网络接口[[1]](https://wiki.archlinux.org/index.php/Network_configuration/Wireless#Check_the_driver_status)。 51 | 52 | ```bash 53 | ip link #列出网络接口信息,如不能联网的设备叫wlan0 54 | ip link set wlan0 up #比如无线网卡看到叫 wlan0 55 | ``` 56 | 57 | **如果**随后看到类似`Operation not possible due to RF-kill`的报错,继续尝试`rfkill`命令来解锁无线网卡。 58 | 59 | ```bash 60 | rfkill unblock wifi 61 | ``` 62 | 63 | ## 3.更新系统时钟 64 | 65 | ```bash 66 | timedatectl set-ntp true #将系统时间与网络时间进行同步 67 | timedatectl status #检查服务状态 68 | ``` 69 | 70 | ## 4.分区 71 | 72 | 这里总共设置三个分区,是一个**我们认为**较为通用的方案。此步骤会清除磁盘中全部内容,请事先确认。 73 | 74 | - EFI 分区[[2]](https://wiki.archlinux.org/title/EFI_system_partition#Mount_the_partition): `/efi` 800M 75 | - 根目录: `/` 100G 76 | - 用户主目录: `/home` 剩余全部 77 | 78 | > 这里根目录的大小仅为参考,一般来说个人日常使用的 linux 分配 100G 已经够用了。根目录最小建议不小于 50G,根目录过小会造成无法更新系统软件包等问题。 79 | 80 | 首先将磁盘转换为 gpt 类型,这里假设比如你想安装的磁盘名称为 sdx。如果你使用 NVME 的固态硬盘,你看到的磁盘名称可能为 nvme0n1。 81 | 82 | ```bash 83 | lsblk #显示分区情况 找到你想安装的磁盘名称 84 | parted /dev/sdx #执行parted,进入交互式命令行,进行磁盘类型变更 85 | (parted)mktable #输入mktable 86 | New disk label type? gpt #输入gpt 将磁盘类型转换为gpt 如磁盘有数据会警告,输入yes即可 87 | quit #最后quit退出parted命令行交互 88 | 89 | ``` 90 | 91 | 接下来使用 cfdisk 命令对磁盘分区。进入 cfdisk 后的操作很直观,用键盘的方向键、Tab 键、回车键配合即可操作分配各个分区的大小与格式。一般建议将 EFI 分区设置为磁盘的第一个分区,据说有些主板如果不将 EFI 设置为第一个分区,可能有不兼容的问题。其中 EFI 分区选择`EFI System`类型,其余两个分区选择`Linux filesystem`类型。 92 | 93 | ```bash 94 | cfdisk /dev/sdx #来执行分区操作,分配各个分区大小,类型 95 | fdisk -l #分区结束后, 复查磁盘情况 96 | ``` 97 | 98 | ## 5.格式化 99 | 100 | 建立好分区后,需要对分区用合适的文件系统进行格式化。这里用`mkfs.ext4`命令格式化根分区与 home 分区,用`mkfs.vfat`命令格式化 EFI 分区。如下命令中的 sdax 中,x 代表分区的序号。格式化命令要与上一步分区中生成的分区名字对应才可以。 101 | 102 | 磁盘若事先有数据,会提示你: 'proceed any way?' 按 y 回车继续即可。 103 | 104 | ```bash 105 | mkfs.ext4 /dev/sdax #格式化根目录和home目录的两个分区 106 | mkfs.vfat /dev/sdax #格式化efi分区 107 | ``` 108 | 109 | ## 6.挂载 110 | 111 | 在挂载时,挂载是有顺序的,先挂载根分区,再挂载 EFI 分区。 112 | 这里的 sdax 只是例子,具体根据你自身的实际分区情况来。 113 | 114 | ```bash 115 | mount /dev/sdax /mnt 116 | mkdir /mnt/efi #创建efi目录 117 | mount /dev/sdax /mnt/efi 118 | mkdir /mnt/home #创建home目录 119 | mount /dev/sdax /mnt/home 120 | ``` 121 | 122 | ## 7.镜像源的选择 123 | 124 | 使用如下命令编辑镜像列表: 125 | 126 | ```bash 127 | vim /etc/pacman.d/mirrorlist 128 | ``` 129 | 130 | 其中的首行是将会使用的镜像源。添加中科大或者清华的放在最上面即可。 131 | 132 | ``` 133 | Server = https://mirrors.ustc.edu.cn/archlinux/$repo/os/$arch 134 | Server = https://mirrors.tuna.tsinghua.edu.cn/archlinux/$repo/os/$arch 135 | ``` 136 | 137 | 如果其速度不佳,可以手动指定其他镜像源。完整的镜像源列表可参考官方[镜像源生成器](https://archlinux.org/mirrorlist/)。 138 | 139 | > 这里使用中国境内的镜像源以提高访问速度。然而这存在问题,镜像源(如 arch linux 清华镜像源)以及第三方源(如 archlinux-cn)可以知道你的 ip 是什么,什么时候更新了系统,什么时候检查了系统,什么时候更新了什么软件,你安装的软件列表是什么。在威权国家的镜像源维护者完全有可能根据威权当局的要求提供这些数据,很多维护者在网络上几乎是实名上网的,他们没有任何抵抗能力,进一步的,威权国家可以根据这些元数据与你产生的其他元数据进行比对,从而对你进行进一步的定位与辨识。简单举一个例子,要求维护者提供或监视安装了 v2ray/qv2ray 等软件包的使用者的 ip,以及安装时间,以及其全部软件列表。 140 | 141 | > 如果你在安装 arch linux 时的网络已经处于代理模式下,可以选择一个与你代理位置较近的,非威权国家的镜像源来使用。如果你在安装 arch linux 时的网络环境没有代理,那么在安装结束后,需要尽快更换一个非威权国家的镜像源来使用。如下列举一些较为优质的国际源。 142 | 143 | ```bash 144 | Server = https://mirror.archlinux.tw/ArchLinux/$repo/os/$arch #东亚地区:中华民国 145 | Server = https://mirror.0xem.ma/arch/$repo/os/$arch #北美洲地区:加拿大 146 | Server = https://mirror.aktkn.sg/archlinux/$repo/os/$arch #东南亚地区:新加坡 147 | Server = https://archlinux.uk.mirror.allworldit.com/archlinux/$repo/os/$arch #欧洲地区:英国 148 | Server = https://mirrors.cat.net/archlinux/$repo/os/$arch #东亚地区:日本 149 | ``` 150 | 151 | ## 8.安装系统 152 | 153 | 必须的基础包 154 | 155 | ```bash 156 | pacstrap /mnt base base-devel linux linux-headers linux-firmware #base-devel在AUR包的安装是必须的 157 | ``` 158 | 159 | > 注意,目前需要首先确保等待 pacman-init.service 服务启动后,才能执行 pacstrap 或 pacman 命令安装包,否则会引发错误使得安装过程无法进行。使用`systemctl status pacman-init.service`命令来检查当前服务状态。更多内容参考 bbs 中的[帖子](https://bbs.archlinux.org/viewtopic.php?id=278518&p=2) 160 | 161 | > 若安装时出现密钥环相关错误,参考此文章[GnuPG-2.1 and the pacman keyring](https://archlinux.org/news/gnupg-21-and-the-pacman-keyring/)并执行其中的命令。 162 | 163 | 必须的功能性软件 164 | 165 | ```bash 166 | pacstrap /mnt dhcpcd iwd vim bash-completion #一个有线所需(iwd也需要dhcpcd) 一个无线所需 一个编辑器 一个补全工具 167 | ``` 168 | 169 | ## 9.生成 fstab 文件 170 | 171 | fstab 用来定义磁盘分区 172 | 173 | ```bash 174 | genfstab -U /mnt >> /mnt/etc/fstab 175 | ``` 176 | 177 | 复查一下 /mnt/etc/fstab 确保没有错误 178 | 179 | ```bash 180 | cat /mnt/etc/fstab 181 | ``` 182 | 183 | ## 10.change root 184 | 185 | 把环境切换到新系统的/mnt 下 186 | 187 | ```bash 188 | arch-chroot /mnt 189 | ``` 190 | 191 | ## 11.时区设置 192 | 193 | 设置时区,在/etc/localtime 下用/usr 中合适的时区创建符号连接。如下设置上海时区。 194 | 195 | ```bash 196 | ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime 197 | ``` 198 | 199 | 随后进行硬件时间设置,将当前的正确 UTC 时间写入硬件时间。 200 | 201 | ```bash 202 | hwclock --systohc 203 | ``` 204 | 205 | ## 12.设置 Locale 进行本地化 206 | 207 | Locale 决定了地域、货币、时区日期的格式、字符排列方式和其他本地化标准。 208 | 209 | 首先使用 vim 编辑 /etc/locale.gen,去掉 en_US.UTF-8 所在行以及 zh_CN.UTF-8 所在行的注释符号(#)。这里需要使用 vim 的寻找以及编辑功能,如果你忘记了,请翻到上一节复习 vim 的操作。 210 | 211 | ```bash 212 | vim /etc/locale.gen 213 | ``` 214 | 215 | 然后使用如下命令生成 locale。 216 | 217 | ```bash 218 | locale-gen 219 | ``` 220 | 221 | 最后向 /etc/locale.conf 导入内容 222 | 223 | ```bash 224 | echo 'LANG=en_US.UTF-8' > /etc/locale.conf 225 | ``` 226 | 227 | ## 13.设置主机名 228 | 229 | 首先在`/etc/hostname`设置主机名 230 | 231 | ```bash 232 | vim /etc/hostname 233 | ``` 234 | 235 | 加入你想为主机取的主机名,这里比如叫 myarch。 236 | 237 | 接下来在`/etc/hosts`设置与其匹配的条目。 238 | 239 | ``` 240 | vim /etc/hosts 241 | ``` 242 | 243 | 加入如下内容 244 | 245 | ```bash 246 | 127.0.0.1 localhost 247 | ::1 localhost 248 | 127.0.1.1 myarch 249 | ``` 250 | 251 | > 某些情况下如不设置主机名,在 KDE 下可能会存在网络情况变更时无法启动 GUI 应用的问题,在终端中出现形如`No protocol specified qt.qpa.xcb: could not connect to display`的错误,这种情况较为少见[[3]](https://bbs.archlinux.org/viewtopic.php?id=241338)[[4]](https://bbs.archlinux.org/viewtopic.php?id=243674)[[5]](https://wiki.archlinux.org/title/Network_configuration#Local_hostname_resolution)。 252 | 253 | ## 14.为 root 用户设置密码 254 | 255 | ```bash 256 | passwd root 257 | ``` 258 | 259 | ## 15.安装微码 260 | 261 | ```bash 262 | pacman -S intel-ucode #Intel 263 | pacman -S amd-ucode #AMD 264 | ``` 265 | 266 | ## 16.安装引导程序 267 | 268 | ```bash 269 | pacman -S grub efibootmgr #grub是启动引导器,efibootmgr被 grub 脚本用来将启动项写入 NVRAM。 270 | grub-install --target=x86_64-efi --efi-directory=/efi --bootloader-id=GRUB 271 | ``` 272 | 273 | 接下来编辑/etc/default/grub 文件,去掉`GRUB_CMDLINE_LINUX_DEFAULT`一行中最后的 quiet 参数,同时把 log level 的数值从 3 改成 5。这样是为了后续如果出现系统错误,方便排错。同时在同一行加入 nowatchdog 参数,这可以显著提高开关机速度。这里需要使用 vim 的编辑功能,如果你忘记了,请翻到上一节复习 vim 的操作。 274 | 275 | ```bash 276 | vim /etc/default/grub 277 | ``` 278 | 279 | 使用 N 卡的用户需要注意,KDE6 默认使用 wayland session 为默认,如果你需要使用 wayland,则需开启 DRM。同样编辑/etc/default/grub 文件,在`GRUB_CMDLINE_LINUX_DEFAULT`一行中最后的加入参数:nvidia_drm.modeset=1 280 | 281 | 最后生成 GRUB 所需的配置文件 282 | 283 | ```bash 284 | grub-mkconfig -o /boot/grub/grub.cfg 285 | ``` 286 | 287 | > 我们在之前的命令中指定了 bootloader-id 为 GRUB,这一般不会出现问题。然而在某些主板安装完成后,你会发现没有 nvme 启动条目。这是因为某些主板的 UEFI 固件在显示 UEFI NVRAM 引导条目之前,需要在特定的位置存放可引导文件,不支持自定义存放 efi 文件[[6]](https://wiki.archlinux.org/index.php/GRUB#Default/fallback_boot_path)。解决方式是使用`--removable` 参数解决一些主板 NVRAM 的兼容性问题。 288 | 289 | ```bash 290 | grub-install --target=x86_64-efi --efi-directory=/efi --removable 291 | grub-mkconfig -o /boot/grub/grub.cfg 292 | ``` 293 | 294 | 除此之外,如果你的主板是一些较老的型号,如 intel 9 系列以下或者较老 AMD 的主板,它们很可能不支持从 nvme 启动系统,虽然可以通过修改 BIOS 加入 NVME 支持模块来解决,但这不在本文讨论范围内。 295 | 296 | ## 17.完成安装 297 | 298 | ```bash 299 | exit # 退回安装环境# 300 | umount -R /mnt # 卸载新分区 301 | reboot # 重启 302 | ``` 303 | 304 | 注意,重启前要先拔掉优盘,否则你重启后还是进安装程序而不是安装好的系统。重启后,开启 dhcp 服务,即可连接网络 305 | 306 | ```bash 307 | systemctl start dhcpcd #立即启动dhcp 308 | ping www.gnu.org #测试网络连接 309 | ``` 310 | 311 | 若为无线链接,则还需要启动 iwd 才可以使用 iwctl 连接网络 312 | 313 | ```bash 314 | systemctl start iwd #立即启动iwd 315 | iwctl #和之前的方式一样,连接无线网络 316 | ``` 317 | 318 | 到此为止,一个基础的,无 UI 界面的 Arch Linux 已经安装完成了。紧接着下一节,我们来安装图形界面。 319 | 320 | > archlinux 在 2021 年 4 月在安装镜像中内置了一个[安装脚本](https://archlinux.org/packages/extra/any/archinstall/),提供一些选项,即可快速安装。其和所有一键安装脚本类似,提供自动化,且不灵活的安装过程。不建议使用这种安装脚本,除了不灵活的原因,初学者也无法在这种安装过程中学到任何东西。如果你因为任何原因需要快速启动一个基础的 archlinux 环境,那么可以尝试此脚本。 321 | -------------------------------------------------------------------------------- /docs/rookie/fxckGFW.md: -------------------------------------------------------------------------------- 1 | # 魔法学院 2 | 3 | > **[访问互联网权](https://zh.wikipedia.org/wiki/%E8%A8%AA%E5%95%8F%E4%BA%92%E8%81%AF%E7%B6%B2%E6%AC%8A)认为所有人必须能够访问互联网,以行使和享受其言论自由、通信自由、见解自由以及其他基本人权。任何国家及地区不合理地限制个人对互联网的访问都是对基本人权的践踏。** 4 | 5 | **为了你的人身安全,不要在任何装有具有间谍性质的专有软件的设备上使用科学上网客户端。这些设备可以是手机,PC 等。在手机上,威权政府的监管机构可以轻易得到你所安装的应用列表,并可以通过各种手段关联并查询到你所做的事和发表的言论,并采取进一步控制,这是有先例的。理论上,在 PC 设备上也完全存在这种可能。如果你必须要使用微信,QQ 等具有间谍性质的专有软件,请在完全隔离的物理设备中使用。更多内容请阅读[现代隐私保护指南](https://archlinuxstudio.github.io/ModernSecurityProtectionGuide/#/),这对你的安全非常重要!** 6 | 7 | 本节描述如何在 linux 下进行科学上网。本节以及后续的全局代理章节都是**必读章节**。如果没有配置好科学上网,那么你在日常使用中会遇到各种问题,不论是被封锁的资源或代码,还是查阅相关问题资料,你都会有可能无法下载和浏览。所有人**必须**配置好科学上网再继续。 8 | 9 | ## 1.节点的准备 10 | 11 | 简单来讲节点是形如如下的神秘链接,不论你以何种方式获得的这些连接,如果你已经拥有,可以直接阅读下面一小节。 12 | 13 | ```txt 14 | ss://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 15 | vmess://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 16 | ``` 17 | 18 | 如果你没有这些连接,可以自行部署或者购买机场的订阅服务。 19 | 20 | 如果自行部署,你则需要自行购买处于自由互联网的服务器并进行节点搭建,这不在本文讨论范围内,仅提供三篇 GFW Report 的高质量文章作为参考。但是这些文章已被 GFW 屏蔽。我们之后会提供一些办法解决这个问题。 21 | 22 | 23 | 24 | - [如何部署一台抗封锁的 Shadowsocks-libev 服务器](https://gfw.report/blog/ss_tutorial/zh/) 25 | - [防御 GFW 主动探测的实用指南](https://gfw.report/blog/ss_advise/zh/) 26 | - [Shadowsocks 是如何被检测和封锁的](https://gfw.report/talks/imc20/zh/) 27 | 28 | 对于服务器的购买,我们提供一个网址以供参考: https://bitcoin-vps.com/ 。bitcoin-vps 提供了非常详尽、且及时更新的服务器供应商列表,这些服务器供应商均在不同程度上支持使用加密货币进行支付,如比特币、以太坊等等。使用加密货币支付的好处在于,在正确操作的基础上,你可以完全保障自己的隐私安全。使用支付宝等实名支付手段购买类似的服务是不安全的,我们希望读者们可以认识到加密货币在各方面的价值,并认识到加密货币可以作为你的隐私保护者的存在。 29 | 30 | --- 31 | 32 | 如果购买机场的订阅服务,可以参考它们的订阅流程以获取节点。在我们列出一些较为可信的机场服务以供选择,但是**我们不提供任何担保**。需要提醒的是,机场服务属于灰色产业,随时有停止服务的可能,购买建议以月付进行购买以避免过大损失。关于机场审计规则,我们的观点是"我可以不看,但是你不可以封禁"。对于机场审计程度,读者可根据自身实际情况自行评估。 33 | 34 | - [GLaDOS](https://www.glados.rocks/landing/9FMKX-GYLMK-ZYIZW-5U3T0) 在使用邮箱注册后,使用激活码`9FMKX-GYLMK-ZYIZW-5U3T0`激活账号后即可获得 5 天免费试用时长和 10GB 试用流量。 GLaDOS 的优点是可以免费使用,运行时间较长,比较可信。 除此之外,GLaDOS 是少数拥有 Trojan 节点的机场之一。 缺点是速度算不上非常快。 其审核规则,注册账号后可以进入后台面板自行查看。 根据我们的测试,它没有严格按照审计规则进行审计。 35 | 36 | --- 37 | 38 | 如果你不想花任何费用,可安装[赛风](https://psiphon3.com/zh/index.html)这类软件。赛风是自由软件。 39 | 40 | 如果你使用赛风,可以非常方便的发送空邮件到get@psiphon3.com以获取赛风下载链接。赛风应用目前只支持 Windows\Android\IOS\MacOS 平台。当你在这些平台上能够访问自由互联网时,可以去各个渠道搜索可用的节点和代理资源,如[这个](https://t.me/wtovpn)或者[这个](https://t.me/TG_Mtproxy_1)。注意,使用公共节点需要自行承担可能的风险。 41 | 42 | ## 2.安装 43 | 44 | Qv2ray 和 V2rayA 是两款非常优秀的在 Linux 上可用的科学上网通用客户端。你可以把二者都安装,以作备用。其中 V2rayA 是一款浏览器客户端,它可以在服务器等 headless 环境中通过远程在浏览器端访问。Qv2ray 是一款经典的使用 QT 开发的 C/S 架构桌面端软件。 45 | 46 | 47 | 48 | ### v2ray 49 | 50 | v2ray 是使用 Qv2ray 以及 V2rayA 的前提。需要先进行安装。在前面[镜像源的选择](/rookie/basic_install?id=_7镜像源的选择)一节中我们提到,读者应该尽快更换非威权国家的镜像源以保障自身的安全,**在此处安装 v2ray 之前是你更换非威权国家的镜像源的最晚时刻**。使用安全的镜像源安装 v2ray。 51 | 52 | ```bash 53 | sudo pacman -S v2ray 54 | ``` 55 | 56 | 如果在你的网络环境下,没有较快速度的或可达的安全镜像源来安装 v2ray,你可以执行如下命令安装 ArchLinuxStudio 为你提供的 v2ray 安装包。 57 | 58 | ```bash 59 | wget https://archlinuxstudio.github.io/ArchLinuxTutorial/res/v2ray-4.44.0-1-x86_64.pkg.tar.zst 60 | sudo pacman -U v2ray-4.44.0-1-x86_64.pkg.tar.zst 61 | ``` 62 | 63 | ### V2rayA 64 | 65 | V2rayA 是一个浏览器客户端,使用非常方便。由于作者提供了在墙内的下载地址,可以直接在 AUR 进行安装。安装后需启动服务。V2rayA 更新频繁,开发活跃,并且其安装和使用流程都对新手更加友好,推荐新人使用 V2rayA 进行科学上网。 66 | 67 | ```bash 68 | yay -S v2raya-bin 69 | sudo systemctl enable --now v2raya 70 | ``` 71 | 72 | 随后在 KDE 菜单中搜索 v2raya,点击即可打开浏览器页面。登陆后在其中加入订阅即可使用。更多使用方法请看[官方文档](https://v2raya.org/)与[项目地址](https://github.com/v2rayA/v2rayA) 73 | 74 | ### Qv2ray 3.0 75 | 76 | 和上一节中所述相同的原因,由于[中国大陆政府封锁 Github](https://zh.wikipedia.org/wiki/%E5%AF%B9GitHub%E7%9A%84%E5%AE%A1%E6%9F%A5%E5%92%8C%E5%B0%81%E9%94%81#%E4%B8%AD%E5%8D%8E%E4%BA%BA%E6%B0%91%E5%85%B1%E5%92%8C%E5%9B%BD)的原因,你很可能没有办法用正常 yay 的方式通过 AUR 安装[Qv2ray 3.0](https://github.com/Shadowsocks-NET/Qv2ray),所以 ArchLinuxStudio 提供一组可以直接安装的包以供你使用。Qv2ray3.0 的 bin 仓库在于 AUR 的地址: [qv2ray-static-nightly-bin](https://aur.archlinux.org/packages/qv2ray-static-nightly-bin)。 Qv2ray3.0 的动态链接仓库在于 AUR 的地址: [qv2ray-git](https://aur.archlinux.org/packages/qv2ray-git)。Qv2ray 的安装与使用较为复杂,不建议新手使用。需要提醒的是,如果你使用动态链接的 Qv2ray,在其相关依赖更新后,你需要手动重新构建 Qv2ray。 77 | 78 | ```bash 79 | wget https://archlinuxstudio.github.io/ArchLinuxTutorial/res/qv2ray-git-3.0.0.rc1.r36.g0f1bf651-1-x86_64.pkg.tar.zst 80 | wget https://archlinuxstudio.github.io/ArchLinuxTutorial/res/libqv2ray-git-r160.eb10006-1-x86_64.pkg.tar.zst 81 | wget https://archlinuxstudio.github.io/ArchLinuxTutorial/res/qv2ray-plugin-interface-git-r88.b767b4c-1-x86_64.pkg.tar.zst 82 | wget https://archlinuxstudio.github.io/ArchLinuxTutorial/res/uvw-2.11.0_libuv_v1.43-1-x86_64.pkg.tar.zst 83 | sudo pacman -U *.pkg.tar.zst 84 | ``` 85 | 86 | > github.io 也被中国大陆政府封锁,只是封锁力度暂时还没有很大。如你在此过程中卡住,可以尝试 ctrl+c 终止命令后重新尝试下载,也可尝试更换手机热点的网络环境再次进行下载。当你配置好全局代理后,你将不再需要担心任何网络封锁问题。我们将持续为本书读者提供突破互联网审查的可靠流程。 87 | 88 | 安装后在 Plugins 中,选择 V2ray V4 support,并进行 V2ray 的设置。现在你已经可以使用,你需要按照官方文档导入已有的链接或订阅,其余细节请详细阅读 [Qv2ray 的文档](https://qv2ray.net/)。有如下几个注意事项: 89 | 90 | - Qv2ray3.0 中 VMESS MD5 与非 0 的 AlterID 的形式已不被支持,若你的机场或节点下发的 AlterID 是非 0 是无法使用的。如果服务端支持,你可将 AlterID 改为 0 来使用 VMessAEAD 形式。 91 | - Qv2ray3.0 已经将机场的默认订阅类型改为规范:SIP008。如果你的机场订阅类型为 base64,则需要在分组->订阅设置->订阅类型 中,将 SIP008 改为 base64,否则你将拿不到任何订阅链接中的节点。 92 | - **如果**你先前使用过 2.x 的旧版本 Qv2ray ,需要删除旧版 Qv2ray 以及不兼容的配置,同时旧版 Qv2ray 与新版 Qv2ray 不能共存。 93 | ```bash 94 | rm -rf ~/.config/qv2ray 95 | sudo pacman -R qv2ray-dev-git 96 | ``` 97 | - Qv2ray 3.0 与旧版插件不兼容,原有 Qv2ray 2.x 旧版插件不可使用。目前 Qv2ray 3.0 集成了 VMess、Shadowsocks 以及 Trojan 的支持,并通过[插件仓库](https://github.com/Shadowsocks-NET/QvPlugins)提供 命令行插件、测速插件、Trojan-Go 和 Naive 的支持。如果你需要使用其中的插件,则需要自行编译,并将其置入目标目录`~.config/qv2ray/plugins/`。同时,ArchLinuxStudio 也提供预先为你编译好的插件以方便你的使用。其中的 Trojan-Go 插件目前似乎并不能正常使用,其中的 hostname 以及 port 不能被正常解析[[1]](https://github.com/Shadowsocks-NET/QvPlugins/issues/1)。当然你也可以自行编译插件,在CMakeLists.txt中解除你需要编译的插件的注释,随后进行编译。编译步骤可参考QvPlugins的Actions的[workflow file](https://github.com/Shadowsocks-NET/QvPlugins/actions/runs/1156038253/workflow)。 98 | - [命令行插件](https://archlinuxstudio.github.io/ArchLinuxTutorial/res/QvPlugins/libQvPlugin-Command.so) 99 | - [测速插件](https://archlinuxstudio.github.io/ArchLinuxTutorial/res/QvPlugins/libQvPlugin-LatencyTest.so) 100 | - [Trojan-Go](https://archlinuxstudio.github.io/ArchLinuxTutorial/res/QvPlugins/libQvPlugin-TrojanGo.so) 101 | - [Naive](https://archlinuxstudio.github.io/ArchLinuxTutorial/res/QvPlugins/libQvPlugin-NaiveProxy.so) 102 | 103 | ## 3. 代理的初步设置 104 | 105 | 在经过上述步骤后,你应该已经有了 SOCKS5 代理以及 HTTP 代理的地址和端口。本小节描述如何单独为一些程序设置代理,但是需要提醒的是,这不是我们推荐的使用方式,如果你是 Linux 的日常重度使用者,你应该使用后续将会讲述的全局代理方式。 106 | 107 | 在节点链接后,你可在 KDE 的`系统设置` -> `网络设置` -> `代理`中设置代理。注意,`系统设置`中的代理配置在 KDE 桌面环境中并不是所有应用都会遵守,经过测试,chrome/chromium/brave 浏览器与 steam 等应用会遵循 KDE 的系统代理设置。没有遵循系统设置代理的应用还需要单独进行代理配置。下面说明几种常用的软件中单独配置代理的方式。 108 | 109 | - Firefox 浏览器 110 | 火狐浏览器自身的设置选项中存在代理配置,进行配置即可。 111 | 112 | - 终端 113 | 可以通过 export 命令设置当前终端的代理方式。比如使用 tldr 或 github raw 等资源需要设置 https 代理。 114 | 115 | ```bash 116 | export https_proxy=http://127.0.0.1:8889 117 | export http_proxy=http://127.0.0.1:8889 118 | export all_proxy=http://127.0.0.1:8889 119 | ``` 120 | 121 | > 不同终端命令所识别的环境变量名不同,如 all_proxy 对 curl 生效,而对 wget 则不生效,具体可查看各个命令的 man page。 122 | 123 | - code OSS 124 | File => Preference => Settings 125 | 搜索 proxy,在其中填入 http 代理地址即可 126 | 127 | - proxychains-ng 128 | 如果对于一个应用,KDE 的全局代理不生效,在终端 export 了 ALL_PROXY 变量再用终端启动此应用代理也不生效,并且这个应用自身也没有配置代理的选项,此时可以尝试使用 proxychains-ng,它可以为单行命令配置代理。它是一个预加载的 hook,允许通过一个或多个 SOCKS 或 HTTP 代理重定向现有动态链接程序的 TCP 流量。 129 | 130 | ```bash 131 | sudo pacman -S proxychains-ng 132 | sudo vim /etc/proxychains.conf 133 | ``` 134 | 135 | 把配置文件中最后一行改为本地代理的 ip 和端口,如`socks5 127.0.0.1 1089` 136 | 137 | proxychains 不能够支持 yay 以及其他一些程序,详见[Incompatible with proxychains](https://github.com/Jguer/yay/issues/429)[proxychains4 with Go lang](https://github.com/rofl0r/proxychains-ng/issues/199)。这种情况可以使用透明代理。 138 | 139 | ## 4. 更加全面的系统级全局代理 140 | 141 | 由以上各部分可以看到,为各个软件单独设置代理是很麻烦的。如果你把 Linux 作为主力使用,那么配置透明代理也是必须的,如果你使用 V2rayA,那么可以很方便的在设置中开启全局代理。如果你的技术水平不高,建议你直接使用 V2rayA 的全局代理。如果你使用 Qv2ray,请阅读随后的[透明代理](rookie/transparentProxy)一节。 142 | 143 | 对于全局代理的情况下,开启 UDP 支持,DNS 请求也将被拦截并导入 v2ray 中,更详细的描述将在下节进行。 144 | 145 | ## 5. 为什么我们不建议使用分流代理?分流代理可能存在什么危险? 146 | 147 | 分流代理在大多数场景下指的是:在访问国内资源时,使用直连的方式,而在访问国外被墙的资源时,使用代理进行连接。这种网络的使用方式确实会非常方便,但是存在显而易见的危险,然而大众几乎并没有意识到这里的问题。 148 | 149 | 使用分流代理的方式非常容易泄露你自身的隐私信息,包括但不限于 IP 地址,浏览器以及硬件指纹(几乎可以唯一标记你这一个用户的指纹)等等一系列信息,并且可以将你使用的代理 IP 与你自身的真实 IP 进行对应。 150 | 151 | 举例来说,一个最常见的例子就是某个国外的网站使用了百度统计脚本,这时你的代理 IP 与真实 IP 的对应信息可以轻松的被这样的网站进行对应,这是非常危险的。 152 | 另一个例子就是一些恶意的邮件,比如你在使用国外的邮箱服务,接收到了一个恶意邮件,这个邮件中嵌入了一些国内的资源如图片,那么你的真实 IP 等信息也可以被轻松获取。 153 | 154 | 真实的例子不止以上两个,还有很多类似的情况存在。我们一直为了大众的隐私与安全而战,希望今后你可以放弃使用分流代理的网络连接方式。 155 | -------------------------------------------------------------------------------- /docs/rookie/graphic_driver.md: -------------------------------------------------------------------------------- 1 | # 显卡驱动 2 | 3 | 现在是 2022 年,显卡驱动的安装在 Arch Linux 上已经变得非常容易。本文区分核芯显卡和独立显卡两大类描述显卡驱动的安装。**注意,确保你已经按照本教程之前的章节安装配置好科学上网、安装好必要的包后再向下进行,不要多个教程混着看,你可能漏掉了本教程前置步骤中的某些操作,从而造成问题。** 4 | 5 | > 所有 AMD 显卡建议使用开源驱动。英伟达显卡建议使用闭源驱动,因为逆向工程的开源驱动性能过于低下,本文也只描述英伟达闭源驱动安装。如果你支持自由软件运动,请尽可能使用具有官方支持开源驱动的英特尔和 AMD 显卡。 6 | 7 | ## 核芯显卡 8 | 9 | ### 英特尔核芯显卡 10 | 11 | [官网文档](https://wiki.archlinux.org/index.php/Intel_graphics) 12 | 13 | 英特尔核芯显卡安装如下几个包即可。 14 | 15 | ```bash 16 | sudo pacman -S mesa lib32-mesa vulkan-intel lib32-vulkan-intel 17 | ``` 18 | 19 | > `xf86-video-intel`arch wiki 里写的很多发行版不建议安装它,而应使用 xorg 的 modesetting 驱动(也就是什么都不用装的意思)。经过我们测试目前确实是默认 modesetting 驱动较为稳定。 20 | 21 | 注意,只有 Intel HD 4000 及以上的核显才支持 vulkan。 22 | 23 | ### AMD 核芯显卡 24 | 25 | 对于具有核芯显卡的 AMD 处理器,需要先确定核显架构(Architecture)是什么,再决定安装什么驱动。推荐在 [techpowerup 网站](https://www.techpowerup.com/)进行查询,信息非常全面。在确定了显卡架构后,再根据架构对照[这个文档](https://wiki.archlinux.org/index.php/Xorg#AMD)决定安装什么驱动。**对于 GCN2.0 及以下架构的老显卡,直接安装开源 ATI 驱动即可,原本闭源的老旧的 Catalyst 驱动在 2021 年已被废弃。GCN2.0 及以下架构的老显卡也不要使用开源的 AMDGPU 驱动,因为其仅处于实验性质,需要各种自定义内核编译选项与配置,非常麻烦,得不偿失。**对于新型号,即 GCN3 架构及更新型的核芯显卡,直接安装开源驱动 AMDGPU 即可,也就是以下这几个包。 26 | 27 | ```bash 28 | sudo pacman -S mesa lib32-mesa xf86-video-amdgpu vulkan-radeon lib32-vulkan-radeon libva-mesa-driver lib32-libva-mesa-driver mesa-vdpau lib32-mesa-vdpau 29 | ``` 30 | 31 | - 比如你的笔记本 cpu 是目前常见的 AMD R7 4800U,那么它的核显为 Vega 8。通过查询,可知其为 GCN 5.0 架构,那么对照 arch 官方文档,你可选择安装 AMDGPU 开源驱动。 32 | - 再比如你的台式机 cpu 是目前常见的 锐龙 5 3400G,那么它的核显为 Vega 11。通过查询,可知其为 GCN 5.0 架构,那么对照 arch 官方文档,你可选择安装 AMDGPU 开源驱动。 33 | - 再老一些的 apu A10-9700 处理器 ,它的核显为 Radeon R7。通过查询,可知其为 GCN 2.0 架构,那么对照 arch 官方文档,你选择安装 ATI 开源驱动。 34 | 35 | ## 独立显卡 36 | 37 | 这部分会分为仅有独立显卡(无核显)与同时拥有独立显卡和核芯显卡两种情况进行讲解。 38 | 39 | ### 英伟达独立显卡 40 | 41 | 本节建议查看官方文档,此处只列出主要的显卡系列。[官方文档](https://wiki.archlinux.org/index.php/NVIDIA) 42 | 43 | 较新型号的独立显卡直接安装如下几个包即可。 44 | 45 | ```bash 46 | sudo pacman -S nvidia nvidia-settings lib32-nvidia-utils #必须安装 47 | ``` 48 | 49 | 如果是 GeForce 630 以上到 GeForce 920 以下的老卡,安装 [nvidia-470xx-dkms](https://aur.archlinux.org/packages/nvidia-470xx-dkms/)AUR及其 32 位支持包。使用 dkms 驱动同时需要 headers。 50 | 51 | ```bash 52 | yay -S nvidia-470xx-dkms nvidia-settings lib32-nvidia-470xx-utils linux-headers 53 | ``` 54 | 55 | 如果是 GeForce 630 以下到 GeForce 400 系列的老卡,安装 [nvidia-390xx-dkms](https://aur.archlinux.org/packages/nvidia-390xx-dkms/)AUR及其 32 位支持包。使用 dkms 驱动同时需要 headers。 56 | 57 | ```bash 58 | yay -S nvidia-390xx-dkms nvidia-settings lib32-nvidia-390xx-utils linux-headers 59 | ``` 60 | 61 | 再老的显卡直接使用[开源驱动](https://wiki.archlinux.org/index.php/Nouveau)即可。 62 | 63 | ```bash 64 | sudo pacman -S mesa lib32-mesa xf86-video-nouveau 65 | ``` 66 | 67 | --- 68 | 69 | **在同时拥有核芯显卡和英伟达独立显卡的笔记本上安装驱动是大多数人关注的事情,这里着重讲述。** 70 | 71 | > 再次提醒请按照本书前置章节配置好系统后再进行,不要多个教程混看,**尤其是一些过时的教程**。尤其需要注意的是确保 base-devel 包的安装以及配置好科学上网软件,以及使用 X11 模式。 72 | 73 | [英伟达双显卡模式官方文档](https://wiki.archlinux.org/index.php/NVIDIA_Optimus) /// [optimus-manager 官方文档](https://github.com/Askannz/optimus-manager/wiki) 74 | 75 | 若为同时拥有核芯显卡与英伟达独显的笔记本电脑,同样需要按照上述步骤先安装各个软件包。除此之外还需要安装 optimus-manager。可以在核芯显卡和独立显卡间轻松切换。optimus-manager 提供三种模式,分别为仅用独显,仅用核显,和 hybrid 动态切换模式。 76 | 77 | ```bash 78 | yay -S optimus-manager optimus-manager-qt 79 | ``` 80 | 81 | 安装完成后重启即可使用。optimus-manager 安装完成后会默认 enable optimus-manager 的服务,你可在重启前检查其状态,若没有 enable 则手动将其 enable。重启后在菜单栏搜索 optimus-manager 点击即可使用。可在其设置中设置开机自动启动。 82 | 83 | ```bash 84 | sudo systemctl enable optimus-manager 85 | ``` 86 | 87 | 此时你应该已经可以进行显卡切换了,如果有问题,请详细阅读 optimus-manager 的文档,里面有详细的描述。由于各类问题太多,本文不进行描述,optimus-manager 的文档很详尽,请自行查看。此处仅列出几项较为重要的注意事项: 88 | 89 | - 如果需要在独显和核显模式间切换,要注意你没安装各类 GPU 监控插件,它们会阻止显卡切换,导致不可预料的错误。 90 | - 不要使用 Nvidia Control Panel 中的`Save to X Configuration file`按钮。会导致配置冲突。 91 | - 在显卡之间的切换时,重新登陆后如在 splash screen 卡住或者黑屏,可以尝试在 tty1 tty2 之间进行切换。 92 | - 如果你在安装 optimus manager 并重启后,直接黑屏卡死,不能进入系统,很有可能是遇到了常见的"ACPI ISSUE",简单来说,这是笔记本制造商的实现问题。可以尝试在内核启动参数中加入`acpi_osi=! acpi_osi="Windows 2009"` 后再尝试。[[1]](https://github.com/Askannz/optimus-manager/wiki/FAQ,-common-issues,-troubleshooting#when-i-switch-gpus-my-system-completely-locks-up-i-cannot-even-switch-to-a-tty-with-ctrlaltfx) 93 | 94 | 最后详细说下动态切换模式。本质上其还是使用官方的 [PRIME](https://wiki.archlinux.org/index.php/PRIME#PRIME_render_offload)对闭源驱动的方法进行切换。需要设置三个环境变量,或者用 nvidia-prime 包提供的命令 prime-run,二者本质也是一样的,都是设置三个环境变量。 95 | 96 | ```bash 97 | sudo pacman -S nvidia-prime 98 | prime-run some_program #使用prime-run前缀来用独显运行某些程序 99 | ``` 100 | 101 | 对于 AMD 核显+N 卡独显的读者,optimus-manager 对于这套组合的支持目前已经发布,最新可用版本为 1.4。 102 | 103 | --- 104 | 105 | **如果你不是强烈追求能效控制以及注重电池寿命的用户,那么可以不用往下看了,如果你是,那么需要针对你的硬件以及笔记本型号尝试正确的电源管理方式。此部分的设置可能导致黑屏,并且尝试过程可能较长,也会遇到各类问题,请根据你个人的操作水平自行斟酌是否操作** 106 | 107 | 电源控制做的事情是,在只用核显的模式下,确保正确关闭独立显卡。而在混合模式下,绝大多数情况下 Nvidia 模块实际是始终开启的,电源控制并不生效。这件事情其实很复杂,因为对于不同的显卡型号,以及笔记本型号的组合,可行的方案都是不同的。笼统来说,最广泛适用的办法是 bbswitch。但仍不建议上来就按照此方式安装使用,因为某些特定的硬件就是会出问题,也就是黑屏。这里建议按照 optimus-manager 官方的文档一步一步来,按步骤尝试,最后找到属于你自己的电脑合适的电源管理方式。**此[文档](https://github.com/Askannz/optimus-manager/wiki/A-guide--to-power-management-options)必须详细阅读!** 108 | 109 | 针对大多数笔记本适用的 Bbswitch,此处进行安装使用的讲解。首先安装包 bbswitch。若使用其它内核,则安装包 bbswitch-dkms。 110 | 111 | ```bash 112 | sudo pacman -S bbswitch #安装 bbswitch 切换方式 113 | ``` 114 | 115 | 接下来右键点击 optimus-manager 的托盘设置,在 Optimus 选项卡中的 switch method 选择 Bbswitch 即可。 116 | 117 | ### AMD 独立显卡 118 | 119 | AMD 独立显卡的驱动安装步骤实际上 AMD 核芯显卡是相同的,都需要先确定架构,然后选定正确的驱动安装即可。真正需要关注的是如何在核芯显卡和独立显卡间进行切换。可以使用 [PRIME](https://wiki.archlinux.org/title/PRIME#For_open_source_drivers_-_PRIME) 对开源驱动的双显卡切换方式。 120 | 121 | 此外,可以使用 `glmark2`,`DRI_PRIME=1 glmark2` 分别对核显和独显进行测试,选择分数更高的一个进行使用。可以在 steam 游戏的启动前缀中加入`DRI_PRIME=1 mangohud %command%`来使用独显。(关于 [mangohud](/play/software?id=性能监控))。 122 | 123 | 笔记本上使用独立显卡运行 steam 游戏的另一个例子。 124 | 125 | ```bash 126 | DRI_PRIME=1 steam steam://rungameid/570 #运行dota2 127 | DRI_PRIME=1 steam steam://rungameid/730 #运行cs go 128 | ``` 129 | 130 | ## 性能测试 131 | 132 | [官方文档](https://wiki.archlinux.org/index.php/benchmarking)。 133 | 134 | 最传统和广为人知的方式为使用`glxgears`命令进行测试,其属于[mesa-utils](https://www.archlinux.org/packages/extra/x86_64/mesa-demos/)包。但其仅仅只能提供简单的测试场景及帧数显示,只测试了当前 OpenGL 功能的一小部分,功能明显不足。我们推荐如下两种工具。 135 | 136 | ### glmark2 137 | 138 | glmark 提供了一系列丰富的测试,涉及图形单元性能(缓冲,建筑,照明,纹理等)的不同方面,允许进行更全面和有意义的测试。 每次测试单独计算帧速率。 最终,用户根据以前的所有测试获得了一个成绩分数。在 archlinux 上属于包[glmark2](https://aur.archlinux.org/packages/glmark2-git)AUR 139 | 140 | ### Unigine benchmark 141 | 142 | Unigine 3D 引擎是一个更全面的基准测试工具。 截止目前有五个版本,从旧到新分别是 143 | 144 | - sanctuary(2007) 145 | - tropics(2008) 146 | - heaven(2009) 147 | - valley(2013) 148 | - superposition(2017) 149 | 150 | 可从[AUR](https://aur.archlinux.org/packages/?O=0&K=Unigine)下载全部版本。它们均为专有软件。 151 | 152 | ## 显卡信息查看 153 | 154 | 对于英伟达显卡,nvidia-settings 这个包即可全面的展示显卡相关信息。 155 | 156 | 对于 AMD 显卡,稍微麻烦一些,通过 yay 安装 radeon-profile-git 这个包,同时安装其依赖 radeon-profile-daemon,最后启动这个进程。即可以图形化的方式查看 amd 显卡信息。[github 项目地址](https://github.com/marazmista/radeon-profile) 157 | 158 | ```bash 159 | sudo systemctl enable --now radeon-profile-daemon.service 160 | ``` 161 | 162 | 注意,不要对左下角的 auto low high 进行更改 有 bug 会卡死。同时,显存占用在某些型号显卡上展示可能有误。 163 | 164 | ## 后续 165 | 166 | 如果作为一个普通使用者,到这里你的系统已经配置完毕了。不会命令行也没太大关系,你可以慢慢探索 KDE 这个桌面环境,记住时常用如下命令或 Discover 软件更新系统即可。 167 | 168 | ```bash 169 | sudo pacman -Syyu #更新官方仓库 170 | yay -Syyu #同时更新官方仓库与AUR 171 | ``` 172 | 173 | 接下来你可以查阅娱乐、办公、多媒体等章节了解更多使用软件的安装与使用。如果你需要成为一名较为专业的人员,那么请阅读进阶、以及编程等章节。 174 | -------------------------------------------------------------------------------- /docs/rookie/transparentProxy.md: -------------------------------------------------------------------------------- 1 | # 使用 Qv2ray+cgproxy 配置透明代理 2 | 3 | 全局代理,也即透明代理。本节所述为真正的,操作系统级别的代理,而不是仅仅针对浏览器中全部网址的"全局代理"。之所以叫做透明代理,是因为这种系统级别的代理对于操作系统中的各个应用相当于是透明的,应用们感知不到代理的存在。之所以叫做全局代理,很明显意为操作系统级别的、全局的代理。这两个词汇在中文环境中经常同时使用,并且全局代理一词容易引起混淆。 4 | 5 | 本节主体原文收集自 [Qv2ray 用户组](https://t.me/Qv2ray_chat),并非原创,我们仅在其基础上进行更新、完善与修正。[cgproxy 项目地址](https://github.com/springzfx/cgproxy)。 6 | 7 | ## 安装与设置 8 | 9 | 1. 安装`cgproxy`软件。可直接在 [AUR](https://aur.archlinux.org/packages/cgproxy/) 上安装。由于中国大陆政府封锁 Github 的原因,你很可能没有办法用正常 yay 的方式通过 AUR 安装 cgproxy,所以 ArchLinuxStudio 提供一组可以直接安装的包以供你使用。 10 | 11 | ```bash 12 | wget https://archlinuxstudio.github.io/ArchLinuxTutorial/res/cgproxy-0.19-1-x86_64.pkg.tar.zst 13 | sudo pacman -U cgproxy-0.19-1-x86_64.pkg.tar.zst 14 | ``` 15 | 16 | > github.io 也被中国大陆政府封锁,只是封锁力度暂时还没有很大。如你在此过程中卡住,可以尝试 ctrl+c 终止命令后重新尝试下载,也可尝试更换手机热点的网络环境再次进行下载。当你配置好全局代理后,你将不再需要担心任何网络封锁问题。我们将持续为本书读者提供突破互联网审查的可靠流程。 17 | 18 | 2. 在 Qv2ray 的“首选项-入站设置”的下方启用任意门设置选项。 19 | 20 | - 监听 ipv4 地址可填`127.0.0.1` 或 `0.0.0.0`,建议前者。若需双栈代理,则在监听 ipv6 地址填上`::1`(如果监听 ipv4 填了 0.0.0.0 则可不填)。 21 | - 嗅探选择 Full,Destination Override 的三项均勾选。 22 | - 模式选择“tproxy”。 23 | 24 | 25 | 如果是复杂配置,则需要手动添加相应的 dokodemo-door 入站。由于目前版本复杂配置并没有提供 tproxy 选项,因此 tproxy 模式需要通过编辑 json 来实现。 26 | 27 | 3. 配置`cgproxy`,编辑`/etc/cgproxy/config.json`: 28 | 29 | - **在`cgroup_proxy`中括号里加上"/"(包含引号)**,`port`改为 Qv2ray 首选项里的透明代理的端口。 30 | - `cgproxy`默认配置是代理所有 tcp 和 udp,ipv4 和 ipv6 的流量,如果不希望代理其中的某种(些)流量,则将对应的`enable_xxx`改为 false。注意这里的配置要和 Qv2ray 选项里的配置一致(如,Qv2ray 选项里没有勾选 udp,则这里务必把`enable_udp`改为 false)。 31 | - 如果希望当本机作为网关设备时为连接到本机网关的其他设备(如连接到本机开设的 wifi 热点的设备)也提供透明代理,则把`enable_gateway`改为 true。 32 | 33 | 4. (重要)透明代理的基本原理是拦截系统发出的所有流量,并将这些流量转到代理工具里,从而实现让系统所有流量都走代理的目的。此时,为了避免流量出现死循环(即代理工具发出的流量又转回到代理工具里),需要将代理工具排除在透明代理环境外面。有两种方式可以实现这一点: 34 | 35 | - 通过`execsnoop`监控代理工具的启动,并自动将其移至透明代理环境外面: 36 | 37 | - `cgproxy`软件自带`execsnoop`支持,以上`cgproxy`测试过的发行版均可支持。 38 | - 编辑`/etc/cgproxy/config.json`,在`program_noproxy`中括号里加上"v2ray","qv2ray"(包含引号和逗号),以使`qv2ray`和`v2ray`发出的流量不经过透明代理。如果你的`v2ray`或`qv2ray`不在`PATH`里,则需要填写它们的绝对路径。 39 | 40 | - 在每次连接代理节点时,让`qv2ray`自己把自己移到透明代理环境外面: 41 | 42 | - 安装 Qvplugin-Command 插件,在插件设置里的“pre-connection”栏里加上一句 43 | 44 | ``` 45 | sh -c "cgnoproxy --pid $(pgrep -x qv2ray)" 46 | ``` 47 | 48 | 即可。 49 | 50 | 5. (重要)如果启用了 udp 的透明代理(dns 也是 udp),则给 v2ray 二进制文件加上相应的特权: 51 | 52 | ``` 53 | sudo setcap "cap_net_admin,cap_net_bind_service=ep" /usr/bin/v2ray 54 | ``` 55 | 56 | 否则 udp 的透明代理可能会出问题。 57 | 58 | > 如果每次更新了 v2ray 二进制文件,都需要重新执行此命令。 59 | 60 | 6. 启动透明代理服务:`systemctl start cgproxy.service`或`systemctl enable --now cgproxy.service`。 61 | 62 | 以上步骤完成后,透明代理应该能正常使用了。 63 | 64 | ## dns 配置说明 65 | 66 | 如果勾选了“dns 拦截”,且启用了 dns 和 udp 的透明代理,则 v2ray 会拦截对系统 dns 的请求,并将其转发到 v2ray 的内置 dns 里,即让 v2ray 内置 dns 接管系统 dns。但 v2ray 内置 dns 是会遵循路由规则的。 67 | 68 | 如果没勾选“dns 拦截”,则 v2ray 虽然不会让内置 dns 接管系统 dns,但如果启用了 dns 和 udp 的透明代理,则系统 dns 也会走透明代理进 v2ray,并遵循 v2ray 的路由规则。 69 | 70 | 因此,在启用了 dns 和 udp 的透明代理时,若系统 dns 或 v2ray 的内置 dns 配置不当,可能导致 dns 请求发不出去,从而影响正常上网。 71 | 72 | 由于 qv2ray 常见的路由规则是绕过国内 ip,国外 ip 均走代理。在这个情形中,以下两个配置是典型的有问题的 dns 配置方式: 73 | 74 | - 配置了国外普通 dns 作为首选,但代理本身不支持 udp(此时 dns 查询的 udp 流量出不去,dns 无法查询) 75 | - 配置了使用域名的 doh 作为首选。此时 doh 的域名无法被解析,从而 doh 也无法使用。 76 | 77 | 一般而言,如果并不在意将 dns 查询发给谁,那么,在绕过国内 ip 的情况下,只需要配置一个国内普通 dns 作为首选即可保证不会出问题。若代理本身不支持 udp,又希望使用国外 dns,则可以考虑使用使用 ip 的 doh(如`https://1.1.1.1/dns-query`等)。 78 | 79 | 如果需要更复杂的 dns 配置,建议参考[上游文档](https://www.v2ray.com/chapter_02/04_dns.html),并选择合适的不会影响正常上网的 dns 配置。 80 | 81 | --- 82 | 83 | 在显示的为 firefox 等应用设置代理时,因为这些应用程序知道代理的存在,所以不会发出 DNS 请求。而透明代理的情况下,各应用感知不到代理的存在,所以会发出自己的 dns 请求。 84 | 85 | 这时通过 cgproxy 可将全部 tcp/udp 的流量(包括 DNS 查询)转给 v2ray。由于这种情况下,一定会有 DNS 查询流量的产生,所以为了保证本机不发出任何 DNS 请求(这是为了隐私和安全),需要进行以下设置。此时需要分两种情况讨论。 86 | 87 | - 如果不进行任何 v2ray 的内置 DNS 设置以及 DNS 拦截,那么 DNS 流量会使用本机的 DNS 设置如 8.8.8.8 发出,这种情况不论如何配置 v2ray(全局或者分流),只要保证对于 8.8.8.8 的请求能够通过代理发出即可。 88 | 89 | - 如果 v2ray 通过形如如下路由规则,拦截经由 dokodemo-door 接收到的 dns 流量到 dns outbounds,那么 v2ray 是可以导向 DNS 查询流量到"dns-out"的 out bound 的,也即 dns-outbound 进行的"拦截"和"重新转发"。 90 | 91 | ```json 92 | rules: 93 | { 94 | "inboundTag": [ 95 | "tproxy-in-1", 96 | "tproxy-in-2" 97 | ], 98 | "outboundTag": "dns-out", 99 | "port": "53", 100 | "type": "field" 101 | }, 102 | ``` 103 | 104 | 此时 dns outbound 应该调用内置 DNS 设置进行解析,假如 v2ray 内置 DNS 设置为 1.1.1.1,此时原有对于 8.8.8.8 的 DNS 请求就会转而向 1.1.1.1 请求(随后对 1.1.1.1 的请求还是会遵循你的路由规则的),并将结果返回给应用端。你可以通过开启 qv2ray 更详细的日志级别进行验证。 105 | 106 | 如果只是为了阻止本机发 dns 请求,完全可以不使用 fakedns。fakedns 在透明代理的条件下确实可以减少一次 dns 请求,理论上确实会快一点。但是也在有的文章指出如果所有域名都伪造 dns 返回可能会有问题。 107 | 108 | 题外话:使用 clientIP 可解决使用代理服务器解析 DNS 若返回国外 CDN 的网址时网速慢的情况,但是前提是你信任代理服务器和 DNS 服务器接收你的本地 IP,为了你的安全,不建议使用。 109 | 110 | ## 常见问题 111 | 112 | - 启用透明代理后无法访问任何外网,且 v2ray 的 cpu 占用率飙升 113 | 114 | 可能是流量陷入死循环了,检查第 4 步有没有正确配置。如果配置没问题,执行`systemctl status cgproxy.service`看下有没有诸如`info: process noproxy pid msg: xxx`之类的输出。如果没有,则说明 cgproxy 软件或 execsnoop 没有正常工作。注意 cgproxy 软件需要 cgroup v2。 115 | 116 | 尝试退出 qv2ray,随后在终端里执行`cgnoproxy qv2ray`看是否恢复正常,如恢复正常,说明 cgproxy 正常工作,只是 execsnoop 没有正常工作。由于 execsnoop 一定程度上依赖于内核,非上述 cgproxy 测试过的发行版用户,建议使用第 4 步中的第 2 种方法。另外,对 kde 用户,5.19+版的 plasma 会给从 krunner 里启动的程序额外设置 cgroup,尽管 cgproxy 软件考虑到了这一点,但仍有极少数场合可能出现 plasma 设置的 cgroup 覆盖掉了 cgproxy 设置的 cgroup 的情况,此时通常重启一下 qv2ray 即可。 117 | 118 | - 启用透明代理后,无法访问(部分)域名 119 | 120 | 可能是 dns 无法解析(部分)域名。一般这种故障只发生在启用了 dns 及 udp 透明代理的时候。 121 | 122 | 终端里执行`dig 无法访问的域名`看下报什么错: 123 | 124 | - 若出现类似`reply from unexpected source: 192.168.0.100#42050, expected 8.8.8.8#53`的报错,则检查第 5 步的有没有正确配置。 125 | 126 | - 若出现类似`connection timed out; no servers could be reache`的报错,则说明 dns 查询的流量出不去,此时往往是系统 dns 或 v2ray 内置 dns 配置不当。请检查是否出现了前文提到的几种不当配置。如果没有勾选“dns 拦截”,则此时 v2ray 虽然不会用内置 dns 接管系统 dns,但它仍然会让系统 dns 走透明代理,从而遵循 v2ray 的路由规则,此时需要检查系统 dns 是否是前文提到的那几种不当配置。 127 | 128 | - 能不能分应用代理(如,下载 BT 时不能走代理) 129 | 130 | 对于本机的程序,可以,可通过两种方式实现: 131 | 132 | - 通过`cgnoproxy`实现:如,在命令行中执行`cgnoproxy qbittorrent`,启动的 qbittorrent 程序就不会走透明代理。又如,在命令行中执行`cgnoproxy --pid 12345`,执行之后 pid 为 12345 的程序就不再走透明代理。这种方式可支持任何应用。 133 | - 通过`/etc/cgproxy/config.json`实现:在配置里的`program_noproxy`中括号里加上相应的应用即可。这种方式只支持可执行文件,不支持各种脚本。如希望把 clash 与 kde connect 加入 noproxy 规则,则在把此字段补全成["v2ray", "qv2ray", "clash", "/usr/lib/kdeconnectd"]即可。注意修改`config.json`之后,需要重启 cgproxy 服务才能生效,执行`systemctl restart cgproxy.service`即可。 134 | 135 | 对于当本机作为网关设备时为连接到本机网关的其他设备,不行,那些设备的所有流量(到本机的流量除外)都必然会走代理。 136 | 137 | - 透明代理环境中响应速度变慢 138 | 139 | 由于 iptables 是在域名解析成 ip 之后,才对相应的流量进行重定向。因此,在透明代理环境中,访问一个域名 s 可能会需要解析至少 2 次 dns(系统解析一次,重定向到 v2ray 之后 v2ray 分流模块再解析一次)。因此,响应理论上是会变慢一点的,变慢的幅度取决于系统 dns 及 v2ray 的 dns 的响应速度。 140 | 141 | - 开启 UDP 支持后报错`too many open files` 142 | 143 | 核心问题是,Linux 系统定义了一系列限制,其中一种限制是最大打开文件数,并且有软限制和硬限制,具体的限制结果可以通过`ulimit -Sa`和`ulimit -Ha`查看。一般来说 arch 默认的软限制 open files 的值为 1024,这个数值太小。硬限制的 open files 的值为 524288,这个数值够大了。打开网页过多,或者开启 udp 加速的时候,连接数(打开的文件数)很容易超过 1024 这个数,所以就被限制住了。解决办法很简单,只需要修改系统级别的关于这个限制的配置文件,在/etc/security/limits.conf 文件的最末尾,加上下面这行,然后重启即可: 144 | 145 | ```bash 146 | * soft nofile 8192 #不要落下了最前面的星号 147 | ``` 148 | 149 | - 使用 docker/libvirt 时与 cgproxy 不能正常使用。解决方法见[cgproxy issue3](https://github.com/springzfx/cgproxy/issues/3#issuecomment-637309706) 150 | 151 | --- 152 | 153 | Ref: 154 | 155 | 1. [漫谈各种黑科技式 DNS 技术在代理环境中的应用](https://tachyondevel.medium.com/%E6%BC%AB%E8%B0%88%E5%90%84%E7%A7%8D%E9%BB%91%E7%A7%91%E6%8A%80%E5%BC%8F-dns-%E6%8A%80%E6%9C%AF%E5%9C%A8%E4%BB%A3%E7%90%86%E7%8E%AF%E5%A2%83%E4%B8%AD%E7%9A%84%E5%BA%94%E7%94%A8-62c50e58cbd0) 156 | -------------------------------------------------------------------------------- /docs/uk/README.md: -------------------------------------------------------------------------------- 1 | # Arch Linux Installation and Usage Tutorial - ArchTutorial - Arch Linux Studio 2 | 3 | > Notice: English translation is still in progress, documentation is now incomplete. Welcome to submit pull requests for translations. 4 | 5 | Arch Linux installation and usage tutorials, updated daily in real time! From Arch Linux installation, breaking through internet censorship and blockades, transparent proxies, graphics drivers, everyday software use and more, plus everything you might need for media production, programming, crypto currency usage in ArchLinux and more. Make Arch Linux your go-to system! 6 | 7 | This book provides some of our experience of using Linux over the years and teaches it to those who need it. Another part that is inseparable from Linux: [GNU](https://www.gnu.org/home.zh-cn.html). 8 | 9 | New readers should make sure that you have followed the steps in the `Start from Scratch` chapter before reading on, otherwise there may be problems. 10 | 11 | - Features of this book 12 | - The privacy and security of our readers is always our top priority, and using free software can provide you with a considerable amount of protection. People or organisations who challenge the free software movement on the basis of so-called "practicality" or "avoiding ideological controversy" are foolish and evil. 13 | - This book provides a robust and reliable process for breaking out of blocked and censored areas of the Internet, and we regret if anyone considers it "inharmonious". 14 | - The style of this book is kept as simple as possible to improve the loading speed of the reader's website. At the same time, we believe that fancy styling should not be present in a more serious book. 15 | - No nonsense, just a set of directions **we think** is more appropriate, keeping the installation process as simple as possible and not exhaustive. This book is a tutorial, not a reference, and is not the same as the official wiki. For more information, please check the Arch Wiki or consult the related materials. It is right to know what you know, but it is not a tutorial work to fill in too much information. 16 | - The book is developed using docsify and gitalk, and the source code of the site is fully open source, so feel free to leave comments and discuss. The site also does not use any harmful tracker scripts and the files provided for download are not audited or monitored in any way, you can verify this by using the [Brave browser](https://brave.com/zh/) and reading the source code. 17 | - Linux and ACG [Telegram Group:ArchLinuxStudio🇨🇦🏳️‍⚧️🏳️‍🌈](https://t.me/FSF_Ministry_of_Truth) ||| [Matrix Group:ArchLinuxStudio🇨🇦🏳️‍⚧️🏳️‍🌈](https://matrix.to/#/#ArchLinuxStudio:matrix.org) 18 | 19 | > **This book is available under the CC BY-NC-ND 4.0 license[[1]](https://github.com/ArchLinuxStudio/ArchLinuxTutorial/issues/68). Pull requests are welcome, but commercial use and interpretation is prohibited. Any "downstream documentation" is unauthorised and in breach of the license.** 20 | 21 | > Please do not give feedback about this document in any groups other than those listed above. This will cause them distress and unpleasantness. 22 | 23 | ## Why use Linux? 24 | 25 | To put it simply, there are three popular PC operating systems in the world today, Windows, Linux and macOS. 26 | 27 | If you are a student or practitioner of a computer-related subject, it is highly recommended that you use Linux as your daily system. Using Linux will give you invisible exposure to all aspects of computing and will give you an advantage in your future career. macOS does not operate in the same way as Linux in some respects (i.e. roughly the differences between BSD and GNU/Linux) and is not recommended due to its closed nature. Windows is extremely painful and problematic to set up in many programming environments and is strongly discouraged for the same reason of macOS. 28 | 29 | More importantly, GNU/Linux is a relevant and important product of the free software movement. The [free software movement](https://en.wikipedia.org/wiki/Free_software_movement) rejects proprietary software and promotes free software, Its ultimate goal is to free everyone in the networked world - every computer user. Everyone should have full control over the software they run. [Free Software](https://www.gnu.org/philosophy/free-sw.en.html) has four principles. 30 | 31 | - The freedom to run the program as you wish, for any purpose (freedom 0). 32 | - The freedom to study how the program works, and change it so it does your computing as you wish (freedom 1). Access to the source code is a precondition for this. 33 | - The freedom to redistribute copies so you can help others (freedom 2). 34 | - The freedom to distribute copies of your modified versions to others (freedom 3). By doing this you can give the whole community a chance to benefit from your changes. Access to the source code is a precondition for this. 35 | 36 | If you are just an ordinary user, you have seen similar experiences of having your computer loaded with reams of rogue software without your authorisation. Proprietary software not only rapes the user in every dimension, but also contains unimaginable malicious features. It is an open secret in the industry that user data, privacy and other important information can be easily collected and misused by large companies. It is highly recommended that you migrate to free software when proprietary software has a suitable free software alternative. This book will document both proprietary software and free software, because to abandon proprietary software altogether would surely keep a lot of people out of linux directly, which is not what we want, and we want to bring more people into GNU/Linux first, at least as a first step. But this does not mean that we support the use of proprietary software, we want you to at least get started with linux and gradually replace proprietary software with free software. Proprietary software is only briefly documented in this book, not described in detail, because we don't want you to be dependent on it for a long time. We will remove proprietary software from this tutorial whenever a sufficiently good free software alternative becomes available for that proprietary software. Proprietary software will be corner marked proprietary or described with additional marks throughout this book. If you are a competent developer, it is preferred that you develop free software that replaces some proprietary software. 37 | 38 | Finally, if you want to try a completely free system, or if you like to explore new and challenging things, Linux is also an experience you can't miss. 39 | 40 | ## Why use Arch Linux? 41 | 42 | Most importantly, Arch Linux packages are up-to-date, which is essential for everyday use, so you can be the first to enjoy the features of new software without the hassle of outdated dependencies when upgrading software. The binary packages are provided so that you can easily install and use them without having to compile them yourself. In addition, the user repository AUR is driven by Arch Linux users from all over the world and offers a huge selection of unofficial software.Arch Linux strikes an almost perfect balance between flexibility and ease of use. 43 | 44 | Arch Linux allows you to customise your system with a high degree of freedom and has the most comprehensive [documentation](https://wiki.archlinux.org/index.php/Main_page), making it possible to solve most problems by checking the official documentation. Because of its aggressive software update policy, it is recommended that users update Arch Linux as often as possible. No update over a longer period of time can cause problems, and while most problems can be remedied afterwards by rescue, it is better to update frequently. Also, keeping an eye on the Arch Linux [news list](https://archlinux.org/news/) will help keep you up to date with the latest update notes. 45 | 46 | ## Support & Donations 47 | 48 | If this book has been helpful to you, please recommend it to your friends who need it, this is the greatest support to us! 49 | 50 | We would be very grateful if receive digital currency donations. With your support, the ArchLinuxStudio community will become even more enriched and active. 51 | 52 | - Donate with Monero: `43KJJZztPtBC7k8ZjJpuw7bThW1mUH6N947TeNxvsSHD7DywRN365WZ7qpSxVopSd7cg4PFjMuUewjfvATUtTKGQLMboU36` 53 | -------------------------------------------------------------------------------- /docs/uk/_sidebar.md: -------------------------------------------------------------------------------- 1 | - [**ArchTutorial - Arch Linux Studio**](uk/) 2 | 3 | - Start from Scratch 4 | 5 | - [Pre-installation Preparation](uk/rookie/archlinux_pre_install) 6 | - [Basic Install](uk/rookie/basic_install) 7 | - [DE and Essential Applications](uk/rookie/DE&App) 8 | - [Resisting the Internet Blockade](uk/rookie/fxckGFW) 9 | - [Transparent Proxy](uk/rookie/transparentProxy) 10 | - [Graphics Card Drivers](uk/rookie/graphic_driver) 11 | 12 | - Advanced 13 | 14 | - [Try To Be an Admin](uk/advanced/beAdmin) 15 | - [Power Control](uk/advanced/undervoltage) 16 | - [System Beautification](uk/advanced/beauty) 17 | - [Troubleshooting](uk/advanced/troubleshooting) 18 | 19 | - Entertainment & Office 20 | 21 | - [Office Routine](uk/play&office/office) 22 | - [Video and Audio](uk/play&office/media) 23 | - [Games and Entertainment](uk/play&office/play) 24 | - [Android Flashing](uk/play&office/android) 25 | 26 | - Special Areas 27 | 28 | - [Getting Started with Cryptocurrencies](uk/exclusive/mine) 29 | - [Streaming and Multimedia Production](uk/exclusive/media) 30 | - [Programming](uk/exclusive/code) 31 | 32 | - [Contribution](uk/contribution.md) 33 | - [About & Acknowledgements](uk/about.md) 34 | - [Postscript](uk/postscript.md) 35 | -------------------------------------------------------------------------------- /docs/uk/about.md: -------------------------------------------------------------------------------- 1 | # About & Acknowledgements 2 | 3 | ## About 4 | 5 | Here are some additional explanations for this book. 6 | 7 | First of all, let me explain the difference between the positioning and the official document. The official Chinese documentation is indeed very complete, but its positioning is the official Wiki, so it is already necessary to do everything in detail. But this kind of overly detailed documentation can make newbies get lost in link after link, and they need guidance more than a dictionary. The positioning of this article is a guide, and what we think is the current better solution. In addition, most of the official Chinese documents are translated from English documents, and there are cases where the translation is not timely. There are a few cases where the translation is wrong or the meaning is unclear. 8 | 9 | There are a lot of similar documents on the Internet, why do you need such a document? Technological changes are changing with each passing day. Whether it is the operating system itself or valuable software, some online tutorials are mostly in disrepair. Everyone knows that the timeliness of Internet knowledge is very important. The flag of this book is that it will be updated as long as it is alive. And determined to achieve a better position in the Chinese community. 10 | 11 | Many people still think that Linux is not suitable as an operating system for everyday use. Let's be honest, the Linux desktop really wasn't usable in the first decade of this century. But now the time is after 2021, and the Linux desktop and ecology have made great progress. Whether it is office, light entertainment or programming, it can basically meet the needs. 12 | 13 | For any questions and suggestions about this book, you can send us an email, or you can leave a message directly at the bottom of this page. 14 | 15 | Email: archlinuxstudio@tutamail.com 16 | Telegram group: [ArchLinuxStudio🇨🇦🏳️‍⚧️🏳️‍🌈](https://t.me/FSF_Ministry_of_Truth) 17 | Matrix group: [Matrix Group:ArchLinuxStudio🇨🇦🏳️‍⚧️🏳️‍🌈](https://matrix.to/#/#ArchLinuxStudio:matrix.org) 18 | 19 | ## Changelog 20 | 21 | - 0.5.0 Finish English translation. Added related content about cryptocurrency. 2022.7.9 22 | - 0.4.0 Provides a better installation process for readers in areas where the Internet is blocked. Optimized multiple chapters. 2021.12.25 23 | - 0.3.0 Updated for 2021 changes. 2021.5.15 24 | - 0.2.0 comprehensive improvement and revision as the first version officially released to the outside world. 2021.4.11 25 | - 0.1.0 The first version that is initially available. The commit time is no longer available due to post-reorganization. 26 | - 0.0.0 project started. 2020.9.1 27 | 28 | ## Acknowledgements 29 | 30 | Salute to all free software developers, evangelists and pioneers. 31 | -------------------------------------------------------------------------------- /docs/uk/advanced/beauty.md: -------------------------------------------------------------------------------- 1 | # System beautification 2 | 3 | This article describes how to configure the KDE desktop environment to look more aesthetically pleasing. 4 | Principle: Landscaping should not take a lot of time and toss, which is neither practical nor meaningful. The most cost-effective landscaping in the least amount of time is always the first principle. 5 | In the beautification part, you need to set the proxy before using the `system settings` function, such as downloading themes. Otherwise, the internet speed will be very slow or even unusable. 6 | After testing, it is necessary to redirect network connections to the proxy through proxychains or setting up a global transparent proxy. 7 | 8 | ```bash 9 | proxychains systemsettings5 #Open system settings through proxy 10 | ``` 11 | 12 | > Before and after the KDE-related software update, there have been problems of unstable/stuck third-party themes. Again, don't beautify the magic changes too much, which will add more uncertainty and reduce the stability of your desktop. 13 | 14 | ## Wallpapers 15 | 16 | Right-click on the desktop and select `Configure Desktop`. In the new window that appears in the lower right corner, select `Add Picture` to select the picture you want. The 'Position' item selects 'Scale, maintain proportion', and the 'Background' item selects 'Blur'. This way you can have a beautiful desktop wallpaper that is proportional and has Gaussian blur on the edges. 17 | 18 | ## System themes 19 | 20 | Using a high-quality system theme can directly improve the aesthetics of the system. _System settings_ > _Appearance_ > _Global themes_ > _Get a new global theme_ , search for the theme layan, and set it. By the way, the author of this theme, vinceliuice, is a big Chinese and a designer. The quality of the themes and icons he designs are very high, you can go to his [homepage](https://www.pling.com/u/vinceliuice/) to rate and like him. 21 | 22 | > If the Windows key cannot call out the menu after switching themes, you can right-click in the lower left corner, configure the program launcher, and reset the `windows+F1` key in the keyboard shortcuts, and the Windows key will be displayed as the Meta key. 23 | 24 | ## Window decoration 25 | 26 | In _system settings_ > _appearance_ > _window decoration_, get the new window decoration, search for layan, and apply it. 27 | 28 | ## System icons 29 | 30 | If the icons in the theme don't satisfy you, you can choose some custom icons. _System Settings_ > _Appearance_ > _Icons_ > _Get New Icon Theme_ , search for the icon name Tela-icon-theme, and install it. 31 | 32 | ## SDDM themes 33 | 34 | You should note that the default login screen when entering a password is ugly and can be replaced here as well. _System Settings_ > _Startup and Shutdown_ > _Login Screen (SDDM)_ > _Get New Login Screen_ , search for SDDM theme layan and set it 35 | 36 | ## Splashscreen 37 | 38 | The welcome screen after the login interface can be beautified. _System Settings_ > _Appearance_ > _Welcome Screen_ > _Get New Welcome Screen_ , search for miku to set it up. This `Snowy Night Miku` is the initial interface of the best looking two-spined ape attribute we have searched. In addition, there is a big guy who has made some welcome screens of the second dimension theme, but the quality is average, here is his [home page](https://www.pling.com/u/thevladsoft/). 39 | 40 | ## Desktop plugin 41 | 42 | Right-click an empty space on the taskbar, select Edit Panel, and add widgets. 43 | 44 | - Netspeed widget network speed component, this is very practical 45 | - todolist task component 46 | 47 | Then you can pin the software you often use to the taskbar. 48 | 49 | After the KDE Plasma 5.22.1 update, an additional installation of ksysguard is required to ensure the proper functioning of the desktop plugin. [[1]](https://github.com/dfaust/plasma-applet-netspeed-widget/issues/28) 50 | 51 | ## Mixer 52 | 53 | _System Settings_ > _Display and Monitoring_ > _Mixer_ Turn on the mixer 54 | 55 | ## Terminal style settings 56 | 57 | Open konsole, go to _settings_ > _edit current scheme_ > _appearance_ , select `Red-Black` to apply and confirm. 58 | 59 | ## Kvantum Manager 60 | 61 | Themes work with Kvantum Manager to achieve better results. 62 | 63 | ```bash 64 | sudo pacman -S kvantum 65 | ``` 66 | 67 | Download Layan's Kvantum theme from [here](https://www.pling.com/p/1325246/) and unzip it. Open Kvantum Manager, select the theme and install it, then select Layan in `Change/Delete Theme`, Use this theme. Finally, in the system settings, select kvantum in the application style in the appearance. 68 | 69 | > If the transparent effect is not displayed, make sure that the global scale of KDE is an integer multiple. Or try toggling the openGL settings in the mixer. 70 | 71 | ## GRUB themes 72 | 73 | [Official Documentation](https://wiki.archlinux.org/title/GRUB/Tips_and_tricks#Theme) 74 | 75 | Select and download the GRUB theme you want at [pling](https://www.pling.com/browse/cat/109/order/latest/), such as this [two-stinged salamander theme](https://www.pling.com/p/1526503/). Next, `cd` into the unzipped folder, open konsole and enter 76 | 77 | ```bash 78 | sudo cp -r . /usr/share/grub/themes/Nino 79 | ``` 80 | 81 | to place the theme in the system's GRUB default folder. 82 | Then edit the `/etc/default/grub` file, find the `#GRUB_THEME=` line, remove the previous comment, and point to the theme's `theme.txt` file. which is 83 | 84 | ```bash 85 | #GRUB_THEME= 86 | GRUB_THEME="/usr/share/grub/themes/Nino/theme.txt" #After modification 87 | ``` 88 | 89 | and then type in the terminal 90 | 91 | ```bash 92 | sudo grub-mkconfig -o /boot/grub/grub.cfg 93 | ``` 94 | 95 | Update GRUB and restart. 96 | 97 | ## Boot animation 98 | 99 | [Plymouth](https://fedoraproject.org/wiki/Releases/FeatureBetterStartup) is a project from the Fedora community that provides the function of beautifying the startup GUI. If necessary, you can refer to the [official document]() to configure. Novices are not advised to spend too much time on this configuration. 100 | 101 | --- 102 | 103 | The rest of the KDE desktop has many configuration items, you can explore by yourself. 104 | -------------------------------------------------------------------------------- /docs/uk/advanced/troubleshooting.md: -------------------------------------------------------------------------------- 1 | # Troubleshooting and solutions 2 | 3 | This section describes some of the problems that you are likely to encounter in daily use, and provides solutions. 4 | 5 | ### Install Arch Linux using BIOS+GPT mode 6 | 7 | Although there are fewer and fewer installation scenarios using traditional BIOS mode, in some special scenarios, such as installing Arch Linux on a VPS, it may still be necessary to use BIOS mode. This section describes the differences between installing in BIOS+GPT mode and UEFI+GPT mode, and most of the steps are the same. 8 | 9 | - Before installation, in the motherboard's BIOS settings, or in the VPS's boot settings (if any), adjust the boot mode to Legacy BIOS mode boot. 10 | - When partitioning, you need to separate a 2M BIOS boot mode partition, this partition does not need to be formatted and mounted. 11 | - When installing the bootloader, the corresponding commands are modified to: `grub-install --target=i386-pc /dev/vda` and `grub-mkconfig -o /boot/grub/grub.cfg`. Among them, `/dev/vda` in the first command is the disk where GRUB is installed, not a partition. The specific name is changed according to the actual situation of the installer. 12 | 13 | ### Static IP Settings 14 | 15 | Although the use of tools that can automatically obtain IP addresses can cover most scenarios, there are still some special scenarios, such as campus networks, VPS and other environments that require static IP settings. This section gives a brief way to set a static IP. If you need to set a static IP, you need to disable the tools that automatically obtain IP such as dhcpcd or NetworkManager. 16 | 17 | ```bash 18 | sudo systemctl stop dhcpcd NetworkManager 19 | sudo systemctl disable dhcpcd NetworkManager 20 | ``` 21 | 22 | Next enable systemd-networkd 23 | 24 | ```bash 25 | sudo systemctl enable --now systemd-networkd 26 | ``` 27 | 28 | Use the `ip ad` command to view the name of the current network card, for example, the name ens3 is used here. Then create the configuration file `/etc/systemd/network/10-static-ens3.network`. Then fill in the content in it. The ip address and gateway need to be obtained from your network provider. The DNS settings also need to be set in `/etc/resolv.conf` in the same way as above. 29 | 30 | ```conf 31 | [Match] 32 | Name=ens3 33 | 34 | [Network] 35 | Address=YOUR_IPV4_ADDRESS/MASK 36 | Gateway=YOUR_IPV4_GATEWAY 37 | DNS=8.8.8.8 38 | 39 | [Network] 40 | Address=YOUR_IPV6_ADDRESS/MASK 41 | Gateway=YOUR_IPV6_GATEWAY 42 | DNS=2001:4860:4860::8888 43 | ``` 44 | 45 | Finally, restart the service. 46 | 47 | ```bash 48 | sudo systemctl restart systemd-networkd 49 | ``` 50 | 51 | ### The mouse button is insensitive or malfunctioning 52 | 53 | Generally speaking, most mice are plug and play, but may experience failure after the 5.14 kernel update. It can be solved by installing the corresponding driver according to your own mouse brand. [[1]](https://openrazer.github.io/#arch) 54 | 55 | ### It takes a long time to shut down when shutting down 56 | 57 | Generally, a message in the form of `A stop job is running for...(1m30s)` will appear on the screen. This is a common problem that the shutdown is stuck for 1 minute and 30 seconds. Generally speaking, this situation is caused by a certain A process is unwilling to stop when it is shut down, and needs to wait until the timeout period is reached to force it to stop. The general solution is to adjust and shorten this waiting time. It is recommended to adjust it from 1 minute and 30 seconds to 30 seconds. 30 seconds is enough for almost all processes to end normally. 58 | 59 | Edit `/etc/systemd/system.conf` 60 | 61 | ```bash 62 | sudo vim /etc/systemd/system.conf 63 | ``` 64 | 65 | Find the `DefaultTimeoutStopSec` item, remove the pound sign in front of it, and assign the value to 30s. Finally execute daemon-reload to make it take effect. 66 | 67 | ```bash 68 | sudo systemctl daemon-reload 69 | ``` 70 | 71 | The above solution actually only reduces this waiting time, and does not solve the actual problem. If you want to troubleshoot the real cause of the problem, if the message `A stop job is running for...(1m30s)` appears during shutdown, wait patiently for the shutdown to end, then restart the computer and execute the following commands: 72 | 73 | ```bash 74 | journalctl -p5 75 | ``` 76 | 77 | Press / (slash key) to search for the `Killing` keyword, find the matching line near the time you shut down, you can see which process caused the timeout nearby, and then check what is wrong with this process. Can. 78 | 79 | ref: [[1](https://forum.manjaro.org/t/a-stop-job-is-running-for-user-manager-for-uid-1000-during-shutdown/37799)][[ 2](https://unix.stackexchange.com/questions/273876/a-stop-job-is-running-for-session-c2-of-user)] 80 | 81 | ### How to deal with insufficient disk capacity 82 | 83 | Generally use LVM to install Linux system without worrying about this happening. But we are using the traditional ext4 classic partitioning method. In this case, it is generally recommended to set the root directory larger at the beginning of the installation, such as 100G. If the size of the /home partition is not enough, you can install a new hard disk, mount it to the location you want, and then follow the steps of `basic installation` to re-genfstab it. 84 | 85 | In addition, if the root directory capacity is insufficient, you can clean the pacman cache from time to time, see [archwiki](https://wiki.archlinux.org/title/Pacman#Cleaning_the_package_cache) for details. If it is too long to read, you can directly use the following command to clean up all cached packages that are not installed, and the synchronization database that is not used. 86 | 87 | ```bash 88 | sudo pacman -Sc 89 | ``` 90 | 91 | ### Software downgrade 92 | 93 | Occasionally, on archlinux, the latest version of a certain package has various problems, such as some software is too new, and some dependencies are not supported, such as [virtualbox crash under linux5.18 kernel](https:// bugs.archlinux.org/task/74900), at which point the package needs to be downgraded for normal use. A package can be either normal software or the kernel. 94 | 95 | ```bash 96 | yay -S downgrade 97 | ``` 98 | 99 | Just install this package, and the usage method is also very simple. Just add the package name to be downgraded after downgrade, and then you will be prompted to select the version to be downgraded to, just click. 100 | 101 | ### An error like unable to lock database occurs when upgrading the system 102 | 103 | There may be abnormal shutdown or abnormal program exit when the system is upgraded, or multiple pacman related programs are executed at the same time. Just remove the db lock of pacman 104 | 105 | ```bash 106 | sudo rm /var/lib/pacman/db.lck 107 | ``` 108 | 109 | ### Manual switch mixer 110 | 111 | Sometimes the mixer needs to be turned on or off manually for some reason, but currently the mixer cannot be turned off directly in the settings under KDE without shutting down. The following command provides the effect of manually switching the mixer on and off. [[1]](https://unix.stackexchange.com/questions/597736/disabling-kwin-compositor-from-command-line) 112 | 113 | ```bash 114 | qdbus org.kde.KWin /Compositor suspend #disable 115 | 116 | qdbus org.kde.KWin /Compositor resume #Open 117 | 118 | 119 | ``` 120 | 121 | ### Screen overflow: overscan 122 | 123 | When connecting some old-fashioned display devices, the phenomenon of [overscan](https://en.wikipedia.org/wiki/Overscan) may appear. Simply put, the TV screen will overflow in four circles, and it will not be displayed. . For Intel HD graphics, you can choose intel panel fitter [[1]](https://askubuntu.com/questions/508358/overscanning-picture-problem-using-hdmi-with-intel-graphics). The last thing is to add to a service to automatically start at boot, and execute [[2]](https://unix.stackexchange.com/questions/397853/how-to-set-a-systemd-unit-to-start-after-loading-the-desktop). 124 | 125 | ``` 126 | sudo intel_panel_fitter -p A -x 1230 -y 700 127 | ``` 128 | 129 | --- 130 | 131 | ## Ref 132 | 133 | - [[1]GUID 分区表*(GPT)*特殊操作]() 134 | -------------------------------------------------------------------------------- /docs/uk/advanced/undervoltage.md: -------------------------------------------------------------------------------- 1 | # Power Control 2 | 3 | For equipment with poor heat dissipation, power consumption control is very necessary. The power consumption control mentioned here does not mean to directly limit the frequency of the processor, but to probe the voltage of the processor to the maximum extent. While excavating the limit of the cpu physique, it can not only reduce heat, but also Maximize the effect of maintaining performance. In addition to the voltage drop, you can also try to reduce the power wall (also called TDP) of the processor. For example, considering this situation, when the CPU is at full turbo frequency, it does not need to be as much as the default. Power consumption to maintain, maybe reduce a few watts on the basis of the default power consumption, but also maintain full turbo frequency, so that the temperature can be further reduced. Limiting the power wall is different from lowering the voltage. If the parameters for limiting the power wall are low, it will inevitably lose more performance, but it is also a good method for equipment with poor heat dissipation. 4 | 5 | ## Undervolting CPU 6 | 7 | [Official reference documentation](https://wiki.archlinux.org/index.php/Undervolting_CPU) 8 | 9 | Under normal operation, lowering the voltage will generally not harm the CPU, and it is generally recommended to try from 50 mV, adding an extra 10 mV for each step-down attempt. Just make sure that the tasks in the system are properly saved before lowering the voltage. It is a rumor that reducing the CPU voltage on the Internet will "shrink the anus" [[1]](https://www.zhihu.com/question/62335676). 10 | 11 | ### Intel 4th Gen Core Haswell and newer CPUs 12 | 13 | Using intel-undervolt, as the documentation says, can be stepped down. The meanings of the five parameters in the step-down part of the configuration file are as follows: 14 | 15 | - 0: cpu core voltage 16 | - 1: cpu core graphics card voltage 17 | - 2: cpu cache voltage 18 | - 3: System peripheral voltage, related to memory and other devices 19 | - 4: Analog I/O Voltage 20 | 21 | Generally speaking, only two voltages 0 and 2 can be adjusted. 22 | 23 | After adjusting the voltage and applying, you can try to use the tool [s-tui](https://archlinux.org/packages/community/any/s-tui/) to test the oven, and observe the temperature, frequency, TDP The data. 24 | 25 | After adjusting to a suitable step-down configuration, start its corresponding service. 26 | 27 | ```bash 28 | sudo systemctl enable --now intel-undervolt 29 | ``` 30 | 31 | ### Cpu before Intel 4th generation Haswell 32 | 33 | The arch official document mentioned that the second-generation Core and previous CPUs can use PHC to reduce voltage. After testing, it cannot be used directly on i7-2760QM. It is necessary to add `intel_pstate=disable` to the kernel startup parameters to correctly identify the phc driver. [Reference 1](https://wiki.archlinux.org/index.php/CPU_frequency_scaling), which can be verified with the command `cpupower frequency-info`. Next, try to reduce the voltage. According to the archwiki operation, the phc_vid file cannot be changed, and its content is always 0, even if it has been changed to another value with vim. Maybe the cpu/motherboard BIOS doesn't support downclocking. I read the official documentation of phc-intel, and its instructions only support Core, Core 2 and previous cpu series, not Core i, which contradicts the description of archwiki. 34 | 35 | For the three-generation Core Ivy bridge sandwiched in the middle, [there is a project](https://github.com/tiziw/iuvolt) says that the principle of intel-undervolt can be used to reduce voltage, but the test failed, so try to use PHC. still fails. At present, there should be no good way to step down the three-generation Core. 36 | 37 | For older equipment bucks in this range, I won't spend more time exploring. If you know of a way to properly depressurize, please submit a PR, or [enter group discussion](https://t.me/FSF_Ministry_of_Truth). 38 | 39 | ref: [[1]](https://www.reddit.com/r/intel/comments/8ubdsg/undervolting_intel_i5_3230m/) [[2]](https://forum.thinkpads.com/viewtopic.php?t=128707) 40 | 41 | ### AMD 42 | 43 | Use amdctl in the wiki to try undervolting. 44 | 45 | ## Limit power wall 46 | 47 | For the adjustment of the power wall, some motherboards provide setting items in the BIOS that can be adjusted directly. For motherboards without setting items, some motherboards lock the instantaneous and long-term power wall, and in this case, the power wall cannot be adjusted. Some motherboard BIOS does not provide power wall adjustment items, but it can still be set through the command line. Use the following command to check whether the motherboard can adjust the power wall. 48 | 49 | ```bash 50 | grep . /sys/class/powercap/intel-rapl/intel-rapl:0/* 51 | ``` 52 | 53 | If you see an enable value of 1 in the output like the following, you can adjust it. The first row represents the existing power wall limit. 54 | 55 | ```bash 56 | /sys/class/powercap/intel-rapl/intel-rapl:0/constraint_0_power_limit_uw:100000000 57 | /sys/class/powercap/intel-rapl/intel-rapl:0/enabled:1 58 | ``` 59 | 60 | The specific adjustment steps refer to [this link](https://askubuntu.com/questions/1226254/set-max-tdp-of-intel-h-series-cpu). I will translate it when I have time. 61 | 62 | Ref: [[1]](https://askubuntu.com/questions/1231091/tee-constraint-0-power-limit-uw-no-data-available),[[2]](https://miloserdov.org/?p=1932),[[3]](https://zhuanlan.zhihu.com/p/25537264) 63 | 64 | In addition, intel-undervolt can also directly perform power wall limiting. If you see `package power limit is locked`, it means that this computer cannot change the power wall. 65 | -------------------------------------------------------------------------------- /docs/uk/contribution.md: -------------------------------------------------------------------------------- 1 | # Contribution 2 | 3 | Click the github icon in the upper right corner of this article to view this project. There is also a link to `edit this article` at the bottom of each page, click to jump to github for editing. 4 | 5 | The outline directory of this book is controlled by the project team members, and the content of the article can be edited freely. The main line of this book is based on practicality, and only provides a simple and concise installation line that we think is currently better. Redundant and meaningless content will not be accepted. 6 | 7 | The addition of project resources, such as images, non-essential js files, and non-essential css files, are not accepted. Because of the blockade and restrictions on github in some countries, such files under direct connection will greatly slow down the loading speed of web pages. 8 | 9 | This project was originally licensed under the CC BY-SA 4.0 license, and eventually switched to the CC BY-NC-ND 4.0 license, see [Why we changed the license to CC BY-NC-ND 4.0](https://github.com/ArchLinuxStudio/ArchLinuxTutorial/issues/68). 10 | 11 | ## Documentation contribution 12 | 13 | Documentation contribution is very simple, you only need to have an editor, fork the project, modify it, and submit a pull request. Note that if you submit changes in one language, please also submit changes in the other language. 14 | 15 | ## Format convention 16 | 17 | The philosophy of this series of documents is that you don't have to be too strict about formatting, because the content is what really matters. But there are also a few specifications that must be followed, otherwise reading will be affected. 18 | 19 | - Use OSS code for development, format the code with the default configuration of the Prettier plugin, and use ctrl+s to automatically format and save after writing some documents. 20 | - Each md document title organizes the content hierarchically, the main title is #, followed by ##, then ###, and so on. 21 | - means that the fragment needs to be wrapped in markdown syntax and specify the code type, such as bash. 22 | - In general, please try to use punctuation such as periods, commas, quotation marks, and colons as normal. 23 | - Use markdown citation syntax for parts that need attention. 24 | - Proper nouns can be hinted using inline code `` syntax, which is more obvious than bold. 25 | - Inline code Please use inline code for hints. 26 | 27 | ## Code contribution 28 | 29 | This project is written using [docsify](https://docsify.js.org/#/). If you want to contribute related code, please read the docsify project documentation first. 30 | 31 | This project uses yarn to manage dependencies, and the structure is very simple. If you have not been exposed to it, you may need to briefly understand [yarn](https://classic.yarnpkg.com/en/) 32 | 33 | Local debugging: 34 | 35 | ```bash 36 | yarn install 37 | yarn start 38 | ``` 39 | -------------------------------------------------------------------------------- /docs/uk/exclusive/code.md: -------------------------------------------------------------------------------- 1 | # Programming 2 | 3 | What many people don't know is that Linux is almost the most suitable operating system for programming, and its programming support for all directions is in place (except Microsoft and Apple's proprietary system programming), which can save you a lot of pain. This article introduces high-quality software introductions in various programming directions. We recommend that readers use free software for programming, and only free software is listed in this section. 4 | 5 | ## Front-end programming 6 | 7 | For the front end, a browser and IDE (or editor) are generally required, with some network tools attached. 8 | 9 | For IDE (or editor), you can use [OSS code](https://www.archlinux.org/packages/community/x86_64/code/), which is an open source build generated from the official repository. [vscodium-bin](https://aur.archlinux.org/packages/vscodium-bin/)AUR is a community driven version of vs code. 10 | 11 | > Binary builds of Microsoft Visual Studio Code are actually proprietary software. Many people have misunderstandings here. Such tricks are increasingly being explored and used by more companies. [[1]](https://carlchenet.com/you-think-the-visual-studio-code-binary-you-use-is-a-free-software-think-again/) 12 | 13 | On the browser side there are [firefox](https://archlinux.org/packages/extra/x86_64/firefox/), [chromium](https://archlinux.org/packages/extra/x86_64/chromium/), [firefox -developer-edition](https://www.archlinux.org/packages/community/x86_64/firefox-developer-edition/), [brave](https://aur.archlinux.org/packages/brave-dev-bin/)AUR and many other software to choose from. 14 | 15 | Network tools often use [httptoolkit](https://aur.archlinux.org/packages/httptoolkit/)AUR (as a replacement for charles), and [wireshark-qt](https://archlinux.org/packages/community/x86_64/wireshark-qt/). 16 | 17 | As for front-ends such as [yarn](https://www.archlinux.org/packages/community/any/yarn/), [npm](https://www.archlinux.org/packages/community/any/npm/) Common tools can also be installed with pacman. 18 | 19 | ## Back-end programming 20 | 21 | Jetbrains' open source IDE can be found in the official archlinux repository, such as [IntelliJ Idea](https://www.archlinux.org/packages/community/x86_64/intellij-idea-community-edition/), [PyCharm](https://www.archlinux.org/packages/community/x86_64/pycharm-community-edition/), et al. 22 | More traditional IDEs include [Netbeans](https://www.archlinux.org/packages/community/any/netbeans/) and eclipse, which has multiple versions and can be searched in the AUR. 23 | 24 | There is no need to say much about the programming language itself, except that the C language and C++ are supported by the installed system, java, node, etc. can be easily installed. 25 | 26 | In addition to the default installed gcc, you can also install clang and llvm for use 27 | 28 | When it comes to database-related software, there are also a variety of options. 29 | 30 | - [Mysql Workbench](https://www.archlinux.org/packages/community/x86_64/mysql-workbench/) 31 | - [pgadmin4](https://www.archlinux.org/packages/community/x86_64/pgadmin4/) 32 | - [dbeaver](https://www.archlinux.org/packages/community/x86_64/dbeaver/) 33 | - [robo3t](https://aur.archlinux.org/packages/robo3t-bin/)AUR 34 | - [RESP.app](https://aur.archlinux.org/packages/resp-app/)AUR (pre redis-desktop-manager) 35 | - [rdm-bin](https://aur.archlinux.org/packages/rdm-bin/)AUR If there is a problem with the above compilation, use this bin version 36 | 37 | For big data, packages such as [hadoop](https://aur.archlinux.org/packages/hadoop/)AUR can be installed. If the package has not been updated for a long time or the package does not exist, such as hbase and hive, you can only go to the official website to download and configure it yourself. 38 | 39 | Regarding software testing, common software such as [junit](https://archlinux.org/packages/extra/any/junit/) can also be easily installed and used with your favorite IDE. 40 | 41 | ## Android client programming 42 | 43 | At present, Android development has been unified to [Android Studio](https://aur.archlinux.org/packages/android-studio/)AUR for development. Of course traditional Eclipse can also be used. Common Android emulators can also use [Anbox](https://wiki.archlinux.org/title/Anbox#Installation) or [Waydriod](https://wiki.archlinux.org/title/Waydroid#Installation) . 44 | 45 | ## Desktop application programming 46 | 47 | At present, the more popular desktop development is [electron](https://archlinux.org/packages/community/x86_64/electron/) and [Qt](https://archlinux.org/packages/extra/x86_64/qt6-base/) application. Electron can be developed directly with OSS Code, and Qt applications can be developed with [Qt Creator](https://www.archlinux.org/packages/extra/x86_64/qtcreator/). 48 | 49 | ## Machine Learning and Deep Learning 50 | 51 | For programming in machine learning, the IDE can use the same software as in backend programming. Machine learning commonly used [jupyter-notebook](https://archlinux.org/packages/community/any/jupyter-notebook/) and required related libraries such as [numpy](https://archlinux.org/packages/extra/x86_64/python-numpy/), [sklearn](https://archlinux.org/packages/community/x86_64/python-scikit-learn/), [pandas](https://archlinux.org/packages/community/x86_64/python-pandas/), etc., can also be found in the source. Meanwhile, [tensorflow](https://archlinux.org/packages/community/x86_64/tensorflow/), [pytorch](https://archlinux.org/packages/?sort=&q=python-pytorch&maintainer=&flagged=) And deep learning related packages such as its related cuda support package can also be installed and used. 52 | 53 | ## Scientific Computing 54 | 55 | [SageMath](https://www.sagemath.org/) (formerly Sage) is free, liberating mathematical software that supports research and teaching in algebra, geometry, number theory, cryptography, numerical computing, and related fields, and is available as Alternative to MATLAB. Both Sage's development model and Sage's own technology place a strong emphasis on openness, community, cooperation, and collaboration: we're building cars, not reinventing the wheel. The overall goal of Sagemath is to provide a viable, free, free alternative to the "4M" (i.e. Maple, Mathematica, Magma, and Matlab). SageMath rewrites the interface for most open source software/libraries in the field of scientific computing, and provides a python-compatible syntax, which can be said to be the culmination of open source mathematical software. At present, it can partially replace "4M". 56 | 57 | [Arch Wiki](https://wiki.archlinux.org/title/SageMath) ||| [Chinese Tutorial and Documentation](https://www.osgeo.cn/sagemath/index.html) 58 | 59 | ## Reverse Engineering 60 | 61 | The well-known [ghidra](https://archlinux.org/packages/community/x86_64/ghidra/) can be installed as an alternative to IDA. For more alternative options, please refer to [alternativeto](https://alternativeto.net/software/ida/). In addition, introduce a useful hex editor [Bless](https://archlinux.org/packages/community/any/bless/). 62 | -------------------------------------------------------------------------------- /docs/uk/exclusive/media.md: -------------------------------------------------------------------------------- 1 | # Streaming and Multimedia Production 2 | 3 | This section will list all kinds of high-quality software in the direction of multimedia production, including the software required for live broadcast, video editing, image editing and drawing. 4 | 5 | ## Live streaming and barrage Ji auxiliary software 6 | 7 | The live broadcast and recording are done on linux using [obs-studio](https://www.archlinux.org/packages/community/x86_64/obs-studio/), and the usage is basically the same as that under windows. 8 | 9 | You can use [danmaku library](https://www.danmaku.live/) for the live broadcast of station b. This history is more complicated. The v1 version of the warehouse is [here](https://github.com/pandaGao/bilibili-live-helper), but the author said that it will not be updated. The author of the v2 version is currently not open source, and said that it [will not be updated in the future](https://t.bilibili.com/378501835576827480). AUR: [bilibili-live-helper-bin](https://aur.archlinux.org/packages/bilibili-live-helper-bin/). 10 | 11 | In addition to this, there is also a [bilibili-live-chat](https://github.com/Tsuk1ko/bilibili-live-chat), which is a browser's bullet chat implementation, the style is modeled after youtube's bullet chat style, It is also the basis of many barrage software, which can be used directly on the web. In addition to the live broadcast of station B, the live broadcast methods of other platforms such as twitch are similar, but you need to find different bullet screen plug-ins. For example, you can refer to [this article](https://www.bilibili.com/read/cv10092277/) on twitch . 12 | 13 | > Browser-based danmakuji implementations such as bilibili-live-chat require the use of obs integrated with browser plug-ins. The default obs-studio in the arch official repository does not have this function. If you want to use bilibili-live-chat, please Install [obs-studio-browser](https://aur.archlinux.org/packages/obs-studio-browser/) in AUR. 14 | 15 | If you use a newer NVIDIA graphics card, you can use the NVENC encoder, which will greatly reduce the pressure on the cpu during live streaming or recording, see [NVIDIA NVENC OBS Guide](https://www.nvidia.cn/geforce/guides/broadcasting-guide/) 16 | 17 | Note that if you use qv2ray+cgproxy to enable transparent proxy, then you need to add obs to the value of program_noproxy in /etc/cgproxy/config.json. 18 | 19 | ## Video production editing and special effects 20 | 21 | The free software [shotcut](https://www.archlinux.org/packages/community/x86_64/shotcut/) is recommended for video editing and production. It can meet most video editing needs. Similar software includes [kdenlive](https://www.archlinux.org/packages/extra/x86_64/kdenlive/) and [mkvtoolnix](https://archlinux.org/packages/extra/x86_64/mkvtoolnix-gui/). 22 | 23 | Some of KDE's accessibility features are useful when recording video. In KDE's system settings, find Workspace Behavior->Desktop Effects, check `Mouse Positioning` and `Mouse Click Animation` in Accessibility Functions, and use them. These two settings can highlight the mouse position and click effect in video production, which is quite useful for video production. 24 | 25 | For keyboard input, you can install the package [screenkey](https://archlinux.org/packages/community/any/screenkey/), which can display the keyboard input on the display screen, which is also quite useful for video production. 26 | 27 | ## Drawing, drafting and retouching 28 | 29 | Retouched images on linux are available [gimp](https://www.archlinux.org/packages/extra/x86_64/gimp/). If you need to draw with the tablet, you can use [krita](https://www.archlinux.org/packages/extra/x86_64/krita/), krita also provides certain drawing functions. Vector image manipulation can be done using [inkscape](https://www.archlinux.org/packages/extra/x86_64/inkscape/) 30 | 31 | [Aseprite](https://www.aseprite.org/) is a pixel art drawing tool, you can use the yay installation package [aseprite](https://aur.archlinux.org/packages/aseprite/). 32 | 33 | [RawTherapee](https://archlinux.org/packages/community/x86_64/rawtherapee/) is a free and open source cross-platform RAW format image processing program. 34 | 35 | [hugin](https://archlinux.org/packages/community/x86_64/hugin/) is an open source software that can synthesize the depth of field of pictures and stitch pictures. It can replace the automatic alignment layers and Automatically merge layers. 36 | 37 | As for format conversion, you can use the convert function of [imagemagick](https://archlinux.org/packages/extra/x86_64/imagemagick/) to convert between image formats. 38 | 39 | For handwriting and various handwriting needs, you can try to use [rnote](https://archlinux.org/packages/community/x86_64/rnote/) 40 | 41 | ## Modeling 42 | 43 | - [blender](https://archlinux.org/packages/community/x86_64/blender/) powerful 3D modeling software 44 | - [Sweet Home 3D](https://archlinux.org/packages/community/x86_64/sweethome3d/) Sweet Home 3D is a free home improvement assistant design software. It can help you design and arrange your furniture through a two-dimensional home floor plan, and you can also browse the entire decoration layout with a three-dimensional perspective. 45 | - [Synfig Studio](https://archlinux.org/packages/community/x86_64/synfigstudio/) Synfig Studio is a free and open source 2D animation software for creating film-quality animations using vector and bitmap artwork. 46 | 47 | ## Audio 48 | 49 | Professional audio production can use the following software. 50 | 51 | - [Kwave](https://archlinux.org/packages/extra/x86_64/kwave/) Kwave is a free and open source audio editing software developed by KDE, which can record, play, import and edit many audio files, including many soundtrack file. 52 | - [lmms](https://archlinux.org/packages/community/x86_64/lmms/) LMMS is a free, open source and cross-platform composition tool. Create music by crafting melodies and beats, synthesizing and mixing audio, arranging audio clips, and more. 53 | - [carla](https://archlinux.org/packages/community/x86_64/carla/) Carla is a fully-featured modular audio plugin host, with support for many audio drivers and plugin formats. 54 | - [Ardour](https://archlinux.org/packages/community/x86_64/ardour/) Ardour is a free and open source software that allows you to record, edit and mix on Linux. 55 | - [vcvrack](https://aur.archlinux.org/packages/vcvrack-bin/) VCV Rack is an open source visual, modular sound synthesizer. 56 | - [Mixxx](https://archlinux.org/packages/community/x86_64/mixxx/) Mixxx integrates the tools DJs need for creative live mixing using digital music files. 57 | - [MuseScore](https://archlinux.org/packages/community/x86_64/lmms/) MuseScore is a cross-platform free and open source notation software developed by Muse Group. 58 | - [SoundConverter](https://archlinux.org/packages/community/any/soundconverter/) SoundConverter is an audio file converter for the GNOME desktop (this does not affect use in the Plasma desktop environment). 59 | - [Reaper](https://archlinux.org/packages/community/x86_64/reaper/) REAPER is a complete digital audio production application for computers, offering a full multitrack audio and MIDI recording, editing, processing, mixing and mastering toolset. 60 | 61 | ## UI/UX Design 62 | 63 | - [figma-linux](https://github.com/Figma-Linux/figma-linux) figma online version, or use an unofficial Linux figma desktop software 64 | - [Akira](https://aur.archlinux.org/packages/akira/) Designing Linux-native apps with UI/UX built with Vala and GTK 65 | 66 | ## Subtitles 67 | 68 | Generally speaking, it is more common to add srt subtitles to a video. Here is how to add subtitles to youtube videos. 69 | The first thing to do is to download video subtitles, here you can use a chrome extension: [YouTube™ Dual Subtitles](https://chrome.google.com/webstore/detail/youtube-dual-subtitles/hkbdddpiemdeibjoknnofflfgbgnebcm), you can download your Required subtitle file. If you have a more convenient way to download, please let us know. 70 | Next, re-burn the subtitles and video. MKVToolNix can only do that kind of separated subtitles, but some video sites such as Bilibili need to upload and burn it. For better compatibility, it is recommended to always re-burn the video and file. Do it with ffmpeg: 71 | 72 | ```bash 73 | ffmpeg -i input.mp4 -vf subtitles=input.srt output.mp4 74 | ``` 75 | 76 | If you need to make bilingual subtitles (display at the same time, instead of subtitle tracks), after youtube selects automatic translation, click Chinese, if the video supports, the file download of bilingual subtitles will appear. If the video does not support bilingual subtitle download, you can use the ffmpeg command twice, the first to add the main subtitle and the second to add the subtitle. The first operation uses MarginV for vertical differentiation. For more parameters, you can refer to the ffmpeg documentation yourself. 77 | 78 | ```bash 79 | ffmpeg -i hack.mp4 -strict -2 -vf subtitles=hack_en.srt:force_style='Fontsize=20\,Fontname=FZYBKSJW--GB1-0\,MarginV=30\,Bold=-1\,BorderStyle=1 ' -qscale:v 3 hack_with_en.mp4 80 | ffmpeg -i hack_with_en.mp4 -strict -2 -vf subtitles=hack_en.srt:force_style 81 | ='Fontsize=15\,Fontname=FZYBKSJW--GB1-0\,Bold=-1\,BorderStyle=1' -qscale:v 3 hack_with_double_subtitles.mp4 82 | ``` 83 | 84 | In addition, ffmpeg can also perform transcoding and many other operations. It is a very powerful tool and an important component of many audio and video software. More about ffmpeg can be inquired by yourself. 85 | 86 | ## Material extraction for visual novels 87 | 88 | At present, [GARbro](https://github.com/morkt/GARbro) is commonly used, but it cannot be used normally through wine under linux. Here is a cross-platform gal game content extraction tool [arc_unpacker](https://aur.archlinux.org/packages/arc_unpacker-git/). For detailed usage, you can check its github by yourself. 89 | -------------------------------------------------------------------------------- /docs/uk/play&office/android.md: -------------------------------------------------------------------------------- 1 | # Android Flashing 2 | 3 | [Arch Wiki Android Doc](https://wiki.archlinux.org/index.php/android) 4 | 5 | ## Why need Android Flashing 6 | 7 | Among the mobile phone brands currently available on the market, in addition to its own magic-modified closed-source Android mobile phone system, almost any brand will be pre-installed with a series of factory applications, such as browsers, contacts, and application markets. These applications are all closed-source software developed and provided by various mobile phone manufacturers. There is a serious problem here. These magic-modified systems and closed-source application software may perform various espionage functions to monitor and audit users. According to reports, both Xiaomi and Huawei mobile phones will report users' searches and browsing, and if keywords such as "Tibet freedom", "Taiwan independence", "democracy and freedom" are matched, they will be encrypted and reported. These keywords may have Hundreds of thousands. Due to such reasons, users must re-flash the system of the mobile phone. Choosing an open source and reliable ROM to flash the mobile phone can protect their privacy and security. At the hardware level, there is also the possibility of auditing and monitoring, but there is no clear and reliable report yet. 8 | 9 | > Mainland Chinese manufacturers such as Huawei Hongmeng and Xiaomi’s MIUI have the risk of cooperating with the authoritarian government, and this risk is getting bigger and bigger. From the perspective of the operating system, the integration of the so-called "anti-fraud system" is almost on the verge of completion. . Whether there will be hardware-level monitoring and auditing, there is no clear evidence yet. For your privacy and security, if the mobile phones of these manufacturers cannot be flashed into the secure ROM by themselves, then you need to refuse to use the products of these manufacturers. 10 | 11 | It is best to buy a mobile phone with a well-known brand and a popular model, so that you can easily find the official twrp and well-known ROM packages when flashing the phone, such as[LineageOS](https://lineageos.org/), [crDroid](https://crdroid.net/), [Resurrection Remix](https://resurrectionremix.com/), [PixelExperience](https://download.pixelexperience.org/devices),[grapheneos](https://grapheneos.org/) etc. If it is a relatively unpopular brand, the official may not provide ROM, and you can only find the personal modified twrp and the unofficial ROM of the above ROM package on the Internet. The search method is generally the code name of the mobile phone + ROM. The security of such a personal modification is more difficult to say, and it may also have more bugs. It is also possible that you have searched the whole network, but you cannot find twrp and ROM that can be used by unpopular models (referring to easy-to-use, non-hardware provider's official ROM). In terms of hardware, it is generally recommended to buy Qualcomm Snapdragon cpu, not MediaTek, because more ROM versions are compatible with Qualcomm hardware. 12 | 13 | First you need to install the android toolkit on linux 14 | 15 | ```bash 16 | sudo pacman -S android-tools 17 | ``` 18 | 19 | ## Unlock bootloader 20 | 21 | Again, a reminder to buy or use a phone brand that might unlock the bootloader. Generally speaking, for brands like Xiaomi, the official will provide ways and tools to unlock the bootloader, but these tools can only be used under windows. At this time, you can only use a windows operation, or use a virtual machine. 22 | 23 | In addition, if you can get, or get the unlock code of the bootloader in a very hacky way, you can also use adb to unlock it in fastboot mode. 24 | 25 | ```bash 26 | $ adb reboot bootloader #The mobile phone first connects to the computer and restarts to fastboot 27 | $ fastboot oem unlock xxxxxxx #Unlock in fastboot mode, you must add the correct bl code to unlock, otherwise an error will be reported 28 | FAILED (remote: 'check password failed!') 29 | fastboot: error: Command failed 30 | ``` 31 | 32 | ## Flash twrp and ROM 33 | 34 | There is no official twrp device, you can check it at [unofficialtwrp](https://unofficialtwrp.com/devices/). 35 | 36 | If there is no relevant information, there are several forums and websites you can look at 37 | 38 | - xda https://forum.xda-developers.com/ 39 | - https://androidfilehost.com/ search development code + system name you want 40 | 41 | Generally, the version of twrp has a corresponding relationship with the ROM package. Before flashing, make sure that your two versions are compatible, otherwise the flashing process may report strange errors, such as unable to mount /system 42 | 43 | Go to download the twrp corresponding to your model. Search for your model on the [official website](https://twrp.me/Devices/) and download it. If you don't see your model, it means that it is not officially supported, and you need to search for the version modified by others. Connect the phone to the computer, be careful to connect it to the USB2.0 interface, otherwise there may be compatibility problems. 44 | 45 | Put the phone into fastboot mode, open the terminal on the computer, and execute 46 | 47 | ```bash 48 | fastboot flash recovery ./path/of/your-twrp.img 49 | ``` 50 | 51 | When you see the terminal has finished executing, you can restart the phone. Note here that executing `fastboot reboot` can restart, but many devices will automatically overwrite and replace the custom recovery you flashed at the first boot, so a direct restart will report an error that it is not an official system and similar information. To prevent this, reboot into recovery via a hardware key on the phone, and TWRP will patch the ROM to prevent the ROM from replacing TWRP. [[1]](https://twrp.me/xiaomi/xiaomimi5.html) 52 | 53 | The remaining steps are to simply enter twrp, double-clear, and flash. 54 | 55 | > Sometimes double-clear or enter twrp may see an error, use advanced cleaning, change the format from ext4, and then change back to ext4 may be solved 56 | 57 | More commands: 58 | 59 | ```bash 60 | $ adb shell #Open adb shell 61 | $ adb root #Open adb shell with root privileges when the phone is already rooted 62 | ``` 63 | 64 | ## Remove the network restriction prompt 65 | 66 | Google has introduced the "Captive Portal" mechanism since Android 5.0, which is mainly used to detect whether the WiFI network authentication is normal. The default detection access is the server outside the Google wall. When using native Android, which is common in the world, this service will prompt that the network is restricted in the wall environment, even if services such as Shadowsocks have been turned on. To solve this problem, you can use the adb command to modify the server to detect access to google.cn. 67 | 68 | ``` 69 | adb shell settings put global captive_portal_server www.google.cn 70 | adb shell settings put global captive_portal_https_url https://www.google.cn/generate_204 71 | adb shell settings put global captive_portal_mode 0 72 | ``` 73 | 74 | Finally, switch to the flight mode and switch back to solve it. 75 | 76 | ## Flash into Google Suite 77 | 78 | In some scenarios, you need to flash into the Google suite because you need to use Google play. Optional projects are [opengapps](https://opengapps.org/), [nikgapps](https://nikgapps.com/) and [suites provided by lineageos](https://wiki.lineageos.org/gapps). opengapps updates seem to have stalled at the moment. nikgapps can be customized. 79 | 80 | ## Unlock root privileges 81 | 82 | Use Magisk to unlock root privileges. Download the Magisk apk file from its [official release interface](https://github.com/topjohnwu/Magisk/releases), and rename it to a .zip suffix. Then copy it to the phone, and finally enter twrp to flash the zip package. 83 | 84 | Ref: 85 | 86 | - [小米刷机教程](http://www.romleyuan.com/news/readnews?newsid=938) 87 | -------------------------------------------------------------------------------- /docs/uk/play&office/media.md: -------------------------------------------------------------------------------- 1 | # Audio & Video 2 | 3 | This section records related information about watching movies and listening to music on arch linux. 4 | 5 | ## Online music and audio player 6 | 7 | To listen to online music, you can use [Netease Cloud Music](https://aur.archlinux.org/packages/netease-cloud-music/), [qq Music](https://aur.archlinux.org/packages/qqmusic-bin/) produced by NetEase or Tencent , but they are either in disrepair or of poor quality. Obviously these big companies are not willing to invest their energy in the Linux desktop, and we recommend you to use free software that is better maintained. 8 | 9 | [yesplaymusic](https://github.com/qier222/YesPlayMusic) is a full-platform open source music listening software, with high appearance, no social functions, and integration of whole network resources, it is recommended to use 10 | 11 | ```bash 12 | yay -S yesplaymusic 13 | ``` 14 | 15 | [listen1](https://github.com/listen1/listen1_desktop) is an old-fashioned music listening software with complete functions. The same resources are integrated across the entire network. It is recommended to use 16 | 17 | ```bash 18 | yay -S listen1-desktop-appimage 19 | ``` 20 | 21 | [Electron Netease Cloud Music](https://github.com/Rocket1184/electron-netease-cloud-music) is a Netease Cloud Music Linux client written with Electron and Vue, which supports song download, which is its advantage , but the music library is not as complete as the first two software. 22 | 23 | ```bash 24 | yay -S electron-netease-cloud-music 25 | ``` 26 | 27 | [FeelUOwn](https://github.com/feeluown/FeelUOwn) is a cross-platform music player that conforms to the Unix philosophy. It is easy to install, novice-friendly, and provides plug-ins for various domestic music platforms by default. 28 | 29 | ```bash 30 | yay -S feeluown 31 | # Install the following plugins as needed 32 | yay -S feeluown-local feeluown-netease feeluown-qqmusic feeluown-kuwo 33 | ``` 34 | 35 | ## Video player 36 | 37 | Local audio and video playback generally uses vlc or mpv 38 | 39 | ```bash 40 | sudo pacman -S vlc #VLC player 41 | sudo pacman -S mpv #MPV player 42 | ``` 43 | 44 | Besides, if you want to watch online video resources, [zy-player](https://aur.archlinux.org/packages/zy-player-bin/) is a good choice, it is a cross-platform Video resource player, integrates the whole network resources, can play some movies. 45 | -------------------------------------------------------------------------------- /docs/uk/postscript.md: -------------------------------------------------------------------------------- 1 | # Postscript 2 | 3 | ArchLinuxStudio always puts the privacy and security of readers first, and continues to make efforts to promote the development of the free software movement, and this `ArchLinux Installation and Use Tutorial` is the initial project of the organization, and we will give the highest priority to ensuring its project quality. It will play a role in bringing more people into the world of free software. 4 | 5 | What can free software bring to the masses? This is a question worth exploring in depth. Simply put, it gives enough respect to each user and gives users the right to choose. Proprietary software tramples on users' privacy, dignity, and does countless shameless and dirty acts. In the eyes of these proprietary software, users are just data that can be used, sold and oppressed at will, not a person. 6 | 7 | However, what is even more dangerous is that in many totalitarian and authoritarian countries, commercial companies that own proprietary software are in cahoots with these totalitarian and authoritarian governments, not only monitoring people in all aspects, but also secretly arresting and secretly arresting pro-democracy activists and dissidents. persecution. Many times, whenever we witness such an incident, we will sigh that these people have not mastered the use of free software and have not realized the value of free software. 8 | 9 | > Where there is oppression, there is resistance. 10 | 11 | It is very ironic that this sentence, said today, will shame and fear some political parties in the world. Some people will think it is completely incomprehensible that people and organizations supporting the free software movement are concerned with politics, as if politics were an issue that had nothing to do with them. In fact, this view is very ignorant and stupid. The main goal of the free software movement is to guarantee the freedom and dignity that users deserve. However, in authoritarian countries, people are suppressed and oppressed in all aspects at the electoral level, the financial level, the network level, the speech level, etc., which makes the supporters of the free software movement unable to stand by. For the web, they have developed software that breaks internet blockades, such as V2ray and Shadowsocks, re-giving people the right to freely access the internet. For finance, they have developed the blockchain and the cryptocurrency system that grows on it, re-empowering people to truly control their own property, and to be free from the wealth plunder caused by the government's indiscriminate currency issuance. For administration, election and decision-making, the transparency and immutability of the blockchain ensures that everything is open, transparent and fair. In terms of speech, software such as Mammoth, Telegram, Matrix, etc. re-empowers people to freely express their opinions. 12 | 13 | > If you listen to it, it will be bright, and if you believe in it, it will be dark. 14 | 15 | This Chinese idiom is very applicable in many ways. Write the code, and after reading the source code of as many similar projects as possible, you will have a better grasp of the project you need to do. Watching news, only by listening to reports from various countries and media in the world, and combining your own thinking, can you come to a more rational conclusion. When making a decision, only after listening to the opinions of the relevant personnel, can a more reasonable and rational decision be made in the interests of more people. However, in authoritarian and totalitarian countries. We don't see any such possibility. The blockade of the Internet makes it difficult or impossible for people in these countries to obtain the world's news information, the latest software and technology, and can only hear and see what authoritarian and totalitarian governments want them to see. Cover people's eyes, ears, and finally sew their mouths. In this case, people will only be more and more deceived, and eventually become extreme and stupid. **We can't do it to see it all, and to be indifferent and stand idly by. ** 16 | 17 | In fact, there is almost no monetary income for everything we do, which is incomprehensible to many people who believe in the philosophy of putting money first. Of course, this just shows that we are fundamentally different from these people. A scholar must be courageous and have a long way to go. Many people's ambition is to make money, but not here. 18 | 19 | Later, there will be other tutorials to meet readers, and ArchLinuxStudio will continue to develop various free software and various tools that can achieve "Equal Internet access for all." It's just that due to human and economic reasons, we can't guarantee the speed of the update, but we can guarantee that our speed may be very slow, but it will never stop. 20 | 21 | --- 22 | 23 | Proprietary software for evil, totalitarian government surveillance, arrest and persecution, keep pace with the world's largest Great Firewall, "We won 🎉!" 24 | -------------------------------------------------------------------------------- /docs/uk/rookie/archlinux_pre_install.md: -------------------------------------------------------------------------------- 1 | # Preparation before installation 2 | 3 | Since UEFI has been popular for more than ten years, the installation will be carried out in the form of UEFI+GPT, and the traditional BIOS method will not be repeated. 4 | 5 | ## 0. Use of terminal editor vim 6 | 7 | In the process of installing Arch Linux, you need to use the vim editor. If you don't know how to use it, here is a brief introduction. You need to master the following basic operations. For a practical environment, you can find an online Linux experience environment to try vim, such as [copy.sh](https://copy.sh/v86/?profile=archlinux). Note that because it is an online environment, the performance is poor, and you need to wait patiently when executing the vim command. 8 | 9 | ```bash 10 | vim 1.txt #Create and edit a file named 1.txt 11 | ``` 12 | 13 | You can see that an empty interface is entered. You are now in vim's `command mode`. In `command mode`, you can use some shortcuts to manipulate text. 14 | Now we enter `a` to enter vim's `edit mode`, enter any text at this time, and you can edit it. 15 | After the input is complete, we can press the Esc key to exit from `edit mode` to `command mode`. At this point, enter `:wq` to save and exit vim. 16 | Here are some commonly used commands in command mode 17 | 18 | ```bash 19 | :wq # save and exit 20 | :q! # do not save, force quit 21 | dd # delete a line 22 | 2dd # delete two lines 23 | gg # go back to the first line of text 24 | shift+g # go to the last line of text 25 | /xxx # Search for the content 'xxx' in the text, press Enter to search, press the n key to go to the next one 26 | ?xxx # reverse search 27 | ``` 28 | 29 | Extended link: Readers who need a complete tutorial can enter the command `vimtutor` in the terminal to learn the complete vim tutorial. 30 | 31 | ## 1. Ensure the network environment 32 | 33 | If you can use the network cable from the router to directly access the Internet by dhcp, then you don't need to prepare anything. If your environment can only use wireless network installation, you need to change the wifi name you use to an English name you can remember in advance. Because **installation cannot display and enter the Chinese name of the wifi**, you will see a bunch of blocks that you don't know what it is, and during the installation process you will not be able to enter the Chinese name of the wifi to connect. Although some tedious steps can solve the problem of terminal Chinese, it is obviously unnecessary to do so when installing Arch Linux. 34 | 35 | Secondly, there are hardware switches or keyboard controls for wireless network cards on some laptops. After booting, you need to ensure that your wireless network card hardware switches are turned on before installation. 36 | 37 | ## 2. Burn the bootable USB 38 | 39 | Prepare a USB disk with a size of more than 2G, and burn a boot disk for installation. Install the mirror iso to download at the [download page](https://archlinux.org/download/), you need to download the newest iso, choose to download through a magnet link or torrent, after the download is complete, you also need to download the `PGP signature` signature file on the archlinux download page ( Do not download the signature file from the mirror source), put the signature file and the iso image in the same folder, and then perform the signature verification of the image to ensure that the downloaded image is complete, error-free and untampered. If you are using Linux, execute the following command to make sure the output is well signed. The specific image name can be modified according to the name. If you use another system, please search for a way to verify the signature by yourself. 40 | 41 | ```bash 42 | gpg --keyserver-options auto-key-retrieve --verify archlinux-202x.0x.01-x86_64.iso.sig 43 | ``` 44 | 45 | Note that the signature verification here is **very important**, which can ensure that your installation image has not been tampered with, and can also ensure that you use the correct public key to verify the installation package when you use the installation disk to install the system. 46 | 47 | --- 48 | 49 | It is recommended to use [ventoy](https://www.ventoy.net/cn/doc_start.html) or [Rufus](https://rufus.ie/) or [etcher](https://github.com/balena-io/etcher) to burn to USB. All three are free software. Please check the specific operation by yourself, it is very simple. 50 | 51 | Under Linux, you can directly use the dd command to burn. Note that the parameter of of is sdx, not sdx1 sdx2 etc. 52 | 53 | ```bash 54 | sudo dd bs=4M if=/path/to/archlinux.iso of=/dev/sdx status=progress oflag=sync 55 | ``` 56 | 57 | > bs=4M specifies a reasonable file input and output block size. 58 | > status=progress is used to output general information about the burning process. 59 | > oflag=sync is used to control behavior when writing data. Make sure that the data and metadata are actually written to disk at the end of the command, rather than just being written to the cache and returning. 60 | 61 | ## 3. Enter the motherboard BIOS to set 62 | 63 | Insert the USB stick and turn it on. When booting, press F2/F8/F10/DEL (depending on your motherboard model, please refer to the relevant information of your motherboard) to enter the motherboard's BIOS setting interface. 64 | 65 | ## 4. Turn off Secure Boot in the motherboard settings 66 | 67 | In a tab like `security`, find an option called Secure Boot (the name may vary slightly), select Disable to disable it. 68 | 69 | ## 5. Adjust the boot method to UEFI 70 | 71 | In some old motherboards, it is necessary to adjust the boot mode to UEFI instead of traditional BIOS/CSM. In a tab called something like `boot`, find an option called something like Boot Mode, make sure to adjust it to UEFI only, not legacy/CSM. 72 | 73 | ## 6. Adjust the hard disk boot order 74 | 75 | In a tab called `boot`, find a setting option called Boot Options (the name may be slightly different), and adjust the boot order of the USB stick to the first place. 76 | 77 | ## 7. Ready to install 78 | 79 | Finally, save the BIOS settings and exit, the general key is F10. At this point, the system restarts, and you should have entered the installation interface of archlinux. 80 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "arch_linux_tutorial", 3 | "author": { 4 | "name": "ArchLinuxStudio", 5 | "url": "https://github.com/ArchLinuxStudio" 6 | }, 7 | "version": "0.5.0", 8 | "private": false, 9 | "dependencies": { 10 | "docsify-cli": "^4.4.4" 11 | }, 12 | "devDependencies": {}, 13 | "scripts": { 14 | "start": "docsify serve docs" 15 | }, 16 | "license": "CC-BY-NC-ND-4.0" 17 | } 18 | -------------------------------------------------------------------------------- /pull_request_template.md: -------------------------------------------------------------------------------- 1 | - Please make sure all your changes are verified by yourself. 2 | - Please assign task to ryosukeeeeee. 3 | --------------------------------------------------------------------------------