A comprehensive instruction manual to install Arch Linux effort-lessly.
Easy AF. Highly Detailed. Throughly Tested.
60 min read • Shubham Gulati
https://shubhamgulati91.github.io/archify-effortlessly
KEY FEATURES • HOW TO USE • DOWNLOAD • CREDITS • RELATED • LICENSE
- Easy AF
- Includes remote installation instructions.
- Minimal Mistakes
- Copy-Paste instructions from manual to remote session.
- Automated
- Most commands are one-liner.
- Minimal manual intervention needed.
- Minimal Packages - Maximal Tunings
- GNOME DE.
- Fully customized ZSH.
- Power saving tunings.
To use this manual, you'll need Git Bash and two computers. This manual is optimized especially for following hardware.
ASUS Zenbook Pro UX501VW
Intel® HM170 Chipset
Intel® Core™ i7-6700HQ Processor
16GB DDR4 2133 MHz SDRAM
15.6" 16:9 IPS UHD (3840 x 2160) Display
Intel HD 530 4GB VRAM
NVIDIA® GeForce® GTX 960M with 4GB GDDR5 VRAM
512GB Samsung PCIE x4 m.2 SSD
https://www.archlinux.org/download/
Save script to a sh file and execute.
./create-bootable-drive.sh
./create-bootable-drive.sh -i -a write -f arch -d sda
Restore default config from BIOS menu.
Disable Secure Boot.
Save settings and reboot.
If UEFI mode is enabled on an UEFI motherboard, Archiso will boot Arch Linux accordingly via systemd-boot. To verify this, use the command:
efivar -l
Alternatively, you can list the efivars directory with:
ls /sys/firmware/efi/efivars
If the directory does not exist, the system may be booted in BIOS or CSM mode. Refer to your motherboard's manual for details.
To connect to a network, using wireless network interface, use the command:
wifi-menu -o
The installation image automatically enables the dhcpcd daemon on boot for wired network devices.
Now let’s ping Google to see if we are connected:
ping -c 3 google.com
If you can see the ping, it’s time to proceed.
You can launch an SSH server and continue your installation remotely from another computer. In order to do that:
Set a root password using:
passwd
Now check that "PermitRootLogin yes" is present (and uncommented) in:
/etc/ssh/sshd_config
This setting allows root login with password authentication on the SSH server.
Now, start the openssh daemon using:
systemctl start sshd.service
Figure out your IP using:
ip a
Use bash shell to SSH to your installation disk from another computer and continue the installation as usual.
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null root@192.168.0.xxx
For convenience, localectl can be used to set console keymap. It will change the KEYMAP variable in /etc/vconsole.conf and also set the keymap for current session:
localectl --no-convert set-keymap us
echo
localectl status
The "--no-convert" option can be used to prevent "localectl" from automatically changing the Xorg keymap to the nearest match.
Use systemd-timesyncd to ensure that your system clock is accurate. To start it:
timedatectl set-ntp true
When recognized by the live system, disks are assigned to a block device such as /dev/sda or /dev/nvme0n1. To identify these devices, use lsblk. Results ending in rom, loop or airoot may be ignored.
To identify the attached storage devices:
lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 462.5M 1 loop /run/archiso/sfs/airootfs
sda 8:0 1 14.8G 0 disk
├─sda1 8:1 1 573M 0 part /run/archiso/bootmnt
└─sda2 8:2 1 64M 0 part
nvme0n1 259:0 0 477G 0 disk
├─[...]
Suggested UEFI GPT Scheme:
Number Start End Size File system Name Flags
1 0.00GiB 1.00GiB 1.00GiB fat32 BOOT boot, esp
2 1.00GiB 81.0GiB 80.0GiB ext4 ROOT
3 81.0GiB 105GiB 24.0GiB linux-swap(v1) SWAP
4 105GiB 477GiB 372GiB ext4 HOME
As soon as you know the alias of your hard drive, use "GNUParted" partitioning tool to create new partitions:
wipefs -af /dev/nvme0n1
parted --script -a optimal /dev/nvme0n1 \
mklabel gpt \
mkpart primary fat32 1MiB 1025MiB \
set 1 boot on \
name 1 BOOT \
mkpart primary ext4 1025MiB 81GiB \
name 2 ROOT \
mkpart primary linux-swap 81GiB 105GiB \
name 3 SWAP \
unit GiB \
mkpart primary ext4 105GiB 100% \
name 4 HOME
echo
parted /dev/nvme0n1 'unit GiB print'
gdisk -l /dev/nvme0n1
echo
mkfs.ext4 -F -L ROOT /dev/nvme0n1p2
mount -t ext4 /dev/nvme0n1p2 /mnt
mkfs.vfat -F32 -n BOOT /dev/nvme0n1p1
mkdir -p /mnt/boot
mount -t vfat /dev/nvme0n1p1 /mnt/boot
mkswap -L SWAP /dev/nvme0n1p3
swapon /dev/nvme0n1p3
mkfs.ext4 -F -L HOME /dev/nvme0n1p4
mkdir -p /mnt/home
mount -t ext4 /dev/nvme0n1p4 /mnt/home
lsblk /dev/nvme0n1
echo
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
nvme0n1 259:0 0 477G 0 disk
├─nvme0n1p1 259:1 0 1G 0 part /mnt/boot
├─nvme0n1p2 259:2 0 80G 0 part /mnt
├─nvme0n1p3 259:3 0 24G 0 part [SWAP]
└─nvme0n1p4 259:4 0 372G 0 part /mnt/home
Packages to be installed must be downloaded from mirror servers, which are defined in /etc/pacman.d/mirrorlist. On the live system, all mirrors are enabled, and sorted by their synchronization status and speed at the time the installation image was created. The higher a mirror is placed in the list, the more priority it is given when downloading a package. You may want to edit the file accordingly, and move the geographically closest mirrors to the top of the list, although other criteria should be taken into account. This file will later be copied to the new system by pacstrap, so it is worth getting right.
To download data from the fastest mirrors:
To install Reflector:
pacman -Sy --noconfirm reflector rsync curl
cp -v /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup
reflector --country India --verbose --latest 5 --sort rate --save /etc/pacman.d/mirrorlist
chmod +r /etc/pacman.d/mirrorlist
The following command installs all packages contained in the "base" and "base-devel" package-group of the Arch Linux installer.
pacstrap /mnt base base-devel linux linux-firmware intel-ucode nano zsh bash-completion reflector pacman-contrib
Fstab is a system configuration file and is used to tell the Linux kernel which partitions (file systems) to mount and where on the file system tree.
Now generate a new fstab file with:
rm /mnt/etc/fstab && genfstab -U -p /mnt >> /mnt/etc/fstab
Now we are going to enter the installed system without rebooting and start a terminal session from there. Use the command:
arch-chroot /mnt /bin/bash
We need to set the locale for the freshly installed system.
sudo sed -i '/^#en_US.UTF-8 UTF-8/s/^#//' /etc/locale.gen
locale-gen
echo LANG=en_US.UTF-8 > /etc/locale.conf
export LANG=en_US.UTF-8
Link the preferred time zone to your localtime. For example, I get the list of zones with 'tzselect' and choose Asia/Kolkata.
timedatectl set-timezone Asia/Kolkata
Configure systemd-timesyncd:
sed -i -e 's/^#NTP=.*/NTP=0.arch.pool.ntp.org 1.arch.pool.ntp.org 2.arch.pool.ntp.org 3.arch.pool.ntp.org/' /etc/systemd/timesyncd.conf
sed -i -e 's/^#FallbackNTP=.*/FallbackNTP=0.pool.ntp.org 1.pool.ntp.org 0.fr.pool.ntp.org/' /etc/systemd/timesyncd.conf
Enable the service:
systemctl enable systemd-timesyncd.service
It is recommended to adjust the time skew, and set the time standard to UTC:
hwclock --systohc --utc
Create the hostname file "/etc/hostname":
echo zenbook-pro > /etc/hostname
Configure hosts:
echo "" >> /etc/hosts
echo '127.0.0.1 zenbook-pro.localdomain localhost zenbook-pro' >> /etc/hosts
echo '::1 zenbook-pro.localdomain localhost zenbook-pro' >> /etc/hosts
echo '127.0.1.1 zenbook-pro.localdomain localhost zenbook-pro' >> /etc/hosts
If you are running a 64-bit system then you need to enable the multilib repository as follows:
sed -i '/^#\[multilib\]/s/^#//' /etc/pacman.conf
sed -i "$(( `grep -n "^\[multilib\]" /etc/pacman.conf | cut -f1 -d:` + 1 ))s/^#//" /etc/pacman.conf
And update the system.
pacman -Syyu
Set the root password with:
passwd
Create a new user, and add the user to "users", and "wheel" group. Use the command:
useradd -m -g users -G wheel,lp,rfkill,sys,storage,power,audio,disk,input,kvm,video,scanner -s /bin/zsh shubham -c "Shubham Gulati"
Set password for the new user:
passwd shubham
To run commands as sudo, you need to provide the user privilage specification in "/etc/sudoers".
Allow all permissions to users in wheel group with:
sed -i '/^# %wheel ALL=(ALL) ALL/s/^# //' /etc/sudoers
echo "" >> /etc/sudoers
echo 'Defaults !requiretty, !tty_tickets, !umask' >> /etc/sudoers
echo 'Defaults visiblepw, path_info, insults, lecture=always' >> /etc/sudoers
echo 'Defaults loglinelen=0, logfile =/var/log/sudo.log, log_year, log_host, syslog=auth' >> /etc/sudoers
echo 'Defaults passwd_tries=3, passwd_timeout=1' >> /etc/sudoers
echo 'Defaults env_reset, always_set_home, set_home, set_logname' >> /etc/sudoers
echo 'Defaults !env_editor, editor="/usr/bin/vim:/usr/bin/vi:/usr/bin/nano"' >> /etc/sudoers
echo 'Defaults timestamp_timeout=15' >> /etc/sudoers
echo 'Defaults passprompt="[sudo] password for %u: "' >> /etc/sudoers
echo 'Defaults lecture=never' >> /etc/sudoers
If you have an Intel CPU, install the "intel-ucode" package, and enable microcode updates to avoid freezes.
pacman -S --noconfirm intel-ucode
To enable microcode updates for "systemd-boot" boot loader, just add a "initrd /intel-ucode.img" as first initrd entry in boot entry config file after installing boot loader.
NOTE: The installation drive is assumed to be GPT-partioned, and have the EFI System Partition (parted type ESP, formatted with FAT32) mounted at /boot.
To install the bootloader:
bootctl --path=/boot install
Now we will create the Arch Linux boot entry:
nano /boot/loader/entries/arch.conf
[ADVANCED POWER SAVINGS] Enter the following configuration to the "arch.conf" file.
title Arch Linux
linux /vmlinuz-linux
initrd /intel-ucode.img
initrd /initramfs-linux.img
options root=/dev/nvme0n1p2 rw resume=/dev/nvme0n1p3 i915.enable_guc=3 i915.enable_psr=2 i915.enable_fbc=1 i915.enable_dc=2 drm.vblankoffdelay=1 i915.enable_rc6=1 i915.lvds_downclock=1 i915.semaphores=1 acpi_osi=! acpi_osi="Windows 2015" acpi_backlight=native pcie_aspm=force pcie_aspm.policy=powersupersave nmi_watchdog=0 elevator=noop splash quiet loglevel=3 rd.systemd.show_status=false rd.udev.log-priority=3
Now configure boot loader to boot using the above configuration:
nano /boot/loader/loader.conf
Clear anything that is written in the file and enter the following:
timeout 0
editor yes
console-mode keep
auto-entries 1
auto-firmware 1
default arch
[ALTERNATE LEGACY CONFIG] Enter the following configuration to the "arch.conf" file.
title Arch Linux
linux /vmlinuz-linux
initrd /intel-ucode.img
initrd /initramfs-linux.img
options root=/dev/nvme0n1p2 rw resume=/dev/nvme0n1p3 i915.preliminary_hw_support=1 intel_idle.max_cstate=1 i915.enable_execlists=0 acpi_osi= acpi_backlight=native elevator=noop splash quiet vga=current loglevel=3 rd.systemd.show_status=false rd.udev.log-priority=3 nmi_watchdog=0
https://wiki.archlinux.org/index.php/Xorg
Xorg is the public, open-source implementation of the X window system version 11.
pacman -S --noconfirm xorg-server xorg-xbacklight xbindkeys xorg-xev xorg-xinit xorg-xinput xorg-twm xorg-xclock xterm xdotool
https://wiki.archlinux.org/index.php/Wayland
Wayland is a protocol for a compositing window manager to talk to its clients, as well as a library implementing the protocol.
pacman -S --noconfirm weston xorg-server-xwayland
Install GNOME Desktop environment with:
pacman -S --noconfirm gnome gnome-extra gnome-software gnome-initial-setup gnome-menus deja-dup gedit-plugins gpaste gnome-tweak-tool gnome-power-manager gnome-themes-standard fprintd nautilus-share
Enable GDM:
systemctl enable gdm.service
https://wiki.archlinux.org/index.php/Networkmanager
NetworkManager is a program for providing detection and configuration for systems to automatically connect to network. NetworkManager's functionality can be useful for both wireless and wired networks.
pacman -S --noconfirm dnsmasq networkmanager-openconnect networkmanager-openvpn networkmanager-pptp networkmanager-vpnc network-manager-applet nm-connection-editor gnome-keyring
systemctl disable dhcpcd.service
systemctl enable NetworkManager.service
We are now finally ready to boot in to the glory that Arch Linux is. But before rebooting, install Web Browser to get access to the installation manual out of the box:
sudo pacman -S --noconfirm chromium firefox
Exit from the chroot environment:
exit
Partitions will be unmounted automatically by systemd on shutdown. You may however unmount manually as a safety measure:
umount -R /mnt/boot /mnt/home /mnt
swapoff -a
Shut down and reboot the system:
systemctl reboot
Remove the installation media.
If something goes wrong at this point, use the installation media to remount partitions and chroot into the installed system.
wifi-menu -o
passwd
systemctl start sshd.service
ip a
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null root@192.168.0.xxx
mount -t ext4 /dev/nvme0n1p2 /mnt
mount -t vfat /dev/nvme0n1p1 /mnt/boot
mount -t ext4 /dev/nvme0n1p4 /mnt/home
lsblk /dev/nvme0n1
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
nvme0n1 259:0 0 477G 0 disk
├─nvme0n1p1 259:1 0 1G 0 part /mnt/boot
├─nvme0n1p2 259:2 0 80G 0 part /mnt
├─nvme0n1p3 259:3 0 24G 0 part [SWAP]
└─nvme0n1p4 259:4 0 372G 0 part /mnt/home
arch-chroot /mnt /bin/bash
You can log into your new installation as root or with newly created user, using the password you specified with passwd.
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null shubham@192.168.0.xxx
cp -fv /etc/X11/xinit/xinitrc /home/shubham/.xinitrc
sed -i '/^twm.*/s/^/# /' /home/shubham/.xinitrc
sed -i '/^xclock.*/s/^/# /' /home/shubham/.xinitrc
sed -i '/^xterm.*/s/^/# /' /home/shubham/.xinitrc
sed -i '/^exec.*/s/^/# /' /home/shubham/.xinitrc
echo -e "" >> /home/shubham/.xinitrc
echo -e "exec gnome-session" >> /home/shubham/.xinitrc
sudo chmod +x ~/.xinitrc
https://wiki.archlinux.org/index.php/Zsh
Zsh is a powerful shell that operates as both an interactive shell and as a scripting language interpreter.
sudo pacman -S --noconfirm zsh git
Install oh-my-zsh:
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
Inject pre-configured dotfiles:
sudo pacman -S --noconfirm git colordiff
mkdir -p /tmp && cd /tmp
git clone https://github.com/helmuthdu/dotfiles
cp -v dotfiles/.bashrc dotfiles/.dircolors dotfiles/.dircolors_256 /home/shubham/
rm -rf dotfiles && cd ~
sudo pacman -S --noconfirm git
git config --global user.name "Shubham Gulati" && git config --global user.email "john.doe@example.com"
git config --global credential.helper cache store
https://wiki.archlinux.org/index.php/Ssh
Secure Shell (SSH) is a network protocol that allows data to be exchanged over a secure channel between two computers.
OpenSSH is already installed and enabled at this point. Configure sshd:
sudo sed -i '/Port 22/s/^#//' /etc/ssh/sshd_config
sudo sed -i '/Protocol 2/s/^#//' /etc/ssh/sshd_config
sudo sed -i '/HostKey \/etc\/ssh\/ssh_host_rsa_key/s/^#//' /etc/ssh/sshd_config
sudo sed -i '/HostKey \/etc\/ssh\/ssh_host_dsa_key/s/^#//' /etc/ssh/sshd_config
sudo sed -i '/HostKey \/etc\/ssh\/ssh_host_ecdsa_key/s/^#//' /etc/ssh/sshd_config
sudo sed -i '/KeyRegenerationInterval/s/^#//' /etc/ssh/sshd_config
sudo sed -i '/ServerKeyBits/s/^#//' /etc/ssh/sshd_config
sudo sed -i '/SyslogFacility/s/^#//' /etc/ssh/sshd_config
sudo sed -i '/LogLevel/s/^#//' /etc/ssh/sshd_config
sudo sed -i '/LoginGraceTime/s/^#//' /etc/ssh/sshd_config
sudo sed -i '/PermitRootLogin/s/^#//' /etc/ssh/sshd_config
sudo sed -i '/HostbasedAuthentication no/s/^#//' /etc/ssh/sshd_config
sudo sed -i '/StrictModes/s/^#//' /etc/ssh/sshd_config
sudo sed -i '/RSAAuthentication/s/^#//' /etc/ssh/sshd_config
sudo sed -i '/PubkeyAuthentication/s/^#//' /etc/ssh/sshd_config
sudo sed -i '/IgnoreRhosts/s/^#//' /etc/ssh/sshd_config
sudo sed -i '/PermitEmptyPasswords/s/^#//' /etc/ssh/sshd_config
sudo sed -i '/AllowTcpForwarding/s/^#//' /etc/ssh/sshd_config
sudo sed -i '/AllowTcpForwarding no/d' /etc/ssh/sshd_config
sudo sed -i '/X11Forwarding/s/^#//' /etc/ssh/sshd_config
sudo sed -i '/X11Forwarding/s/no/yes/' /etc/ssh/sshd_config
sudo sed -i -e '/\tX11Forwarding yes/d' /etc/ssh/sshd_config
sudo sed -i '/X11DisplayOffset/s/^#//' /etc/ssh/sshd_config
sudo sed -i '/X11UseLocalhost/s/^#//' /etc/ssh/sshd_config
sudo sed -i '/PrintMotd/s/^#//' /etc/ssh/sshd_config
sudo sed -i '/PrintMotd/s/yes/no/' /etc/ssh/sshd_config
sudo sed -i '/PrintLastLog/s/^#//' /etc/ssh/sshd_config
sudo sed -i '/TCPKeepAlive/s/^#//' /etc/ssh/sshd_config
sudo sed -i '/the setting of/s/^/#/' /etc/ssh/sshd_config
sudo sed -i '/RhostsRSAAuthentication and HostbasedAuthentication/s/^/#/' /etc/ssh/sshd_config
Install an AUR helper, YAY, to start using Arch User Repository.
Create a temporary working directory and navigate to it:
sudo pacman -S --noconfirm git
mkdir -p /tmp/yay_install
cd /tmp/yay_install
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si --noconfirm
cd ~
rm -rf /tmp/yay_install
https://wiki.archlinux.org/index.php/Bash
sudo pacman -S --noconfirm bc rsync mlocate bash-completion pkgstats
https://wiki.archlinux.org/index.php/P7zip
sudo pacman -S --noconfirm zip unzip unrar p7zip lzop cpio zziplib
https://wiki.archlinux.org/index.php/Avahi
Avahi is a free Zero Configuration Networking (Zeroconf) implementation, including a system for multicast DNS/DNS-SD discovery. It allows programs to publish and discovers services and hosts running on a local network with no specific configuration.
sudo pacman -S --noconfirm avahi nss-mdns
sudo systemctl enable avahi-daemon.service
https://wiki.archlinux.org/index.php/Alsa
The Advanced Linux Sound Architecture (ALSA) is a Linux kernel component intended to replace the original Open Sound System (OSSv3) for providing device drivers for sound cards.
sudo pacman -S --noconfirm alsa-utils alsa-plugins
https://wiki.archlinux.org/index.php/Pulseaudio
PulseAudio is the default sound server that serves as a proxy to sound applications using existing kernel sound components like ALSA or OSS
sudo pacman -S --noconfirm pulseaudio pulseaudio-alsa
https://wiki.archlinux.org/index.php/File_Systems
A file system (or filesystem) is a means to organize data expected to be retained after a program terminates by providing procedures to store, retrieve and update data, as well as manage the available space on the device(s) which contain it. A file system organizes data in an efficient manner and is tuned to the specific characteristics of the device.
sudo pacman -S --noconfirm ntfs-3g dosfstools exfat-utils f2fs-tools fuse fuse-exfat autofs mtpfs
https://wiki.archlinux.org/index.php/Systemd-timesyncd
A file system (or filesystem) is a means to organize data expected to be retained after a program terminates by providing procedures to store, retrieve and update data, as well as manage the available space on the device(s) which contain it. A file system organizes data in an efficient manner and is tuned to the specific characteristics of the device.
sudo timedatectl set-ntp true
sudo pacman -S --noconfirm xf86-input-libinput mousetweaks
For touchpad tap-to-click use:
https://wiki.archlinux.org/index.php/Libinput#Common_options
https://wiki.archlinux.org/index.php/Font_Configuration
Fontconfig is a library designed to provide a list of available fonts to applications, and also for configuration for how fonts get rendered.
sudo pacman -S --noconfirm --asdeps --needed cairo fontconfig freetype2
If you do not know what graphics card you have, find out by issuing:
lspci -k | grep -A 2 -E "(VGA|3D)"
For the system I'm using to generate this guide, I use NVIDIA driver. You can use the output from the above command to determine what driver you need.
sudo pacman -S --needed xf86-video-intel bumblebee nvidia nvidia-settings lib32-virtualgl lib32-nvidia-utils mesa lib32-mesa-libgl lib32-mesa-demos mesa-demos libva-vdpau-driver nvidia-libgl lib32-opencl-nvidia lib32-mesa-vdpau
Add username to bumblebee group:
sudo gpasswd -a shubham bumblebee
Enable bumblebee service:
sudo systemctl enable bumblebeed.service
sudo pacman -S xf86-video-nonveau mesa libva-vdpau-driver lib32-mesa lib32-libva-vdpau-driver
sudo pacman -S nvidia nvidia-libgl lib32-nvidia-libgl
Open Source GPU Drivers:
sudo pacman -S xf86-video-intel mesa libva-intel-driver lib32-mesa lib32-libva-intel-driver
Open Source GPU Drivers:
sudo pacman -S xf86-video-ati mesa libva-vdpau-driver lib32-mesa lib32-libva-vdpau-driver
Proprietary GPU Drivers (available only on AUR at the time of writing):
sudo yay -S catalyst catalyst-libgl lib32-catalyst-libgl
yay -S --noconfirm wd719x-firmware aic94xx-firmware
sudo mkinitcpio -p linux
Connect to wired or wireless network
Install Web Browser:
sudo pacman -S --noconfirm chromium firefox
Configure basic system preferences such as privacy and power settings.
Home folder
Super+E
Hide All Normal Windows
Super+D
Terminal
gnome-terminal
Super+T
Terminal
gnome-terminal
Ctrl+Alt+T
Install better system fonts:
sudo pacman -S --noconfirm ttf-ubuntu-font-family noto-fonts ttf-liberation adobe-source-code-pro-fonts ttf-dejavu opendesktop-fonts
Install Shell & Icon Themes
yay -S --noconfirm mojave-gtk-theme mojave-ct-icon-theme
sudo pacman -S --noconfirm arc-gtk-theme
Add font configuration to "~/.config/fontconfig/fonts.conf"
mkdir -p ~/.config/fontconfig/
nano ~/.config/fontconfig/fonts.conf
Add following code to fonts.conf
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<match target="font">
<edit mode="assign" name="rgba">
<const>rgb</const>
</edit>
</match>
<match target="font">
<edit mode="assign" name="hinting">
<bool>true</bool>
</edit>
</match>
<match target="font">
<edit mode="assign" name="hintstyle">
<const>hintslight</const>
</edit>
</match>
<match target="font">
<edit mode="assign" name="antialias">
<bool>true</bool>
</edit>
</match>
<match target="font">
<edit mode="assign" name="lcdfilter">
<const>lcddefault</const>
</edit>
</match>
</fontconfig>
In order to enable “Infinality mode” in plain vanilla freetype2:
sudo sed -i '/^#export FREETYPE_PROPERTIES=.*/s/^#//' /etc/profile.d/freetype2.sh
Then create the following symbolic links in /etc/fonts/conf.d if they aren’t already present:
cd /etc/fonts/conf.d
sudo rm ./10-hinting-slight.conf
sudo ln -s ../conf.avail/10-hinting-slight.conf
sudo ln -s ../conf.avail/10-sub-pixel-rgb.conf
sudo ln -s ../conf.avail/11-lcdfilter-default.conf
cd ~
Install the browser-shell connector:
sudo pacman -S --noconfirm chrome-gnome-shell
Use web browser and go to:
Choose "Allow and remember" when prompted for shell integration permission.
Install and enable User Themes extension.
Configure appreance from GNOME Tweak Tool:
Applications to Mojave-dark
Cursor to Adwaita (default)
Icons to Mojave-CT
Shell to Mojave-dark
Open Gnome Tweak Tool, goto fonts tab and change the following options:
Interface Text to Ubuntu Regular 10
Documents Text to Ubuntu Regular 10
Monospace Text to Ubuntu Mono Regular 10
Legacy Window Titles to Ubuntu Bold 10
Hinting to Slight
Antialiasing to Subpixel (rgba)
Sacling Factor to 1.00
Install and configure extensions:
Dynamic Top Bar - transparency level 0.30
Swap storage is slow. SSD writes are precious. So let us set the swappiness to "1" which technically almost disables your swap, but still makes it accessible for hibernation.
sudo /bin/sh -c 'echo "vm.swappiness=1" >> /etc/sysctl.d/99-sysctl.conf'
sudo sysctl vm.swappiness=1
http://arter97.blogspot.com/2018/08/saving-power-consumption-on-laptops.html?m=1
sudo nano /boot/loader/entries/arch.conf
Set kernel options to:
options root=/dev/nvme0n1p2 rw resume=/dev/nvme0n1p3 i915.enable_guc=3 i915.enable_psr=2 i915.enable_fbc=1 i915.enable_dc=2 drm.vblankoffdelay=1 i915.enable_rc6=1 i915.lvds_downclock=1 i915.semaphores=1 acpi_osi=! acpi_osi="Windows 2015" acpi_backlight=native pcie_aspm=force pcie_aspm.policy=powersupersave nmi_watchdog=0 elevator=noop splash quiet loglevel=3 rd.systemd.show_status=false rd.udev.log-priority=3
sudo pacman -Sy linux
sudo pacman -Sy intel-ucode linux-firmware
sudo nano /boot/loader/entries/arch.conf
Add kernel options:
i915.enable_guc=3 i915.enable_psr=2 i915.enable_fbc=1 i915.enable_dc=2 i915.enable_rc6=1 i915.lvds_downclock=1 i915.semaphores=1
Or, alternatively:
sudo /bin/sh -c 'echo "options i915 enable_guc=3 enable_psr=2 enable_fbc=1 enable_dc=2" >> /etc/modprobe.d/i915.conf'
sudo systemctl reboot
Verify:
dmesg | grep GuC
dmesg | grep HuC
dmesg | grep psr
[drm] HuC: Loaded firmware i915/kbl_huc_ver02_00_1810.bin (version 2.0)
[drm] GuC: Loaded firmware i915/kbl_guc_ver9_39.bin (version 9.39)
i915 0000:00:02.0: GuC firmware version 9.39
i915 0000:00:02.0: GuC submission enabled
i915 0000:00:02.0: HuC enabled
Setting dangerous option enable_psr - tainting kernel
sudo nano /boot/loader/entries/arch.conf
Add kernel options:
drm.vblankoffdelay=1
sudo nano /boot/loader/entries/arch.conf
Add kernel options:
acpi_osi=! acpi_osi="Windows 2015" acpi_backlight=native
sudo nano /boot/loader/entries/arch.conf
Add kernel options:
pcie_aspm=force pcie_aspm.policy=powersupersave
https://wiki.archlinux.org/index.php/Tlp
TLP is an advanced power management tool for Linux. It is a pure command line tool with automated background tasks and does not contain a GUI.
sudo pacman -S --noconfirm tlp tlp-rdw ethtool smartmontools x86_energy_perf_policy
Modify TLP configuration:
sudo nano /etc/default/tlp
Enable TLP Service on boot
sudo systemctl enable tlp.service
sudo systemctl enable tlp-sleep.service
sudo systemctl enable NetworkManager-dispatcher.service
sudo systemctl mask systemd-rfkill.service
sudo systemctl mask systemd-rfkill.socket
Type 'lsusb' and 'lsusb -v' to see USB devices.
sudo lsusb -v
In my case, "ID 04f2:b3fd" is a webcam and "ID 8087:0a2b" is a Bluetooth adapter, which I know I won't be using.
sudo nano /etc/remove-unused-usb-devices.sh
#!/bin/bash
exec > /dev/kmsg 2>&1
sleep 3
find /sys -name idProduct | while read file; do
if cat $file | grep -q 'b3fd\|0a2b'; then
echo Removing $(dirname $file)
echo 1 > $(dirname $file)/remove
fi
done
sudo chmod 755 /etc/remove-unused-usb-devices.sh
The part you need to change is at "grep -q '562e|0a2b'". The syntax is simple, just append new devices followed by "|": grep -q '0000|1111|2222|3333|4444'
Now, for it to execute upon reboot, let's use crontab:
sudo pacman -S --noconfirm cronie
sudo crontab -e
@reboot /etc/remove-unused-usb-devices.sh
If you need to access those blacklisted USB devices, just remove the script and suspend/resume your laptop.
Now we need to execute the script upon resume. Let's write a systemd service for that:
sudo nano /lib/systemd/system/remove-unused-usb-devices-upon-resume.service
[Unit]
Description=Remove Unused USB Devices Upon Resume
Before=sleep.target
StopWhenUnneeded=yes
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStop=/etc/remove-unused-usb-devices.sh
[Install]
WantedBy=sleep.target
sudo systemctl enable --now remove-unused-usb-devices-upon-resume.service
You can validate whether it works by checking kernel log with dmesg:
[10838.133311] Removing /sys/devices/pci0000:00/0000:00:14.0/usb1/1-5
[10838.296408] usb 1-5: USB disconnect, device number 2
[10838.310044] Removing /sys/devices/pci0000:00/0000:00:14.0/usb1/1-6
[10838.454298] usb 1-6: USB disconnect, device number 3
sudo lspci | grep -v 00:
In my case, 01:00.0 is dGPU Card, 02:00.0 is a PCIe microSD reader, 03:00.0 is Wi-Fi Card, and 04:00.0 is a NVMe SSD.
Disabling PCIe peripherals is a more straight forward process. We can just disable loading of a device driver that is responsible for such device.
sudo lspci -v
'lspci -v' will print out which kernel modules are responsible for each devices.
sudo /bin/sh -c 'echo "# Disable Bluetooth" >> /etc/modprobe.d/50-disable-bluetooth.conf'
sudo /bin/sh -c 'echo "blacklist bluetooth" >> /etc/modprobe.d/50-disable-bluetooth.conf'
sudo /bin/sh -c 'echo "blacklist btusb" >> /etc/modprobe.d/50-disable-bluetooth.conf'
sudo /bin/sh -c 'echo "# Disable Webcam" >> /etc/modprobe.d/50-disable-webcam.conf'
sudo /bin/sh -c 'echo "blacklist uvcvideo" >> /etc/modprobe.d/50-disable-webcam.conf'
The first two lines disable bluetooth and the last disables the webcam.
sudo pacman -S --noconfirm dkms bbswitch
sudo /bin/sh -c 'echo "# Disable Alternate Driver" >> /etc/modprobe.d/50-disable-dGPU.conf'
sudo /bin/sh -c 'echo "blacklist nouveau" >> /etc/modprobe.d/50-disable-dGPU.conf'
sudo /bin/sh -c 'echo "# Disable Original Driver" >> /etc/modprobe.d/50-disable-dGPU.conf'
sudo /bin/sh -c 'echo "blacklist nvidia" >> /etc/modprobe.d/50-disable-dGPU.conf'
sudo /bin/sh -c 'echo "blacklist nvidia_drm" >> /etc/modprobe.d/50-disable-dGPU.conf'
sudo /bin/sh -c 'echo "options bbswitch load_state=0 unload_state=0" >> /etc/modprobe.d/bbswitch.conf'
sudo pacman -S --noconfirm powertop
Create a new systemd service:
sudo nano /etc/systemd/system/powertop.service
[Unit]
Description=PowerTOP Tunings
[Service]
ExecStart=/usr/bin/powertop --auto-tune
RemainAfterExit=true
[Install]
WantedBy=multi-user.target
Save and enable it with:
sudo systemctl enable --now powertop.service
See power statistics using powertop
sudo powertop
Confirm Idle Stats:
Package -> C8(pc8) - C10(pc10)
Core -> C7 (cc7)
GPU -> RC6
CPU [0-7] -> C8 - C10
sudo pacman -S --noconfirm lm_sensors hddtemp
sensors
sudo hddtemp /dev/nvme0n1
To verify TRIM support, run:
lsblk -D
And check the values of DISC-GRAN and DISC-MAX columns. Non-zero values indicate TRIM support.
The "util-linux" package provides "fstrim.service" and "fstrim.timer" systemd unit files. Enabling the timer will activate the service weekly. The service executes fstrim on all mounted filesystems on devices that support the discard operation.
Enable the periodic trim service with:
sudo systemctl enable --now fstrim.timer
https://wiki.archlinux.org/index.php/Bluetooth
Bluetooth is a standard for the short-range wireless interconnection of cellular phones, computers, and other electronic devices. In Linux, the canonical implementation of the Bluetooth protocol stack is BlueZ.
sudo pacman -S --noconfirm bluez bluez-utils bluez-libs pulseaudio-alsa pulseaudio-bluetooth
sudo systemctl enable --now bluetooth.service
Enable auto connection adding the following lines to:
sudo /bin/sh -c 'echo "" >> /etc/pulse/default.pa'
sudo /bin/sh -c 'echo "### Automatically switch to newly-connected devices" >> /etc/pulse/default.pa'
sudo /bin/sh -c 'echo "load-module module-switch-on-connect" >> /etc/pulse/default.pa'
By default, your Bluetooth adapter will not power on after a reboot. Now you just need to add the line AutoEnable=true in /etc/bluetooth/main.conf at the bottom in the Policy section:
sudo sed -i 's/^#AutoEnable=.*/AutoEnable=true/' /etc/bluetooth/main.conf
If PulseAudio fails when changing the profile to A2DP while using GNOME with GDM, you need to prevent GDM from starting its own instance of PulseAudio.
Prevent Pulseaudio clients from automatically starting a server if one isn't running by adding the following lines to:
sudo mkdir -p /var/lib/gdm/.config/pulse
sudo touch /var/lib/gdm/.config/pulse/client.conf
sudo /bin/sh -c 'echo "autospawn = no" >> /var/lib/gdm/.config/pulse/client.conf'
sudo /bin/sh -c 'echo "daemon-binary = /bin/true" >> /var/lib/gdm/.config/pulse/client.conf'
Prevent systemd from starting Pulseaudio anyway with socket activation:
sudo mkdir -p /var/lib/gdm/.config/systemd/user
sudo ln -s /dev/null /var/lib/gdm/.config/systemd/user/pulseaudio.socket
Restart, and check that there is no Pulseaudio process for the gdm user.
sudo pacman -Rnsc --noconfirm four-in-a-row five-or-more gnome-chess gnome-klotski gnome-mahjongg gnome-mines gnome-nibbles gnome-robots gnome-sudoku gnome-tetravex gnome-taquin swell-foop hitori iagno quadrapassel lightsoff tali
sudo /bin/sh 'echo "options snd-hda-intel model=dell-headset-multi" >> /etc/modprobe.d/alsa-base.conf'
Follow the guide to install Viper4Linux.
https://github.com/L3vi47h4N/Viper4Linux
To start Viper after login:
echo '' >> ~/.bash_profile
echo 'viper start &' >> ~/.bash_profile
https://wiki.archlinux.org/index.php/Cups
CUPS is the standards-based, open source printing system developed by Apple Inc. for Mac OS X and other UNIX-like operating systems.
sudo pacman -S --noconfirm cups cups-pdf gutenprint ghostscript gsfonts foomatic-db foomatic-db-engine foomatic-db-nonfree foomatic-db-ppds foomatic-db-nonfree-ppds foomatic-db-gutenprint-ppds libcups system-config-printer hplip
sudo systemctl enable --now org.cups.cupsd.service
https://wiki.archlinux.org/index.php/Nfs
NFS allowing a user on a client computer to access files over a network in a manner similar to how local storage is accessed.
sudo pacman -S --noconfirm nfs-utils
sudo systemctl enable rpcbind
sudo systemctl enable nfs-client.target
sudo systemctl enable remote-fs.target
https://wiki.archlinux.org/index.php/USB_3G_Modem
A number of mobile telephone networks around the world offer mobile internet connections over UMTS (or EDGE or GSM) using a portable USB modem device.
sudo pacman -S --noconfirm usbutils usb_modeswitch modemmanager
sudo systemctl enable ModemManager.service
Speed up application startup:
mkdir -p ~/.compose-cache
sudo systemctl enable --now accounts-daemon
sudo /bin/sh -c 'echo "fs.inotify.max_user_watches = 524288" >> /etc/sysctl.d/99-sysctl.conf'
Install and check output of acpi_listen:
sudo pacman -S --noconfirm acpid
sudo systemctl enable --now acpid.service
acpi_listen
xev -event keyboard
Temporary bug fix
sudo pacman -U https://archive.archlinux.org/packages/x/xkeyboard-config/xkeyboard-config-2.28-1-any.pkg.tar.xz
Create new keyboard symbols
mkdir -p $HOME/.xkb/symbols
sudo nano $HOME/.xkb/symbols/custom
partial alphanumeric_keys
xkb_symbols "fn" {
include "inet(evdev)"
key <I171> { [ End ] };
key <I172> { [ Next, Next ] };
key <I173> { [ Home ] };
key <I174> { [ Prior, Prior ] };
};
Backup existing keyboard map
mkdir -p $HOME/.xkb/keymap
setxkbmap -print > $HOME/.xkb/keymap/xkbbase
cp $HOME/.xkb/keymap/xkbbase $HOME/.xkb/keymap/xkbcustom
Add custom(fn) to xkb_symbols in the new xkbcustom keymap
xkb_keymap {
xkb_keycodes { include "evdev+aliases(qwerty)" };
xkb_types { include "complete" };
xkb_compat { include "complete" };
xkb_symbols { include "pc+us+inet(evdev)+custom(fn)" };
xkb_geometry { include "pc(pc105)" };
};
Create and enable systemd service to set keyboard map at start of X session
sudo nano /etc/systemd/system/xkbcomp.service
[Unit]
Description=Set xkbd map
After=xinitrc.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/xkbcomp -I$HOME/.xkb $HOME/.xkb/keymap/xkbcustom $DISPLAY
[Install]
WantedBy=xinitrc.target
Enable the service
sudo systemctl enable xkbcomp.service
nano ~/.xsession
if [ -d $HOME/.xkb/keymap ]; then
setxkbmap -print | \
sed -e '/xkb_symbols/s/"[[:space:]]/+custom(fn)&/' > $HOME/.xkb/keymap/xkbcustom
xkbcomp -w0 -I$HOME/.xkb -R$HOME/.xkb keymap/xkbcustom $DISPLAY
fi
sudo pacman -S --noconfirm pacman-contrib
sudo systemctl enable --now paccache.timer
To get started with Arch Linux you need to know how to use "Pacman" and "AUR".
pacman -Ss <package>
pacman -Si <package>
sudo pacman –S <package list>
pacman -Qi <package>
pacman -Qu
sudo pacman -Sy
sudo pacman -Syu
pacsysclean
These packages do not exist on arch repositories and should me removed.
pacman -Qm
Lists orphaned packages, ie. unrequired packages installed as dependency.
pacman -Qdt
sudo pacman –R <package list>
sudo pacman –Rns <package list>
sudo pacman –Rnsc <package list>
sudo pacman -Rdd <package list>
Learn more about Pacman on the wiki page at:
https://wiki.archlinux.org/index.php/pacman
Most functions are similar to pacman.
yay -S
yay -Syu --devel --needed
sudo pacman -S --noconfirm fortune-mod cowsay lolcat cmatrix
Have some fun with:
cowsay -l
fortune | cowsay
fortune | lolcat
cowsay $(fortune -o) | lolcat
cmatrix | lolcat
sudo pacman -S --noconfirm synapse terminator
sudo pacman -S --noconfirm catfish
Install LaTeX Environment:
sudo pacman -S --noconfirm texlive-core texlive-bin texlive-latexextra
Install LaTeX IDE
yay -S --noconfirm texworks
Add "ModernCV" class for Resume
curl -L -O http://mirrors.ctan.org/macros/latex/contrib/moderncv.zip
unzip moderncv.zip && rm moderncv.zip && cd moderncv
sudo mkdir -p /usr/local/share/texmf-dist/tex/latex/moderncv/
sudo cp *.sty *.cls -t /usr/local/share/texmf-dist/tex/latex/moderncv/ && cd .. && rm -rf moderncv
Rebuild latex package cache
sudo mktexlsr
Check if "ModernCV" class is correctly installed with:
kpsewhich moderncv.cls
https://wiki.archlinux.org/index.php/LibreOffice
sudo pacman -S --noconfirm libreoffice-fresh
Blocking every request incoming to your system is nice to keep everything safe. I recommend you to install the UFW firewall:
sudo pacman -S --noconfirm gufw
sudo ufw enable
sudo systemctl enable --now ufw
sudo ufw default deny
sudo ufw logging off
sudo ufw status
sudo pacman -S --noconfirm clamav
sudo systemctl enable --now clamav-daemon.service
sudo systemctl enable --now clamav-freshclam.service
sudo freshclam
yay -S --noconfirm hosts-update
sudo sed -i 's/^127.0.0.1.*/127.0.0.1 zenbook-pro.localdomain localhost zenbook-pro/' /etc/hosts.local
sudo sed -i 's/^::1.*/::1 zenbook-pro.localdomain localhost zenbook-pro/' /etc/hosts.local
sudo sed -i "$(( `grep -n "^::1" /etc/hosts | cut -f1 -d:` + 1 )) i\127.0.1.1 zenbook-pro.localdomain localhost zenbook-pro" /etc/hosts.local
sudo hosts-update
sudo pacman -S --noconfirm htop
sudo pacman -S --noconfirm netdata nload
sudo systemctl enable --now netdata.service
yay -S --noconfirm vmware-workstation12
sudo pacman -S --noconfirm docker
sudo gpasswd -a shubham docker
sudo pacman -S --noconfirm icoutils wine wine_gecko wine-mono winetricks
sudo pacman -S --noconfirm chromium
sudo pacman -S --noconfirm firefox
yay -S --noconfirm google-chrome tor-browser
sudo pacman -S --noconfirm transmission-gtk
sed -i -e 's/^"blocklist-enabled":.*/"blocklist-enabled": true/' /home/shubham/.config/transmission/settings.json
sed -i -e 's/^www\.example\.com\/blocklist/list\.iblocklist\.com\/\?list=bt_level1&fileformat=p2p&archiveformat=gz/' /home/shubham/.config/transmission/settings.json
sudo pacman -S --noconfirm evolution
sudo pacman -S --noconfirm thunderbird
sudo pacman -S --noconfirm telegram-desktop
yay -S --noconfirm skypeforlinux-stable-bin
sudo pacman -S --noconfirm remmina
yay -S --noconfirm teamviewer
sudo pacman -S --noconfirm shotwell gimp imagemagick gthumb
sudo pacman -S --noconfirm blender inkscape
sudo pacman -S --noconfirm mypaint
yay -S --noconfirm pencil
sudo pacman -S --noconfirm scribus
sudo pacman -S --noconfirm rhythmbox grilo grilo-plugins libgpod libdmapsharing gnome-python python-mako
yay -S --noconfirm spotify
sudo pacman -S --noconfirm gst-plugins-base gst-plugins-base-libs gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-libav
sudo pacman -S --noconfirm audacity easytag soundconverter
sudo pacman -S --noconfirm gstreamer flashplugin pepper-flash faac faad2 libdca libmad libmpeg2 x264 x265 libfdk-aac libquicktime
yay -S --noconfirm chromium-widevine
sudo pacman -S --noconfirm ffmpeg ffmpegthumbnailer ffmpegthumbs
sudo pacman -S --noconfirm vlc gnome-mplayer mplayer
yay -S --noconfirm --nedit popcorntime-ce
sudo pacman -S --noconfirm handbrake
sudo pacman -S --noconfirm btrfs-progs dosfstools e2fsprogs exfat-utils f2fs-tools gpart jfsutils mtools ntfs-3g reiserfsprogs xfsprogs
sudo pacman -S --noconfirm gparted screenfetch dconf-editor bleachbit hdparm dstat seahorse simplescreenrecorder dmenu elinks alacarte speedtest-cli simple-scan deja-dup
sudo pacman -S --noconfirm code
sudo pacman -S --noconfirm atom
sudo pacman -S --noconfirm geany
sudo pacman -S --noconfirm emacs
sudo pacman -Rns --noconfirm vim
sudo pacman -S --noconfirm gvim ctags
sudo pacman -S --noconfirm meld
yay -S --noconfirm sublime-text-dev
sudo pacman -Rnsc --noconfirm jdk
sudo pacman -S --noconfirm jdk8-openjdk
sudo pacman -Rnsc --noconfirm jdk
sudo pacman -S --noconfirm jdk10-openjdk
sudo pacman -Rnsc --noconfirm jdk7-openjdk jdk8-openjdk jdk9-openjdk jdk10-openjdk
yay -S --noconfirm jdk
Check the installation with:
sudo ls /usr/lib/jvm
List compatible Java environments installed
archlinux-java status
Change the default Java environment
sudo archlinux-java set java_environment_name
Unset the default Java environment
sudo archlinux-java unset
yay -S --noconfirm spring-tool-suite
sudo pacman -S --noconfirm netbeans
sudo pacman -S --noconfirm eclipse-jee
sudo pacman -S --noconfirm android-tools
yay -S --noconfirm android-sdk android-sdk-platform-tools android-sdk-build-tools android-platform
sudo gpasswd -a shubham sdkusers
sudo chown -R :sdkusers /opt/android-sdk/
sudo chmod -R g+w /opt/android-sdk/
sudo /bin/sh -c 'export ANDROID_HOME=/opt/android-sdk >> /home/shubham/.bashrc'
yay -S --noconfirm android-studio
yay -S --noconfirm jetbrains-toolbox
sudo pacman -S --noconfirm intellij-idea-community-edition
yay -S --noconfirm intellij-idea-ultimate-edition
sudo pacman -S --noconfirm monodevelop monodevelop-debugger-gdb
sudo pacman -S --noconfirm qtcreator
sudo pacman -S --noconfirm mysql-workbench
sudo pacman -S --noconfirm nodejs
yay -S --noconfirm visual-studio-code-bin
sudo pacman -S --noconfirm gitg qgit
yay -S --noconfirm kdiff3
yay -S --noconfirm regexxer
yay -S --noconfirm postman-bin
yay -S --noconfirm gitkraken
sudo pacman -S --noconfirm apache php php-apache php-mcrypt php-gd
Complete following steps:
INSTALL_MARIADB
INSTALL_ADMINER
SYSTEMCTL ENABLE HTTPD.SERVICE
CONFIGURE_PHP_APACHE
CONFIGURE_PHP "MARIADB"
CREATE_SITES_FOLDER
sudo pacman -S --noconfirm apache php php-apache php-pgsql php-gd
Complete following steps:
INSTALL_POSTGRESQL
INSTALL_ADMINER
sudo systemctl enable --now httpd.service
CONFIGURE_PHP_APACHE
CONFIGURE_PHP "POSTGRESQL"
CREATE_SITES_FOLDER
sudo pacman -S --noconfirm nginx php php-mcrypt php-fpm
Complete following steps:
INSTALL_MARIADB
sudo systemctl enable --now nginx.service
sudo systemctl enable --now php-fpm.service
CONFIGURE_PHP_NGINX
CONFIGURE_PHP "MARIADB"
sudo pacman -S --noconfirm nginx php php-fpm php-pgsql
Complete following steps:
INSTALL_POSTGRESQL
sudo systemctl enable --now nginx.service
sudo systemctl enable --now php-fpm.service
CONFIGURE_PHP_NGINX
CONFIGURE_PHP "POSTGRESQL"
yay -S --noconfirm adminer
Check config:
cat /etc/httpd/conf/httpd.conf | grep Adminer
If config, does not contain Adminer:
echo -e '\n# Adminer Configuration\nInclude conf/extra/httpd-adminer.conf' >> /etc/httpd/conf/httpd.conf
sudo pacman -S --noconfirm mariadb
sudo /usr/bin/mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
sudo systemctl enable --now mysqld.service
sudo /usr/bin/mysql_secure_installation
sudo pacman -S --noconfirm postgresql
sudo mkdir -p /var/lib/postgres
sudo chown -R postgres:postgres /var/lib/postgres
systemd-tmpfiles --create postgresql.conf
sudo passwd postgres
su - postgres -c "initdb --locale ${LOCALE}.UTF-8 -D /var/lib/postgres/data"
sudo systemctl enable --now postgresql.service
sudo pacman -S --noconfirm postgis
yay -S --noconfirm pgrouting
If new file exists:
-f /etc/php/php.ini.pacnew
mv -v /etc/php/php.ini /etc/php/php.ini.pacold
mv -v /etc/php/php.ini.pacnew /etc/php/php.ini
For MariaDB:
sudo sed -i '/mysqli.so/s/^;//' /etc/php/php.ini
sudo sed -i '/mysql.so/s/^;//' /etc/php/php.ini
sudo sed -i '/skip-networking/s/^/#/' /etc/mysql/my.cnf
For PostgreSQL:
sudo sed -i '/pgsql.so/s/^;//' /etc/php/php.ini
Finally:
sudo sed -i '/mcrypt.so/s/^;//' /etc/php/php.ini
sudo sed -i '/gd.so/s/^;//' /etc/php/php.ini
sudo sed -i '/display_errors=/s/off/on/' /etc/php/php.ini
If new file exixts:
/etc/httpd/conf/httpd.conf.pacnew
mv -v /etc/httpd/conf/httpd.conf.pacnew /etc/httpd/conf/httpd.conf
Check if php is disabled:
cat /etc/httpd/conf/httpd.conf | grep php5_module.conf
If disabled, enable with:
echo -e 'application/x-httpd-php5 php php5' >> /etc/httpd/conf/mime.types
sudo sed -i '/LoadModule dir_module modules\/mod_dir.so/a\LoadModule php5_module modules\/libphp5.so' /etc/httpd/conf/httpd.conf
echo -e '\n# Use for PHP 5.x:\nInclude conf/extra/php5_module.conf\n\nAddHandler php5-script php' >> /etc/httpd/conf/httpd.conf
sudo sed -i -e 's/LoadModule mpm_event_module modules\/mod_mpm_event.so/LoadModule mpm_prefork_module modules\/mod_mpm_prefork.so/' /etc/httpd/conf/httpd.conf
sudo sed -i -e 's/DirectoryIndex\ index.html/DirectoryIndex\ index.html\ index.php/' /etc/httpd/conf/httpd.conf
Check if new file exists:
/etc/nginx/nginx.conf.pacnew
If file exists:
mv -v /etc/nginx/nginx.conf.pacnew /etc/nginx/nginx.conf
sudo sed -i -e '/location ~ \.php$ {/,/}/d' /etc/nginx/nginx.conf
sudo sed -i -e '/pass the PHP/a\ #\n location ~ \.php$ {\n fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;\n fastcgi_index index.php;\n root /srv/http;\n include fastcgi.conf;\n }' /etc/nginx/nginx.conf
sudo sed -i -e 's/public_html/Sites/' /etc/httpd/conf/extra/httpd-userdir.conf
sudo /bin/sh -c 'mkdir -p ~/Sites'
sudo /bin/sh -c 'chmod o+x ~/ && chmod -R o+x ~/Sites'
sudo pacman -Rsc --noconfirm $(pacman -Qqdt)
https://wiki.archlinux.org/index.php/HOSTNAME
A host name is a unique name created to identify a machine on a network.Host names are restricted to alphanumeric characters.\nThe hyphen (-) can be used, but a host name cannot start or end with it. Length is restricted to 63 characters.
sudo hostnamectl set-hostname
https://wiki.archlinux.org/index.php/Timezone
In an operating system the time (clock) is determined by four parts: Time value, Time standard, Time Zone, and DST (Daylight Saving Time if applicable).
sudo timedatectl set-timezone Asia/Kolkata
https://wiki.archlinux.org/index.php/Internationalization
This is set in /etc/adjtime. Set the hardware clock mode uniformly between your operating systems on the same machine. Otherwise, they will overwrite the time and cause clock shifts (which can cause time drift correction to be miscalibrated).
sudo timedatectl set-local-rtc false
sudo timedatectl set-ntp true
yay -S --noconfirm profile-sync-daemon
psd
sed -i 's/^#USE_BACKUPS=.*/USE_BACKUPS="yes"/' /home/shubham/.config/psd/psd.conf
sed -i '/^#BACKUP_LIMIT/s/^#//' /home/shubham/.config/psd/psd.conf
systemctl --user enable --now psd.service
systemd-analyze
systemd-analyze blame
systemd-analyze critical-chain
systemd-analyze plot > plot.svg
Clean systemd journal files manually using journalctl utility to limit its size to [size]MiB. You can specify your own parameters. For example, I prefer to keep it to 100MiB
Journal files are located at /var/log/journal/
journalctl --vacuum-size=100M
This manual refers to several articles and open source packages.
- Arch Wiki - Installation Guide
- Arch Wiki - General Recommendations
- Arch Wiki - Asus Zenbook Pro UX501
- Arter97's Blog - Power Saving Tunings
- Archlinux Ultimate Install
- Viper4Linux
- Git Create - Create Git Repos From Cli
- Resume - Resume in LaTeX using ModernCV
- Git Create - Create Git Repos From Cli
- Resume - Resume in LaTeX using ModernCV
GPL-3.0
shubhamgulati.com · GitHub @shubhamgulati91 · Twitter @shubhamgulati91