arch 0.3.0

A archlinux installer and manager
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
<img src="https://raw.githubusercontent.com/otechdo/arch/main/arch/archlinux.svg" alt="archlinux" align="right" width="250">

A archlinux installer, manager for advanced arch users.

- [@documentation]https://github.com/otechdo/arch/blob/main/arch/docs/
    - [@en]https://raw.githubusercontent.com/otechdo/arch/main/README.md
    - [@fr]https://github.com/otechdo/arch/blob/main/arch/docs/fr/README.md
- [@archlinux]https://archlinux.org
    - [@guide]https://wiki.archlinux.org/title/Installation_guide
    - [@wiki]https://wiki.archlinux.org/
    - [@download]https://archlinux.org/download/
- [@arch]https://github.com/otechdo/arch/
    - [@issues]https://github.com/otechdo/arch/issues
    - [@discussions]https://discord.gg/jWHjkpRJPw

##  Set desired keymap

```bash
loadkeys <keymap>
```

##  Create three partitions:

* 1 1024MB  EFI partition   # ef00
* 2 4096MB  Linux partition # 8300
* 3 100%    Linux partition # 8300

```bash
cgdisk /dev/sda
```

## Formatting

### /boot/efi

```bash
mkfs.vfat -F 32 /dev/sda1
```

### /boot

```bash
mkfs.ext2 /dev/sda2
```

### /

```bash
mkfs.ext4 /dev/sda3
```

## List device block for mounting

```bash
lsblk --fs
```

## Mount partitions

```bash
mount /dev/sda3 /mnt
mkdir /mnt/boot
mount /dev/sda2 /mnt/boot
mkdir /mnt/boot/efi
mount /dev/sda1 /mnt/boot/efi
```

## Check device block afer mounting

```bash
lsblk --fs --paths
```

## Change pacman mirror priority

```bash
reflector -c <country> --sort delay --save /etc/pacman.d/mirrorlist -p https
```

## Update package signing keys

```bash
pacman-key --init && pacman-key --populate archlinux
```

## Refresh package signing keys

```bash
pacman-key --refresh-keys
```

## Install the base system

```bash
pacstrap /mnt base base-devel wget git linux linux-firmware vim efibootmgr rustup sudo grub networkmanager w3m archiso reflector <shell> <ucode> <graphics_driver>
```

##  Generate fstab

```bash
genfstab -U /mnt >> /mnt/etc/fstab
```

##  Enter inside the new system

```bash
arch-chroot /mnt && cd ~
```

## Create your account

### Create user

```bash
useradd -m -U -c 'REAL NAME' -s <shell> <username>
```

### Create root password

```bash
passwd root
```

### Create user password

```bash
passwd <username>
```

### Add your account to sudoers 

```bash
echo '<username> ALL=(ALL) ALL' > /etc/sudoers.d/<username>
```

## Checkout on your account

```bash
su - <username>
```

## Configure the toolchain

```bash
rustup default stable
```

## Enabled multilib repository

```bash
sudo vim /etc/pacman.conf
```

## Refresh pacman database 

```bash
sudo pacman -Sy
```

## Install yay

```bash
git clone https://aur.archlinux.org/yay && cd yay && makepkg -si && cd .. && rm -rf yay
```

## Install arch
 
### From GitHub

```bash
git clone https://github.com/otechdo/arch && cd arch && make && sudo make install
```

### From Crates.io

```bash
cargo install arch && install -m 755 "$HOME/.cargo/bin/arch" /usr/bin/arch
```

### From Aur

```bash
paru -Syu manager
```

## Setup a new arch

```bash
arch setup
```

## Desktop 

- [@deepin]https://wiki.archlinux.org/title/Deepin_Desktop_Environment
- [@kde]https://wiki.archlinux.org/title/KDE
- [@gnome]https://wiki.archlinux.org/title/GNOME
- [@xmonad]https://wiki.archlinux.org/title/xmonad
- [@i3]https://wiki.archlinux.org/title/i3

## Install all selected packages on arch

```bash
arch --install
arch -S <pkg> <pkg>
```

## Install all selected packages as deps on arch

```bash
arch --install-dependencies
```

## Remove all selected packages on arch

```bash
arch --uninstall
arch -R <pkg> <pkg> 
```

