til/install-archlinux.md

147 lines
3.0 KiB
Markdown
Raw Normal View History

2020-05-24 10:44:40 +00:00
# Install Arch Linux
2020-02-02 04:02:43 +00:00
2020-05-24 10:44:40 +00:00
Install Arch Linux is thing I always want to do for my laptop/PC since I had my laptop in ninth grade.
2020-02-02 04:02:43 +00:00
This is not a guide for everyone, this is just save for myself in a future and for anyone who want to taste a bit.
2020-02-24 15:33:09 +00:00
Assume your laptop/PC is UEFI-capable.
2020-03-13 04:04:51 +00:00
## [Installation guide](https://wiki.archlinux.org/index.php/Installation_guide)
2020-02-02 04:02:43 +00:00
2020-05-20 09:14:22 +00:00
Check disks carefully:
2020-05-19 18:49:39 +00:00
```sh
lsblk
```
Create USB flash installation media:
```sh
dd bs=4M if=path/to/archlinux.iso of=/dev/sdx status=progress oflag=sync
```
2020-02-02 04:02:43 +00:00
2020-03-13 04:04:51 +00:00
### Connect to the internet
2020-02-02 04:02:43 +00:00
2020-03-28 14:38:17 +00:00
Enable wifi:
```sh
wifi-menu
```
2020-02-02 04:02:43 +00:00
2020-03-13 04:04:51 +00:00
### Partition the disks
2020-02-02 04:02:43 +00:00
2020-03-13 04:04:51 +00:00
Partition:
```sh
cfdisk
```
2020-03-28 14:38:17 +00:00
| Mount point | Partition type | Suggested size |
| ----------- | -------------------- | -------------- |
2020-05-19 18:49:39 +00:00
| /mnt/boot | EFI system partition | 512 MiB |
2020-03-28 14:38:17 +00:00
| /mnt | Linux | |
| /mnt/home | Linux | |
2020-05-19 18:49:39 +00:00
Format:
```sh
# /boot
2020-05-19 19:27:28 +00:00
mkfs.fat -F32 /dev/xxxY
2020-05-19 18:49:39 +00:00
2020-05-19 19:27:28 +00:00
# / and /home
mkfs.ext4 /dev/xxxY
2020-05-19 18:49:39 +00:00
```
2020-03-13 04:04:51 +00:00
### Boot loader
[systemd-boot](https://wiki.archlinux.org/index.php/Systemd-boot)
## [General recommendations](https://wiki.archlinux.org/index.php/General_recommendations)
2020-02-02 04:02:43 +00:00
2020-03-28 14:38:17 +00:00
Always remember to check **dependencies** when install packages.
2020-02-23 17:54:34 +00:00
2020-03-13 04:04:51 +00:00
### System administration
2020-03-28 14:38:17 +00:00
Read [Users and groups](https://wiki.archlinux.org/index.php/Users_and_groups).
Read [Sudo/Using visudo](https://wiki.archlinux.org/index.php/Sudo#Using_visudo).
```sh
useradd -m -G additional_groups -s login_shell username
```
2020-05-19 19:27:28 +00:00
| abstract | implement |
| ------------------- | ----------- |
| `additional_groups` | `wheel` |
| `login_shell` | `/bin/bash` |
2020-02-02 04:02:43 +00:00
2020-05-19 19:27:28 +00:00
### Graphical user interface and Networking
2020-02-02 04:02:43 +00:00
2020-05-19 19:27:28 +00:00
Install [Xorg](https://wiki.archlinux.org/index.php/Xorg):
2020-02-02 04:02:43 +00:00
2020-05-19 19:27:28 +00:00
```sh
pacman -Syu xorg-server
```
2020-02-02 04:02:43 +00:00
2020-05-19 19:27:28 +00:00
Install [GNOME](https://wiki.archlinux.org/index.php/GNOME):
2020-02-02 04:02:43 +00:00
2020-03-13 04:04:51 +00:00
```sh
2020-05-19 19:27:28 +00:00
pacman -Syu \
gnome-shell \
gdm \
2020-05-19 19:34:57 +00:00
networkmanager gnome-keyring \
gnome-control-center gnome-tweak-tool \
nautilus xdg-user-dirs-gtk \
file-roller p7zip unrar \
2020-05-19 19:27:28 +00:00
gnome-terminal \
gnome-backgrounds \
gnome-screenshot \
2020-03-13 04:04:51 +00:00
```
2020-05-19 19:27:28 +00:00
Enable services:
2020-03-13 04:04:51 +00:00
```sh
2020-05-19 19:27:28 +00:00
systemctl enable gdm.service
2020-02-02 04:02:43 +00:00
2020-03-13 04:04:51 +00:00
systemctl enable NetworkManager.service
timedatectl set-ntp true
```
### Optimization
2020-03-28 14:38:17 +00:00
Read [Improving performance/Watchdogs](https://wiki.archlinux.org/index.php/Improving_performance#Watchdogs).
2020-03-13 04:04:51 +00:00
2020-03-28 14:38:17 +00:00
Read [Improving performance/Staggered spin-up](https://wiki.archlinux.org/index.php/Improving_performance/Boot_process#Staggered_spin-up).
2020-03-13 04:04:51 +00:00
2020-02-02 04:02:43 +00:00
Read [Silent boot](https://wiki.archlinux.org/index.php/Silent_boot).
2020-03-13 04:04:51 +00:00
### Appearance
2020-02-02 04:02:43 +00:00
2020-03-13 04:04:51 +00:00
Read [Fonts](https://wiki.archlinux.org/index.php/Fonts).
2020-02-04 13:19:22 +00:00
2020-03-13 04:04:51 +00:00
## [List of applications](https://wiki.archlinux.org/index.php/List_of_applications)
2020-05-06 18:38:17 +00:00
### [pacman](https://wiki.archlinux.org/index.php/pacman)
Uncomment or add if not exist options in `/etc/pacman.conf`:
```txt
# Misc options
Color
ILoveCandy
```
### [AUR](https://wiki.archlinux.org/index.php/Arch_User_Repository)
Install AUR package:
```sh
makepkg -sric
```
2020-03-13 04:04:51 +00:00
## In the end
2020-02-04 13:19:22 +00:00
2020-03-28 14:38:17 +00:00
This guide is updated regularly I promise.