├── LICENSE ├── README.md └── images ├── draw.png ├── draw1.png └── fileOHRD6BQC.jpg /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Emmadi Sumith Kumar 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ArchLinux-Installation-Guide 2 | 3 | This is a guide for arch linux installation with Openbox Window Manager. 4 | 5 | ![Image](https://raw.githubusercontent.com/sumithemmadi/EasyOpenboxWM/main/images/openbox.png) 6 | 7 | --- 8 | 9 | ## Installing Arch Linux 10 | 11 | ### Small notes before we start 12 | 13 | - Arch Linux now comes with an installer, so if you just want a minimal system ready in a few minutes, you're better off just doing 14 | ```sh 15 | archinstall 16 | ``` 17 | - The only officially supported architecture by Arch Linux is **x86_64**, so make sure your computer uses that architecture before attempting to install it. 18 | - This guide is for UEFI only, not BIOS. 19 | - so you should enable the UEFI mode and disable the secure boot option on your BIOS system. (Also remember to change the boot order to boot through your USB device). 20 | 21 | ### Bootable Flash Drive 22 | 23 | First of all, you need the Arch Linux image, that can be downloaded from the [Official Website](https://www.archlinux.org/download/). 24 | After that, you should create the bootable flash drive with the Arch Linux image. 25 | 26 | - Write the [Arch Linux ISO](https://www.archlinux.org/download/) into a USB drive. There are several tools available for this, like [dd](https://man.archlinux.org/man/dd.1.en), [balenaEtcher](https://www.balena.io/etcher/). 27 | 28 | If you're on a GNU/linux distribution, you can use the `dd` command for it. Like: 29 | 30 | ```sh 31 | dd bs=4M if=/path/to/archlinux.iso of=/dev/sdx status=progress oflag=sync && sync 32 | ``` 33 | 34 | > Note that you need to update the `of=/dev/sdx` with your USB device location (it can be discovered with the `lsblk` command). 35 | 36 | Otherwise, if you're on `Windows`, you can use [balenaEtcher](https://www.balena.io/etcher/) or [Rufus](https://rufus.ie/en/). 37 | You can follow this [tutorial](https://wiki.archlinux.org/index.php/USB_flash_installation_media#In_Windows) 38 | 39 | --- 40 | 41 | - Disable **Secure Boot** in the UEFI. 42 | 43 | - Boot from the USB drive. 44 | 45 | ### Check boot mode 46 | 47 | To check if the UEFI mode is enabled, run: 48 | 49 | ```sh 50 | ls /sys/firmware/efi/efivars 51 | ``` 52 | 53 | If the directory does not exists, the system may be booted in BIOS (not UEFI). 54 | 55 | ### (Dual Boot) Disable Fast Startup in Windows 56 | 57 | 58 | 59 | --- 60 | 61 | ### Pre installation 62 | 63 | Time to connect to the Internet: 64 | 65 | - If you're not going to use DHCP, [check the Arch Wiki on how to manually set a static IP](https://wiki.archlinux.org/title/Network_configuration#Static_IP_address). 66 | - If you're using a wired connection (recommended), it should already be working. 67 | - If you're using a wireless connection, the live system comes with `iwd` enabled, so you can use `iwctl`. `iwctl`'s man page (`man iwctl`) shows a simple example on how to connect to a network. 68 | ![iwctl](https://raw.githubusercontent.com/sumithemmadi/ArchLinux-Installation-Guide/main/images/fileOHRD6BQC.jpg) 69 | - If scanning with `iwctl` isn't working (you get no networks found), simply do `systemctl restart iwd` and try again. 70 | - Do `ping -4c4 archlinux.org` to verify that everything is working properly. 71 | 72 | ```sh 73 | ping -4c4 archlinux.org 74 | ``` 75 | 76 | ### Update System Clock 77 | 78 | Ensures that the system clock is accurate. 79 | 80 | ```sh 81 | timedatectl set-ntp true 82 | ``` 83 | 84 | ### Partitioning 85 | 86 | First, define your partitions size. There's no rules about this process. 87 | 88 | > Tip: If you use a SSD drive, it's recommended to leave 25% of his storage free. More info [here](https://wiki.archlinux.org/index.php/Solid_State_Drives#TRIM). 89 | 90 | My SSD has 512GB of storage. I want to have Dual-Boot with Windows11. If Windows was installed first, then you could see it's partitions. For that example, I have 4 Windows partitions already created: 91 | (in my case, I'll work with `/dev/nvme0n1` disk. Use `fdisk -l /dev/nvme0n1` to list partitions) 92 | 93 | | Name | Size | Type | 94 | | :--: | :-------------: | :--: | 95 | | nvme0n1p1 | 625M | Windows recovery environment | 96 | | nvme0n1p2 | 100M | EFI System | 97 | | nvme0n1p3 | 16M | Microsoft Reserved | 98 | | nvme0n1p4 | 356G | Microsoft Basic Data | 99 | 100 | EFI partition was created by Windows, so we don't need to care about it. We need to create additional partitions for Linux installation. 101 | 102 | | Name | Mount | Size | Type | 103 | | :--: | :----------: | :-------------: | :--: | 104 | | nvme0n1p5 | `swap` | 4G | Linux Swap | 105 | | nvme0n1p6 | `/` | 32G | Linux Root x86-64 (Ext4) | 106 | | nvme0n1p7 | `/home` | Remaining Space | Linux Home (Ext4) | 107 | 108 | Look at partitioning layout examples: 109 | 110 | #### Create Partitions 111 | 112 | Use [fdisk](https://wiki.archlinux.org/index.php/Fdisk) to create partitions. 113 | 114 | To create partitions, I'll use `gdisk` since to work on UEFI mode we need GPT partitions. 115 | 116 | First, list partitions (Informational only) with the following command 117 | 118 | ```sh 119 | fdisk -l /dev/nvme0n1 120 | ``` 121 | 122 | Here's a table with some handy gdisk commands 123 | 124 | | Command | Description | 125 | | :-----: | ---------------------- | 126 | | p | Print partitions table | 127 | | n | Add a new partition | 128 | | d | Delete a partition | 129 | | w | Write table to disk and exit | 130 | | l | List known partition types | 131 | | t | Change a partition type | 132 | | m | Help | 133 | 134 | 1. Enter in the interactive menu 135 | 136 | ```sh 137 | fdisk /dev/nvme0n1 138 | ``` 139 | 140 | 1. Create boot partition (If not Dual-Boot) 141 | - Type `n` to create a new partition 142 | - Partition Number: default (return) 143 | - First Sector: default 144 | - Last Sector: `+512M` 145 | - Type: `1` - EFI System 146 | 147 | 1. Create root partition 148 | - Type `n` to create a new partition 149 | - Partition Number: default 150 | - First Sector: default 151 | - Last Sector: `+32G` 152 | - Type: `24` - Linux Root (x86-64) 153 | 154 | 1. Create swap partition 155 | - Type `n` to create a new partition 156 | - Partition Number: default 157 | - First Sector: default 158 | - Last Sector: `+4G` 159 | - Type: `19` - Linux Swap 160 | 161 | 1. Create home partition 162 | - Type `n` to create a new partition 163 | - Partition Number: default 164 | - First Sector: default 165 | - Last Sector: default 166 | - Type: `28` - Linux Home 167 | 168 | 1. Save changes with `w` 169 | 170 | #### Format partitions 171 | 172 | Once the partitions have been created, each (except swap) should be formatted with an appropriated file system. So run: 173 | 174 | ```sh 175 | mkfs.btrfs -L arch_root /dev/nvme0n1p6 #-- root partition 176 | mkfs.btrfs -L HOME /dev/nvme0n1p7 #-- home partition 177 | 178 | ``` 179 | 180 | If not Dual Boot format partition for EFI boot 181 | 182 | ```sh 183 | mkfs.fat -F32 -n BOOT /dev/nvme0n1p2 #-- boot partition 184 | ``` 185 | 186 | The process for swap partition is slight different: 187 | 188 | ```sh 189 | mkswap -L swap /dev/nvme0n1p5 190 | swapon /dev/nvme0n1p5 191 | ``` 192 | 193 | > To check if the swap partition is working, run `swapon -s` or `free -h`. 194 | 195 | #### Mount file system 196 | 197 | 1. Mount root partition: 198 | 199 | ```sh 200 | mount /dev/nvme0n1p6 /mnt 201 | ``` 202 | 203 | 1. Mount home partition: 204 | 205 | ```sh 206 | mkdir -p /mnt/home 207 | mount /dev/nvme0n1p7 /mnt/home 208 | ``` 209 | 210 | 1. Mount boot partition: (to use `grub-install` later) 211 | 212 | ```sh 213 | mkdir -p /mnt/boot 214 | mount /dev/nvme0n1p2 /mnt/boot 215 | ``` 216 | 217 | Do `lsblk` to verify everything is correct. 218 | 219 | --- 220 | 221 | ## Installation 222 | 223 | Now we'll install arch on disk 224 | 225 | ### Select Mirror 226 | 227 | Before installation,It is recommended to select the best mirror servers. 228 | 229 | So open the file `/etc/pacman.d/mirrorlist` (again, you can use `nano` or `vi` to do that) and move the best mirror to the top of the file. 230 | 231 | > **Tip**: That [link](https://www.archlinux.org/mirrorlist/) generates a mirror list based on your location, you can use them as reference. 232 | 233 | ### Install Base Packages 234 | 235 | Now that the mirrors are already set, use `pacstrap` to install the base package group: 236 | Open the file `/etc/pacman.conf` and uncomment the line `#ParallelDownloads = 5` 237 | 238 | ```sh 239 | pacstrap /mnt base{,-devel} btrfs-progs dkms linux{{,-lts}{,-headers},-firmware} nano 240 | ``` 241 | 242 | - If the install failed because of signature issues, run below command to update the keyring and try again 243 | ```sh 244 | pacman -Sy --needed archlinux-keyring 245 | ``` 246 | 247 | ### Generate fstab 248 | 249 | Now you should generate the fstab with the `genfstab` script: 250 | 251 | ```sh 252 | genfstab -p /mnt >> /mnt/etc/fstab 253 | ``` 254 | 255 | > Optional: You can add `noatime,commit=60,barrier=0` to the generated `fstab` file (on root and home partitions) to increase IO performance. 256 | 257 | ### Chroot 258 | 259 | Now, we'll change root into the new system 260 | 261 | ```sh 262 | arch-chroot /mnt 263 | ``` 264 | 265 | ### Check pacman keys 266 | 267 | ```sh 268 | pacman-key --init 269 | pacman-key --populate archlinux 270 | ``` 271 | 272 | --- 273 | 274 | ## Basic system configuration 275 | 276 | - Again open the file `/etc/pacman.conf` and uncomment the line `#ParallelDownloads = 5` 277 | 278 | ```sh 279 | nano /etc/pacman.conf 280 | ``` 281 | 282 | - Uncomment this line `#ParallelDownloads = 5` 283 | - Press `CRTL + S` to save and `CRTL + X` to exit 284 | 285 | Install some important packages with 286 | 287 | ```sh 288 | pacman -S dhclient git man-{db,pages} nano networkmanager openssh polkit vi vim 289 | ``` 290 | 291 | - Edit the file `/etc/NetworkManager/conf.d/dhcp.conf` to contain the following: 292 | 293 | ```conf 294 | [main] 295 | dhcp=dhclient 296 | ``` 297 | 298 | - Edit the file `/etc/NetworkManager/conf.d/dns.conf` to contain the following: 299 | 300 | ```conf 301 | [main] 302 | dns=systemd-resolved 303 | ``` 304 | 305 | - If you want to enable [mDNS](https://en.wikipedia.org/wiki/Multicast_DNS) support, which is useful for adding network printers for example, do the following: 306 | - Edit the file `/etc/systemd/resolved.conf` and uncomment the line `#MulticastDNS=yes` 307 | - Edit the file `/etc/NetworkManager/conf.d/dns.conf` and add the following lines: 308 | 309 | ```conf 310 | [connection] 311 | connection.mdns=2 312 | ``` 313 | 314 | --- 315 | 316 | - Do `ln -svf /usr/share/zoneinfo/$(tzselect | tail -1) /etc/localtime` to set your timezone. 317 | - Example 318 | 319 | ```sh 320 | ln -svf /usr/share/zoneinfo/Asia/Kolkata /etc/localtime 321 | ``` 322 | 323 | - Then, do `hwclock -w` to update the hardware clock. 324 | - You can do `hwclock -r` to see the current time stored by the hardware clock. You'll notice that it takes the timezone into account. 325 | 326 | --- 327 | 328 | - Open the file `/etc/locale.gen`. Uncomment the `en_US.UTF-8` and any other locales you want to use. 329 | - Do `locale-gen` to generate the uncommented locales. 330 | - Do echo LANG=**LOCALE** > /etc/locale.conf, **LOCALE** being your preferred locale from the ones you just generated. 331 | - Example 332 | 333 | ```gen 334 | echo LANG=en_US.UTF-8 > /etc/locale.conf 335 | ``` 336 | 337 | - Now you'll have to execute the following command: 338 | 339 | ```sh 340 | locale-gen 341 | ``` 342 | 343 | - Do echo KEYMAP=**KEYMAP** > /etc/vconsole.conf, **KEYMAP** being the name of the keymap you're using (set when you used the `loadkeys` command earlier). 344 | - Example: 345 | 346 | ```sh 347 | echo KEYMAP=mac-us > /etc/vconsole.conf 348 | ``` 349 | 350 | - Do `echo FONT=lat0-16 >> /etc/vconsole.conf`. You can find all fonts available in `/usr/share/kbd/consolefonts`. 351 | 352 | --- 353 | 354 | - Do echo **HOSTNAME** > /etc/hostname, **HOSTNAME** being the name you want your system to have. 355 | - The hostname must be compatible with the following regex expression: `^(:?[0-9a-zA-Z][0-9a-zA-Z-]{0,61}[0-9a-zA-Z]|[0-9a-zA-Z]{1,63})$`. 356 | - You can [click here](https://regexr.com/4f7ah) and put the hostname you want your computer to have in the text field to see if you can actually use it. 357 | - Edit the file `/etc/hosts` to contain the following: 358 | 359 |

360 |   # Static table lookup for hostnames.
361 |   # See hosts(5) for details.
362 | 
363 |   127.0.0.1   localhost
364 |   ::1         localhost
365 |   127.0.1.1   HOSTNAME
366 |   
367 | 368 | > Note: **HOSTNAME** being the hostname you chose in the previous command. 369 | 370 | --- 371 | 372 | - Enable some services with 373 | 374 | ```sh 375 | systemctl enable sshd NetworkManager systemd-resolved 376 | ``` 377 | 378 | - If you have an SSD, do 379 | 380 | ```sh 381 | systemctl enable fstrim.timer 382 | ``` 383 | 384 | - Run below commad for the system to automatically update the pacman keyring. 385 | 386 | ```sh 387 | systemctl enable archlinux-keyring-wkd-sync.timer 388 | ``` 389 | 390 | ### Initramfs 391 | 392 | - Edit the file `/etc/mkinitcpio.conf` and change `udev` to `systemd` in the `HOOKS` list. 393 | https://wiki.archlinux.org/index.php/Installation_guide#Initramfs 394 | 395 | - Creating a new initramfs is usually not required. 396 | 397 | ```sh 398 | mkinitcpio -P linux 399 | ``` 400 | 401 | ## How To Set the Root Password 402 | 403 | You may want to set a password for the root user because why not? To do so, execute the following command: 404 | 405 | ```sh 406 | passwd 407 | ``` 408 | 409 | The passwd command lets you change the password for a user. By default it affects the current user's password which is the root right now. 410 | 411 | It'll ask for a new password and confirmation password. Input them carefully and make sure you don't forget the password. 412 | 413 | --- 414 | 415 | ## How To Install Microcode 416 | 417 | According to PCMag, 418 | 419 | > A set of elementary instructions in a complex instruction set computer (CISC). The microcode resides in a 420 | separate high-speed memory and functions as a translation layer between the machine instructions and the 421 | circuit level of the computer. Microcode enables the computer designer to create machine instructions 422 | without having to design electronic circuits. 423 | Processor manufacturers such as Intel and AMD often release stability and security updates to the 424 | processor. These updates are crucial for the system's stability. 425 | 426 | In Arch Linux, microcode updates are available through official packages that every user should install on their systems. 427 | 428 | Just installing these packages is not enough though. You'll have to make sure that your bootloader is loading them. You'll learn about it in the next section. 429 | 430 | - Time to install the microcode updater: 431 | - If you're using an Intel CPU, do 432 | 433 | ```sh 434 | pacman -S intel-ucode 435 | ``` 436 | 437 | - If you're using an AMD CPU, do 438 | 439 | ```sh 440 | pacman -S amd-ucode 441 | ``` 442 | 443 | --- 444 | 445 | ## How To Install and Configure a Boot Loader 446 | 447 | - Run below command to install grub and efibootmgr. 448 | 449 | ```sh 450 | pacman -S grub efibootmgr os-prober 451 | ``` 452 | - If you're dual-booting with other operating systems, you'll have to enable os-prober before generating the configuration file. To do so, open the `/etc/default/grub` file in nano text editor. Locate the following line and uncomment it: 453 | 454 | ```grub 455 | # GRUB_DISABLE_OS_PROBER=false 456 | ``` 457 | 458 | > This should be the last line in the aforementioned file so just scroll to the bottom and uncomment it. 459 | 460 | - Then do 461 | ```sh 462 | grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=Arch\ Linux 463 | ``` 464 | - Then do 465 | 466 | ``` 467 | grub-mkconfig -o /boot/grub/grub.cfg 468 | ``` 469 | 470 | - Do `exit` and then `umount -R /mnt`. 471 | - You can now do `shutdown now`. 472 | 473 | ## Congratulations! You've installed Arch Linux 474 | 475 | ***But we're not done yet. We still have to create a user and do some final touches*** 476 | 477 | --- 478 | --- 479 | --- 480 | 481 | ## Creating a user 482 | 483 | - Start by logining in as **`root`**. Do `ln -svf /run/systemd/resolve/resolv.conf /etc/resolv.conf`. 484 | 485 | ```sh 486 | ln -svf /run/systemd/resolve/resolv.conf /etc/resolv.conf 487 | ``` 488 | 489 | ```sh 490 | sudo pacman -S zsh 491 | ``` 492 | 493 | - Change **`root`**'s shell by doing `chsh -s /bin/zsh`. 494 | - Do `timedatectl set-ntp true` and `timedatectl status` again to make sure the time is setup correctly. The RTC and Universal time should be in UTC and the Local time in your timezone. 495 | 496 | --- 497 | 498 | - Now add a user by doing useradd -m -U -G wheel -s /bin/zsh -c "**REAL NAME**" **USERNAME**, **REAL NAME** being the user's real name, and **USERNAME** a valid username. 499 | Example: 500 | ```sh 501 | useradd -m -U -G wheel -s /bin/zsh -c "Sumith Emmadi" sumithemmadi 502 | ``` 503 | - Usernames in Unix-like OSs are valid if they're compatible with the regex expression `^[a-z_]([0-9a-z_-]{0,31}|[0-9a-z_-]{0,30}\$)$`. 504 | 505 | - You can check if a username is valid by clicking [here](https://regexr.com/4f7er). 506 | 507 | - Set the user's password with passwd **USERNAME**. 508 | Example: 509 | 510 | ```sh 511 | passwd sumithemmadi 512 | ``` 513 | 514 | - Finally, you'll have to enable sudo privilege for this new user. To do so, open the `/etc/sudoers` file using nano. Once open, locate the following line and uncomment it: 515 | 516 | ```txt 517 | # %wheel ALL=(ALL:ALL) ALL 518 | ``` 519 | 520 | - Add the line `Defaults pwfeedback`, preferably before `## Runas alias specification` in same file, if you want asterisks when inputting your password. 521 | 522 | - This file essentially means that all users in the wheel group can use sudo by providing their password. Save the file by hitting Ctrl + S and exit nano by hitting Ctrl + X. Now the new user will be able to use sudo when necessary. 523 | 524 | --- 525 | 526 | - Do `nmtui` and setup your Internet connection. 527 | - Open the file `/etc/pacman.conf` and perform the following: 528 | 529 | - Uncomment the line `#ParallelDownloads = 5`. 530 | - Uncomment the line `#[multilib]` and the line below it. 531 | 532 | - Do `pacman -Syu` to update `pacman`'s configuration and to perform any updates available. 533 | - Reboot by doing `shutdown -r now`. 534 | 535 | --- 536 | --- 537 | --- 538 | 539 | ## User configuration 540 | 541 | - Login as the user you've created. In the ZSH configuration, continue to configure zsh or press *q* to quit if you already have a configuration in your dotfiles. 542 | 543 | ```sh 544 | sudo pacman -S bat lm_sensors neofetch 545 | ``` 546 | 547 | --- 548 | 549 | ### Additional Tools 550 | 551 | #### Install Paru AUR helper in Arch Linux, EndeavourOS, Manjaro Linux 552 | 553 | Installing Paru in Arch Linux is easy! 554 | 555 | - First, install git and base-devel package group that includes tools needed for building (compiling and linking) packages from source. 556 | 557 | ```sh 558 | sudo pacman -S --needed git base-devel 559 | ``` 560 | 561 | - Git clone Paru repository using command: 562 | 563 | ```bash 564 | git clone https://aur.archlinux.org/paru-bin.git 565 | ``` 566 | 567 | > This command will download the contents of the Paru GitHub repository in a local directory named paru-bin. 568 | 569 | - Change into the paru directory: 570 | 571 | ```bash 572 | cd paru-bin 573 | ``` 574 | 575 | - Finally, build and install Paru AUR helper in Arch Linux using the following command: 576 | 577 | ```bash 578 | makepkg -sri 579 | ``` 580 | 581 | - After the installation is done, do `cd ..`, and then `rm -rf paru-bin`. 582 | 583 | - Now you can use `paru` for install packages from [AUR](https://aur.archlinux.org/paru.git) 584 | 585 | - From now on we'll be using `paru` instead of `sudo pacman`. 586 | 587 | ```sh 588 | paru -S xdg-user-dirs pacman-cleanup-hook 589 | ``` 590 | 591 | #### oh-my-zsh 592 | 593 | 1. Setup zsh with [oh-my-zsh](https://github.com/robbyrussell/oh-my-zsh) framework. 594 | 595 | ```bash 596 | paru -S oh-my-zsh-git oh-my-zsh-plugin-syntax-highlighting oh-my-zsh-plugin-autosuggestions 597 | ``` 598 | 599 | ## Extras 600 | 601 | ### Set-up TTF Fonts 602 | 603 | Follow [this tutorial](https://gist.github.com/cryzed/e002e7057435f02cc7894b9e748c5671) 604 | 605 | ### Bluetooth Headphone 606 | 607 | To connect the headphone: 608 | 609 | 1. Install required packages: 610 | 611 | ```sh 612 | sudo pacman -S pulseaudio pulseaudio-bluetooth pavucontrol bluez-utils 613 | ``` 614 | 615 | 1. Edit `/etc/pulse/system.pa` and add: 616 | 617 | ```sh 618 | load-module module-bluez5-device 619 | load-module module-bluez5-discover 620 | 621 | 1. Connect to bluetooth device 622 | 623 | ```sh 624 | $ bluetoothctl 625 | # power on 626 | # agent on 627 | # default-agent 628 | # scan on 629 | # pair HEADPHONE_MAC 630 | # trust HEADPHONE_MAC 631 | # connect HEADPHONE_MAC 632 | # quit 633 | ``` 634 | 635 | To auto switch to A2DP mode: 636 | 637 | 1. Edit `/etc/pulse/default.pa` and add: 638 | 639 | ```sh 640 | .ifexists module-bluetooth-discover.so 641 | load-module module-bluetooth-discover 642 | load-module module-switch-on-connect # Add this line 643 | .endif 644 | ``` 645 | 646 | 1. Modify (or create) `/etc/bluetooth/audio.conf` to auto select AD2P profile: 647 | 648 | ```sh 649 | [General] 650 | Disable=Headset 651 | ``` 652 | 653 | 1. Reboot PC to apply changes `reboot` . 654 | 655 | --- 656 | 657 | ### Congratulations! You finally have Arch Linux installed, and it's actually usable now. 658 | 659 | --- 660 | 661 | ## How to install Openbox Window Manager 662 | 663 | Installing Openbox 664 | 665 | - To have audio, do `paru pipewire` and select the following packages: 666 | 667 | - `extra/pipewire` 668 | - `extra/pipewire-alsa` 669 | - `extra/pipewire-jack` 670 | - `extra/pipewire-pulse` 671 | - `extra/wireplumber` 672 | - `multilib/lib32-pipewire` 673 | - `multilib/lib32-pipewire-jack` 674 | 675 | or 676 | ```bash 677 | paru -S \ 678 | extra/pipewire \ 679 | extra/pipewire-alsa \ 680 | extra/pipewire-jack \ 681 | extra/pipewire-pulse \ 682 | extra/wireplumber \ 683 | multilib/lib32-pipewire \ 684 | multilib/lib32-pipewire-jack 685 | ``` 686 | 687 | - For fonts, run below command 688 | 689 | ``` 690 | paru -S noto-fonts{,-{cjk,emoji,extra}} ttf-fira-code 691 | ``` 692 | 693 | - To install Rust (which we'll need to compile packages from the AUR): 694 | - Do `paru -S rustup`. 695 | - Do `rustup default stable`. 696 | 697 | - I use a simple TUI greeter. To install it, do `paru -S greetd{,-tuigreet}`. 698 | - For the provider of `greetd`, simply select `greetd`. 699 | 700 | - Edit `/etc/greetd/config.toml`: 701 | - Change the `command` setting to `tuigreet -itrc 'systemd-cat -t xinit xinit -- :1'`. 702 | 703 | - Do `sudo systemctl enable greetd`. 704 | 705 | - For the base of the graphical environment, do `paru -S alacritty openbox xorg-{server,xinit}`. 706 | - Get the default configuration files by doing the following commands: 707 | - `cp /etc/X11/xinit/xinitrc ~/.xinitrc`. 708 | - `cp /etc/X11/xinit/xserverrc ~/.xserverrc`. 709 | - Edit `~/.xinitrc` and replace the last block of commands with `exec openbox-session`. Remove all last lines from `twm &` to last line. 710 | 711 | ![image](https://raw.githubusercontent.com/sumithemmadi/ArchLinux-Installation-Guide/main/images/draw.png) 712 | 713 | - replace the last block of commands with `exec openbox-session` 714 | 715 | ![image](https://raw.githubusercontent.com/sumithemmadi/ArchLinux-Installation-Guide/main/images/draw1.png) 716 | 717 | - Edit `~/.xserverrc` so that the contents of the file are the following: 718 | 719 | ```sh 720 | #!/bin/sh 721 | exec /usr/bin/X -nolisten tcp -nolisten local "$@" vt$XDG_VTNR 722 | ``` 723 | 724 | If you want to use **openbox** with the setup I use => [EasyOpenboxWM](https://github.com/sumithemmadi/EasyOpenboxWM.git). 725 | 726 | - Install required dependencies 727 | 728 | ```bash 729 | pacman -S xorg xorg-font-util xorg-xrdb xorg-xdm xorg-server xorg-xinit sxhkd \ 730 | xfce4-settings xfce4-terminal polybar ranger rofi startup-notification thunar \ 731 | openbox obconf xarchiver dbus desktop-file-utils elinks gtk2 gtk3 man flameshot \ 732 | zsh git vim nano curl wget jq xarchiver firefox imagemagick geany alacritty gedit \ 733 | bc bmon calc calcurse feh htop scrot mpc mpd mutt ncmpcpp neofetch openssl leafpad \ 734 | xmlstarlet xbitmaps ranger xcompmgr nitrogen brightnessctl alsa-utils imv maim mpv 735 | ``` 736 | 737 | - Clone this repository 738 | 739 | ```sh 740 | cd ~/ 741 | git clone https://github.com/sumithemmadi/EasyOpenboxWM.git 742 | cd EasyOpenboxWM 743 | ``` 744 | 745 | - Run below command to install open box config files. 746 | 747 | ```bash 748 | configs=($(ls -A $(pwd)/files)) 749 | for _config in "${configs[@]}"; do 750 | cp -rf $(pwd)/files/$_config $HOME; 751 | done 752 | ``` 753 | 754 | - And wait for some time untill installation is done. 755 | 756 | Start Openbox Window Manager: 757 | 758 | ```bash 759 | startx 760 | ``` 761 | 762 | - If not working, restart your PC and run again. 763 | > If it shows a black screen then press `CTRL + AL + F1` and with your username. 764 | 765 | 766 | ## Enabling Tap-to-click 767 | 768 | Follow these steps to enable tap-to-click in window manager. 769 | 770 | Follow these steps carefully, they require root privileges! ⚠️ 771 | 772 | Install this package. 773 | 774 | ```sh 775 | sudo pacman -S --needed xf86-input-libinput 776 | ``` 777 | 778 | Then Edit this file. 779 | 780 | ```sh 781 | sudo nano /etc/X11/xorg.conf.d/30-touchpad.conf 782 | ``` 783 | 784 | Paste this text into 30-touchpad.conf 785 | 786 | ```conf 787 | Section "InputClass" 788 | Identifier "touchpad" 789 | Driver "libinput" 790 | MatchIsTouchpad "on" 791 | Option "tapping" "on" 792 | Option "AccelProfile" "adaptive" 793 | Option "TappingButtonMap" "lrm" 794 | EndSection 795 | ``` 796 | 797 | 798 | Save the file (Ctrl + S) 799 | Quit the editor (Ctrl + X) 800 | 801 | Reboot 802 | 803 | Tap to click should now be enabled! 804 | 805 | ## Keybindings 806 | 807 | Here's some shortcut keys you want to use to speed up your work. For more, `Right click on desktop > Keybinds` 808 | 809 | |Keys|Action| ----- |Keys|Action| 810 | |--|--|--|--|--| 811 | | `W-1` | Go To Desktop 1 | |`S-W-1` | Send To Desktop 1 | 812 | | `W-2` | Go To Desktop 2 | |`S-W-2` | Send To Desktop 2 | 813 | | `W-3` | Go To Desktop 3 | |`S-W-3` | Send To Desktop 3 | 814 | | `W-4` | Go To Desktop 4 | |`S-W-4` | Send To Desktop 4 | 815 | | `W-5` | Go To Desktop 5 | |`S-W-5` | Send To Desktop 5 | 816 | |||||| 817 | | `W-S-Left` | Send To Prev Desktop | | `W-S-Right` | Send To Next Desktop | 818 | | `A-Tab` | Next Window (Current Workspace) | |`W-Tab` | Next Window (All Workspaces) | 819 | |||||| 820 | | `W-h` | Move to TopLeft | | `W-j` | Move to BottomLeft | 821 | | `W-k` | Move to TopRight | | `W-l` | Move to BottomRight | 822 | | `W-Left` | Move To Left Edge | | `W-Right` | Move To Right Edge | 823 | | `W-Up` | Maximized | | `W-Down` | Unmaximized | 824 | |||||| 825 | | `W-q/c` | Close Windows | | `A-r/m` | Toggle Resize/Move | 826 | | `W-Space` | Openbox Menu | | `W-p/A-F1` | App Launcher | 827 | | `W-d` | Toggle Desktop | | `W-v` | Set Tasks | 828 | |||||| 829 | | `W-f` | File Manager | | `W-e` | Text Editor | 830 | | `W-t/return` | Terminal | | `W-w` | Web Browser | 831 | | `W-x` | Exit Menu | | `W-m` | Music Menu | 832 | | `W-b` | Battery Menu | | `W-n` | Network Menu | 833 | | `C-A-v` | Vim | | `C-A-r` | Ranger | 834 | | `C-A-h` | Htop | | `C-A-n` | Nano | 835 | 836 | ## References 837 | 838 | - 839 | -------------------------------------------------------------------------------- /images/draw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sumithemmadi/ArchLinux-Installation-Guide/e6e19c80609db8d60f3b3ca83f728fdbc984cdca/images/draw.png -------------------------------------------------------------------------------- /images/draw1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sumithemmadi/ArchLinux-Installation-Guide/e6e19c80609db8d60f3b3ca83f728fdbc984cdca/images/draw1.png -------------------------------------------------------------------------------- /images/fileOHRD6BQC.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sumithemmadi/ArchLinux-Installation-Guide/e6e19c80609db8d60f3b3ca83f728fdbc984cdca/images/fileOHRD6BQC.jpg --------------------------------------------------------------------------------