## Update all mirrors to the enter country

```bash
arch --update-mirrors
```

## Check updates

```bash
arch --check-updates
```

## Update arch

```bash
arch --update
```

## Update and reboot arch

```bash
arch --update-and-reboot
arch --update -r
arch -r --update
```

## Cancel the reboot task

```bash
arch --cancel-reboot
```

## Refrech cache

```bash
sudo arch --refresh-cache
```

## Show help

```bash
arch --help
arch -h
```

## Show arch news using w3m

```bash
arch --news
arch -n
```

## Show arch wiki using w3m

```bash
arch --wiki
arch -w
```

## Show arch manpages using w3m

```bash
arch --man
arch --woman
arch -m
```

## Show arch formum using w3m

```bash
arch --forums
arch -f
```

## Show aur packages formum using w3m

```bash
arch --aur
arch -a
```

## Download updates

```bash
arch --download-updates
```

## Exit chroot

```bash
exit
```

## Umount partitions

```bash
umount -R /mnt
```

## Restart on the new system

```bash
reboot
```

## Key Bindings

This file lists all of the key bindings currently registered by prompts.

## All prompts

These key bindings may be used with all prompts.

| **command**                      | **description**         |
|----------------------------------|-------------------------|
| <kbd>enter</kbd>                 | Submit answer.          |
| <kbd>esc</kbd>                   | Cancel the prompt\*.    |
| <kbd>ctrl</kbd>  +  <kbd>c</kbd> | Interrupt the prompt\*. |

\* Canceling and interrupting a prompt have two different meanings. Canceling is defined specially for when the end user is allowed to skip a prompt, the library user can then use `prompt_skippable` which wraps the return type into an `Option` and catches the `CanceledOperation` error transforming it into a `Ok(None)` result. Interrupted operations are closer to "stop-the-world" operations, where the library user should treat them as termination commands.

## Text Input

These key bindings may be used with all prompts that ask the user for text input: [`Text`], [`Select`], [`MultiSelect`], [`Confirm`], [`CustomType`] and [`Password`]. The [`Editor`] prompt is not included because it opens a separate text editor for text input.


| **command**                          | **description**                                 |
|--------------------------------------|-------------------------------------------------|
| <kbd>character</kbd>                 | Insert the character into the input.            |
| <kbd>left</kbd>                      | Move the cursor back one character.             |
| <kbd>right</kbd>                     | Move the cursor forward one character.          |
| <kbd>ctrl</kbd> + <kbd>left</kbd>    | Move one word to the left of the cursor.        |
| <kbd>ctrl</kbd> + <kbd>right</kbd>   | Move one word to the right of the cursor.       |
| <kbd>home</kbd>                      | Move cursor to the start of the line*.          |
| <kbd>end</kbd>                       | Move cursor to the end of the line*.            |
| <kbd>backspace</kbd>                 | Delete one character to the left of the cursor. |
| <kbd>delete</kbd>                    | Delete the character at the cursor.             |
| <kbd>ctrl</kbd> + <kbd>delete</kbd>  | Delete one word to the right of the cursor.     |

\* Key bindings not supported on [`Select`] and [`MultiSelect`] prompts.

## Text Prompts

These key bindings may be used in [`Text`] prompts.

| **command**          | **description**                                               |
|----------------------|---------------------------------------------------------------|
| <kbd>enter</kbd>     | Submit the current current text input.                        |
| <kbd>up</kbd>        | When suggestions are displayed, move cursor one row up.       |
| <kbd>down</kbd>      | When suggestions are displayed, move cursor one row down.     |
| <kbd>page up</kbd>   | When suggestions are displayed, move cursor one page up.      |
| <kbd>page down</kbd> | When suggestions are displayed, move cursor one page down.    |
| <kbd>tab</kbd>       | Replace current input with the resulting suggestion if any.   |
| others               | See [Text Input]#text-input and [All Prompts]#all-prompts |

## Select Prompts

These key bindings may be used in [`Select`] prompts.

