Pre-Installation
Connect to a wifi network
I’ve updated my wifi-card to make it more compatible with my Linux machine
https://www.amazon.com/Intel-8260-IEEE-802-11ac-Adapter/dp/B0197W86IE/ref=sr_1_1?s=electronics&ie=UTF8&qid=1498679996&sr=1-1&keywords=intel+8260
Enable NTP
1
|
# timedatectl set-ntp true
|
1
2
3
4
|
# mkfs.fat -F32 /dev/sda1
# mkswap -L "swap" /dev/sda2
# swapon /dev/sda2
# mkfs.ext4 -L arch /dev/sda3
|
mount disks
1
2
3
|
# mount /dev/sda3 /mnt
# mkdir -p /mnt/boot/EFI
# mount /dev/sda1 /mnt/boot/EFI
|
Installation
Fix pacman.conf
1
2
3
4
5
6
|
/etc/pacman.conf
---------------------
# Move the best mirror to the top (the one at your country?)
# sed -i 's/#multilib/multilib/' /etc/pacman.conf
# sed -i 's/#color/color/' /etc/pacman.conf
# add ILoveCandy
|
Packs to install
1
|
# pacstrap /mnt base base-devel
|
1
2
|
# genfstab -p /mnt >> /mnt/etc/fstab
# arch-chroot /mnt
|
Instal packs
Pacman
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
|
# pacman -S networkmanager networkmanager-openvpn \
xorg-server-xwayland \
qt5-wayland qt6-wayland qt5ct \
xf86-input-libinput xf86-video-intel \
xdg-user-dirs \
grub efibootmgr \
intel-ucode \
pkgfile \
bind-tools \
lm_sensors acpi acpid tlp tlp-rdw \
udiskie \
ntfs-3g \
bluez \
bash-completion \
openssh \
ufw sudo \
git gitui \
gcc scdoc gdb \
meson ninja cmake \
docker \
rustup rust-analyzer \
lua \
jdk8-openjdk \
dotnet-sdk \
python python-requests python-pip \
nodejs \
k9s \
hugo \
bat \
android-udev \
ttf-hack ttf-dejavu \
noto-fonts-emoji \
neovim python-neovim \
pacutils \
pipewire pipewire-pulse pipewire-jack pipewire-alsa \
polkit-gnome \
youtube-dl beets \
translate-shell \
subdl moc \
syncthing \
htop bpytop exa expac tldr \
wl-clipboard \
alacritty \
gammastep \
rofi-lbonn-wayland\
blueman \
mpv imv mupdf \
wireshark-gtk wifite \
sway swaybg swaylock swayidle \
grim slurp mako wf-recorder waybar
|
RUST
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
rustup installation guide.
Don’t forget add ~/.cargo/bin to your PATH variable.
Having the installer ready, we need to install the toolchains, sources and docs.
I want to use the stable toolchain to write code, but some of the development tools are only available for the nightly toolchain so we’re simply going to install them both.
rustup toolchain install stable
rustup toolchain install nightly
rustup default stable
rustup component add rust-src
rustup component add rls --toolchain nightly
cargo install cargo-audit
cargo install cargo-edit
cargo install cargo-expand
cargo install cargo-tarpaulin
cargo install sqlx-cli --no-default-features --features postgres
|
AUR
1
2
3
4
5
6
7
|
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
yay -S light
yay -S wf-recorder
yay -S wob
|
Timezone
1
2
|
ln -sf /usr/share/zoneinfo/America/Sao_Paulo /etc/localtime
hwclock --systohc
|
Environment
1
2
3
|
/etc/environment
---------------------
GTK_IM_MODULE=cedilla
|
Locale
1
2
3
|
/etc/locale.conf
---------------------
echo LANG=en_US.UTF-8 > /etc/locale.conf
|
1
2
3
|
/etc/locale.gen
---------------------
sed -i "s/#en_US.UTF-8/en_US.UTF-8/" /etc/locale.gen
|
Network
1
|
# echo "amora" > /etc/hostname
|
1
2
3
4
5
6
|
/etc/hosts
---------------------
127.0.0.1 localhost
::1 localhost
127.0.1.1 amora.local
|
1
2
3
4
5
|
# /etc/systemd/resolved.conf
[Resolve]
DNS=116.202.176.26
FallbackDNS=127.0.0.1 ::1
DNSOverTLS=yes
|
1
2
3
4
5
6
7
8
|
/etc/systemd/network/00-default.link
-----------------------------
[Match]
MACAddress=original MAC
[Link]
MACAddress=random
NamePolicy=kernel database onboard slot path
|
1
2
3
4
5
6
7
8
9
10
11
12
|
/etc/NetworkManager/conf.d/wifi_rand_mac.conf
---------------------
[device-mac-randomization]
# "yes" is already the default for scanning
wifi.scan-rand-mac-address=yes
[connection-mac-randomization]
# Randomize MAC for every ethernet connection
ethernet.cloned-mac-address=random
# Generate a random MAC for each WiFi and associate the two permanently.
wifi.cloned-mac-address=stable
|
1
2
3
4
5
|
sudo systemctl enable systemd-resolved.service
sudo systemctl start systemd-resolved.service
sudo systemctl enable syncthing@thiago.service
sudo systemctl start syncthing@thiago.service
sudo ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
|
1
2
3
|
sudo nvim /etc/systemd/logind.conf
---------------------
HandlePowerKey=suspend
|
Webcam config
1
2
3
4
5
|
/etc/modprobe.d/ucvideo.conf
---------------------
options uvcvideo nodrop=1
options uvcvideo timeout=5000
options uvcvideo quirks=128
|
1
2
3
|
/etc/udev/rules.d/83-webcam.rules
---------------------
KERNEL=="video[0-9]*", SUBSYSTEM=="video4linux", SUBSYSTEMS=="usb", ATTRS{idVendor}=="0c45", ATTRS{idProduct}=="670c", SYMLINK+="video-cam"
|
Disable internal webcam
1
2
3
4
|
sudo nvim /etc/udev/rules.d/40-disable-internal-webcam.rules
---------------------
ATTRS{idVendor}=="1bcf", ATTRS{idProduct}=="2c67", RUN="/bin/sh -c 'echo 0 >/sys/\$devpath/authorized'"
Bus 002 Device 005: ID 0c45:670c Microdia Integrated Webcam HD
|
Libdir config
1
2
3
|
/etc/ld.so.conf.d/usrlocal.conf
---------------------
/usr/local/lib
|
Sound config
1
2
3
|
/etc/modprobe.d/intel-hda.conf
---------------------
options snd_hda_intel index=1,0
|
Bluetooth config
1
2
3
4
5
6
7
8
9
|
/etc/bluetooth/audio.conf
---------------------
AutoEnable=false
--
/etc/bluetooth/audio.con
---------------------
Enable=Source,Sink,Media,Socket
|
Coredump systemctl
1
2
3
4
5
6
7
8
9
10
|
/etc/sysctl.d/50-coredump.conf
---------------------
kernel.core_pattern=|/bin/false
--
/etc/systemd/coredump.conf
---------------------
[Coredump]
Storage=none
|
Beep off
1
2
3
|
/etc/inputrc
---------------------
set bell-style none
|
Console
1
2
3
4
|
/etc/vconsole.conf
---------------------
FONT=latarcyrheb-sun32
KEYMAP=us-acentos
|
Switch off your touch screen \o/ \o/
1
2
3
|
/etc/udev/rules.d/80-touchscreen.rules
---------------------
SUBSYSTEM=="usb", ATTRS{idVendor}=="04f3", ATTRS{idProduct}=="20d0", ATTR{authorized}="0"
|
Suspend the system when battery drops to 10%
1
2
3
|
/etc/udev/rules.d/99-lowbat.rules
---------------------
SUBSYSTEM=="power_supply", ATTR{status}=="Discharging", ATTR{capacity}=="[0-10]", RUN+="/usr/bin/systemctl hibernate"
|
Blacklist (Dell XPS)
1
2
3
|
/etc/modprobe.d/psmouse-blacklist.conf
---------------------
blacklist psmouse
|
Journalfs
1
2
3
4
5
|
/etc/systemd/journald.conf
---------------------
Storage=volatile
SystemMaxUse=10M
RuntimeMaxUse=10M
|
Grub
1
2
3
4
5
|
/etc/defaults/grub
---------------------
GRUB_TIMEOUT=0
GRUB_GFXMODE=1024x768
|
Buld initramfs and install Grub
1
2
3
|
# mkinitcpio -p linux
# grub-mkconfig -o /boot/grub/grub.cfg
# grub-install --recheck /dev/sda
|
ufw config
1
2
3
4
5
|
# ufw enable
# ufw default allow outgoing
# ufw default deny incoming
# ufw allow Transmission
# ufw allow syncthing
|
Adding an user
1
2
3
4
|
# useradd -m -g users -s /bin/sh <username>
# passwd <username>
# echo '<username> ALL=(ALL) ALL' > /etc/sudoers.d/<username>
# gpasswd -a username network,wheel,storage,video,libvirt,systemd-journal
|
Services
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
# systemctl enable thermald
# systemclt enable acpid
# systemctl enable ufw
# systemctl enable tlp
# systemctl enable tlp-sleep
# systemctl enable networkmanager
# systemctl disable dhcpcd@.service
# systemctl disable man-db.service
# systemctl mask lvm2-monitor.service
# systemctl mask systemd-rfkill
# systemctl mask systemd-rfkill.socket
# systemctl mask geoclue
|
Services as user
1
|
# systemctl --user enable mpd.service
|
Root Access
- [INFO] If you want to disable the root access try this next command
- [INFO] If you want to bring it back try this next command
Mime types
1
|
ln -s ~/.config/mimeapps.list ~/.local/share/applications/mimeapps.list
|
Python modules
1
|
# pip install pip-autoremove
|
Do this as a user
Neovim plugin manager
1
2
|
# curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
Android Studio
- Android Studio – No space left on device
Solution – temporarily increase the size of the /tmp partition
1
|
# sudo mount -o remount,size=8G,noatime /tmp;
|
Transmission-Gtk blocklist
1
|
http://john.bitsurge.net/public/biglist.p2p.gz
|