| **command**          | **description**                                               |
|----------------------|---------------------------------------------------------------|
| <kbd>enter</kbd>     | Submit the current highlighted option.                        |
| <kbd>up</kbd>        | Move cursor one row up.                                       |
| <kbd>down</kbd>      | Move cursor one row down.                                     |
| <kbd>k</kbd>         | Move cursor one row up when vim mode is enabled.              |
| <kbd>j</kbd>         | Move cursor one row down when vim mode is enabled.            |
| <kbd>page up</kbd>   | Move cursor one page up.                                      |
| <kbd>page down</kbd> | Move cursor one page down.                                    |
| <kbd>home</kbd>      | Move cursor to the first option.                              |
| <kbd>end</kbd>       | Move cursor to the last option.                               |
| others               | See [Text Input]#text-input and [All Prompts]#all-prompts |

## MultiSelect Prompts

These key bindings may be used in [`MultiSelect`] prompts.

| **command**          | **description**                                               |
|----------------------|---------------------------------------------------------------|
| <kbd>enter</kbd>     | Submit the options currently selected.                        |
| <kbd>space</kbd>     | Toggle the selection of the current highlighted option.       |
| <kbd>up</kbd>        | Move cursor one row up.                                       |
| <kbd>down</kbd>      | Move cursor one row down.                                     |
| <kbd>k</kbd>         | Move cursor one row up when vim mode is enabled.              |
| <kbd>j</kbd>         | Move cursor one row down when vim mode is enabled.            |
| <kbd>page up</kbd>   | Move cursor one page up.                                      |
| <kbd>page down</kbd> | Move cursor one page down.                                    |
| <kbd>home</kbd>      | Move cursor to the first option.                              |
| <kbd>end</kbd>       | Move cursor to the last option.                               |
| <kbd>left</kbd>      | Unselect all options.                                         |
| <kbd>right</kbd>     | Select all options.                                           |
| others               | See [Text Input]#text-input and [All Prompts]#all-prompts |

## DateSelect Prompts

These key bindings may be used in the interactive calendar of the [`DateSelect`] prompt.


| **command**                              | **description**                                               |
|------------------------------------------|---------------------------------------------------------------|
| <kbd>space bar</kbd> or <kbd>enter</kbd> | Submit the current highlighted date.                          |
| <kbd>up</kbd>                            | Move cursor one row up.                                       |
| <kbd>down</kbd>                          | Move cursor one row down.                                     |
| <kbd>left</kbd>                          | Move cursor one column to the left.                           |
| <kbd>right</kbd>                         | Move cursor one column to the right.                          |
| <kbd>k</kbd>                             | Move cursor one row up when vim mode is enabled.              |
| <kbd>j</kbd>                             | Move cursor one row down when vim mode is enabled.            |
| <kbd>h</kbd>                             | Move cursor one column to the left when vim mode is enabled.  |
| <kbd>l</kbd>                             | Move cursor one column to the right when vim mode is enabled. |
| <kbd>ctrl</kbd> + <kbd>up</kbd>          | Move calendar back by one year.                               |
| <kbd>ctrl</kbd> + <kbd>down</kbd>        | Move calendar forward by one year.                            |
| <kbd>ctrl</kbd> + <kbd>left</kbd>        | Move calendar back by one month.                              |
| <kbd>ctrl</kbd> + <kbd>right</kbd>       | Move calendar forward by one month.                           |

## Editor Prompts

These key bindings may be used in [`Editor`] prompts.

| **command**      | **description**                                                |
|------------------|----------------------------------------------------------------|
| <kbd>e</kbd>     | Open the editor.                                               |
| <kbd>enter</kbd> | Submit the current content of the temporary file being edited. |


[`Text`]: https://docs.rs/inquire/*/inquire/prompts/text/struct.Text.html
[`DateSelect`]: https://docs.rs/inquire/*/inquire/prompts/dateselect/struct.DateSelect.html
[`Select`]: https://docs.rs/inquire/*/inquire/prompts/select/struct.Select.html
[`MultiSelect`]: https://docs.rs/inquire/*/inquire/prompts/multiselect/struct.MultiSelect.html
[`Confirm`]: https://docs.rs/inquire/*/inquire/prompts/confirm/struct.Confirm.html
[`Editor`]: https://docs.rs/inquire/*/inquire/prompts/editor/struct.Editor.html
[`customtype`]: https://docs.rs/inquire/*/inquire/struct.CustomType.html
[`Password`]: https://docs.rs/inquire/*/inquire/prompts/password/struct.Password.html