Welcome to the Arch Linux with Xfce4 and i3 Window Manager Installation Guide!
This guide provides you with a step-by-step walkthrough of installing Arch Linux along with the Xfce4 and i3 window manager. It has been carefully created based on my own experience of installation Arch Linux on multiple devices over the years. This guide aims to make your installation process as smooth as possible.
To begin your Arch Linux installation journey, please follow the step-by-step instructions provided below.
If you have any suggestions, corrections, or encounter any issues while following the guide, I encourage you to get involved through Github.
Issues: If you come across any problems or have specific questions, please open an issue on the Github repository for this guide. This allows me to track and address your concerns effectively.
Pull Requests: If you have improvements or additions to the guide, feel free to submit a pull request. Your contributions can help enhance the clarity of the guide for everyone.
-
Go to Arch Linux downloads page https://archlinux.org/download/
-
Find HTTP Direct Downloads section and choose any download mirror. Select a mirror that is geographically closer to your location.
-
On the mirror page find archive named like
archlinux-YYYY.MM.DD-x86_64.iso
orarchlinux-x86_64.iso
or any other file with.iso
suffix. Other files (like .txt, .tar.gz and even .iso.sig) are not needed for installation process.
-
Insert a USB-stick into your PC with at least 2Gb of space availavle on it.
-
Find corresponding block device for USB-stick in
/dev
folder. Usually it is/dev/sdb
.
- π‘ IMPORTANT NOTE: you need block device without a number on the end. If you have for example /dev/sdb, /dev/sdb1 and /dev/sdb2 you need /dev/sdb !
- Burn previously downloaded Arch Linux ISO-image on a USB-stick (in my case it is
/dev/sdb
):
-
$ sudo dd conv=fsync oflag=direct status=progress \ if=./archlinux-YYYY.MM.DD-x86_64.iso of=/dev/sdb
-
Insert the installation medium into the computer on which you are installing Arch Linux.
-
Power on your PC and press boot menu key. For Lenovo ThinkPad X1 Carbon series laptop, this key is
F12
. -
Boot from USB-stick and wait until boot process is finished.
- π‘ IMPORTANT NOTE: not every device can run a system from USB-stick out of the box. Many BIOS'es by default come with activated Secure boot option.You might need to deactivate it in your BIOS.
- [Optional] Connect to WiFi using
iwctl
and check connection is established:
-
$ iwctl [iwd]# station wlan0 get-networks [iwd]# station wlan0 connect <Name of WiFi access point> [iwd]# exit $ ping 1.1.1.1
- Synchronize pacman packaes:
-
$ pacman -Syy
- Partition main storage device using
fdisk
utility. You can find storage device name usinglsblk
command.
-
$ fdisk /dev/nvme0n1 [repeat this command until existing partitions are deleted] Command (m for help): d Command (m for help): d Command (m for help): d [create partition 1: efi] Command (m for help): n Partition number (1-128, default 1): Enter β΅ First sector (..., default 2048): Enter β΅ Last sector ...: +256M [create partition 2: main] Command (m for help): n Partition number (2-128, default 2): Enter β΅ First sector (..., default ...): Enter β΅ Last sector ...: -32G // double size of your RAM [create partition 3: swap] Command (m for help): n Partition number (3-128, default 3): Enter β΅ First sector (..., default ...): Enter β΅ Last sector ...: Enter β΅ [change partition types] Command (m for help): t Partition number (1-3, default 1): 1 Partion type or alias (type L to list all): uefi Command (m for help): t Partition number (1-3, default 2): 2 Partion type or alias (type L to list all): linux Command (m for help): t Partition number (1-3, default 3): 3 Partion type or alias (type L to list all): swap [write partitioning to disk] Command (m for help): w
- Create filesystems on created disk partitions:
-
$ mkfs.fat -F 32 /dev/nvme0n1p1 # on EFI System partition $ mkfs -t ext4 /dev/nvme0n1p2 # on Linux filesystem partition $ mkswap /dev/nvme0n1p3 # on Linux swap partition
- Correctly mount all filesystems to the
/mnt
:
-
$ mount /dev/nvme0n1p2 /mnt $ mkdir -p /mnt/boot/efi $ mount /dev/nvme0n1p1 /mnt/boot/efi $ swapon /dev/nvme0n1p3
- Install essential packages into new filesystem and generate fstab:
-
$ pacstrap -i /mnt base linux linux-firmware sudo vim $ genfstab -U -p /mnt > /mnt/etc/fstab
- Chroot into freshly created filesystem:
-
$ arch-chroot /mnt
- Setup system locale and timezone, sync hardware clock with system clock:
-
$ vim /etc/locale.gen # uncomment your locales, i.e. `en_US.UTF-8` or `en_GB.UTF-8` $ locale-gen $ echo "LANG=en_US.UTF-8" > /etc/locale.conf # choose your locale $ ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime # choose your timezone $ hwclock --systohc
- Setup system hostname:
-
$ echo yourhostname > /etc/hostname $ vim /etc/hosts 127.0.0.1 localhost ::1 localhost 127.0.1.1 yourhostname
- Add new users and setup passwords:
-
$ useradd -m -G wheel,storage,power,audio,video -s /bin/bash yourusername $ passwd root $ passwd yourusername
- Add wheel group to sudoers file to allow users to run sudo:
-
$ visudo [uncomment following line in file] %wheel ALL=(ALL) ALL
- Install and configure GRUB:
-
$ pacman -S grub efibootmgr $ grub-install /dev/nvme0n1 $ grub-mkconfig -o /boot/grub/grub.cfg
- Setup networking stack:
-
$ pacman -S dhcpcd networkmanager resolvconf $ systemctl enable dhcpcd $ systemctl enable NetworkManager $ systemctl enable systemd-resolved
- Exit chroot, unmount all disks and reboot:
-
$ exit $ umount /mnt/boot/efi $ umount /mnt $ reboot
- Activate time syncronization using NTP:
-
$ timedatectl set-ntp true
- [Optional] Connect to WiFi using
nmcli
:
-
$ nmcli device wifi connect <Name of WiFi access point> password <password>
- Install X.Org and its utilities:
-
$ sudo pacman -S xorg xorg-apps xorg-xinit xorg-xlsfonts xdotool xclip xsel
- Install a bunch of useful utilities:
-
$ sudo pacman -S dbus # Message bus used by many applications $ sudo pacman -S intel-ucode # Microcode update files for Intel CPUs $ sudo pacman -S fuse2 # Interface for programs to export a filesystem to the Linux kernel $ sudo pacman -S lshw # Provides detailed information on the hardware of the machine $ sudo pacman -S powertop # A tool to diagnose issues with power consumption and power management $ sudo pacman -S inxi # Full featured CLI system information tool $ sudo pacman -S acpi # Client for battery, power, and thermal readings
$ sudo pacman -S base-devel # Basic tools to build Arch Linux packages $ sudo pacman -S git # Distributed version control system $ sudo pacman -S zip # Compressor/archiver for creating and modifying zipfiles $ sudo pacman -S unzip # For extracting and viewing files in .zip archives $ sudo pacman -S p7zip # For extracting and viewing files in .7z archives $ sudo pacman -S htop # Interactive CLI process viewer $ sudo pacman -S tree # A directory listing program$ sudo pacman -S dialog # A tool to display dialog boxes from shell scripts $ sudo pacman -S reflector # Script to retrieve and filter the latest Pacman mirror list $ sudo pacman -S bash-completion # Programmable completion for the bash shell$ sudo pacman -S iw # CLI configuration utility for wireless devices $ sudo pacman -S wpa_supplicant # A utility providing key negotiation for WPA wireless networks $ sudo pacman -S tcpdump # Powerful command-line packet analyzer $ sudo pacman -S mtr # Combines the functionality of traceroute and ping into one tool $ sudo pacman -S net-tools # Configuration tools for Linux networking $ sudo pacman -S conntrack-tools # Userspace tools to interact with the Netfilter tracking system $ sudo pacman -S ethtool # Utility for controlling network drivers and hardware $ sudo pacman -S wget # Network utility to retrieve files from the Web $ sudo pacman -S rsync # File copying tool for remote and local files $ sudo pacman -S socat # Multipurpose socket relay $ sudo pacman -S openbsd-netcat # Netcat program. OpenBSD variant. $ sudo pacman -S axel # Light command line download accelerator $ sudo pacman -S bind # I use dig utility for DNS resolution from this package
- Install Xfce4, i3, or both:
-
# Instructions for installing Xfce4 $ sudo pacman -S xfce4 $ sudo pacman -S xfce4-notifyd xfce4-screensaver xfce4-screenshooter $ sudo pacman -S thunar-archive-plugin thunar-media-tags-plugin $ sudo pacman -S network-manager-applet $ sudo pacman -S xfce4-xkb-plugin xfce4-battery-plugin \ xfce4-datetime-plugin xfce4-mount-plugin \ xfce4-netload-plugin xfce4-wavelan-plugin \ xfce4-pulseaudio-plugin xfce4-weather-plugin \ xfce4-whiskermenu-plugin # Instructions for installing i3 $ sudo pacman -S i3-wm i3status i3lock pango $ sudo pacman -S lxappearance # You will most probably need these apps for i3 $ sudo pacman -S polybar # nice statusbar for i3-based UIs $ sudo pacman -S rofi # like dmenu, but more customizable $ sudo pacman -S alacritty # terminal emulator $ sudo pacman -S dunst # notification manager $ sudo pacman -S feh # fast and light image viewer $ sudo pacman -S xss-lock # screen lock controller $ sudo pacman -S flameshot # screenshot app $ sudo pacman -S gsimplecal # small calendar widget $ sudo pacman -S yazi # console file manager # additionals to yazi: $ sudo pacman -S ueberzugpp # viewing images in terminal
- Install login session manager, I prefer
ly
for it's minimalism:
-
$ sudo pacman -S ly $ sudo systemctl enable ly
- Install essential system fonts:
-
$ sudo pacman -S ttf-dejavu ttf-freefont ttf-liberation ttf-droid terminus-font $ sudo pacman -S noto-fonts noto-fonts-emoji ttf-ubuntu-font-family ttf-roboto ttf-roboto-mono
- [Optional] Enable sound support on your PC:
-
$ sudo pacman -S sof-firmware # Sound Open Firmware $ sudo pacman -S pulseaudio # A featureful, general-purpose sound server $ sudo pacman -S pavucontrol # PulseAudio Volume Control $ sudo pacman -S alsa-utils # Advanced Linux Sound Architecture - Utilities $ sudo pacman -S alsa-plugins # Additional ALSA plugins
- [Optional] Enable bluetooth support on your PC:
-
$ sudo pacman -S bluez bluez-utils blueman $ sudo systemctl enable bluetooth
- [Optional] Enable printing support on your PC:
-
$ sudo pacman -S cups cups-filters cups-pdf system-config-printer hplip $ sudo systemctl enable cups.service
-
π‘ IMPORTANT NOTE: if there is no option for system-config-printer in xfce4-settings-manager,
go to
/usr/share/applications/system-config-printer.desktop
and setCategories=System;Settings;X-XFCE-SettingsDialog;X-XFCE-HardwareSettings;
- [Optional] Improve battary usage with TLP - utility that basically does kernel settings tweaking that improve power consumption. More information about TLP can be found here. More information about TLP-RDW (radio device wizard) can be found here.
-
$ sudo pacman -S tlp tlp-rdw $ sudo systemctl enable tlp # execute following commands only if using TLP-RDW: $ sudo systemctl enable NetworkManager-dispatcher.service $ sudo systemctl mask systemd-rfkill.service $ sudo systemctl mask systemd-rfkill.socket
- [Optional] Run service that will discard unused blocks on mounted filesystems. This is useful for solid-state drives (SSDs) and thinly-provisioned storage. More information on fstrim can be found here.
-
$ sudo systemctl enable fstrim.timer
- [Optional] Install GTK themes and icons:
-
$ sudo pacman -S arc-gtk-theme adapta-gtk-theme materia-gtk-theme $ sudo pacman -S papirus-icon-theme
- [Optional] Choose fastest pacman mirrors (use your own country list):
-
$ sudo reflector --country Germany,Austria,Switzerland \ --fastest 10 \ --threads $(nproc) \ --save /etc/pacman.d/mirrorlist
- [Optional] Install NetworkManager addons:
-
$ sudo pacman -S nm-connection-editor networkmanager-openvpn
- [Optional] Install vulkan drivers:
-
$ pacman -S vulkan-intel # only for systems with Intel graphics $ pacman -S nvidia-utils # only for systems with Nvidia graphics $ pacman -S amdvlk # only for systems with AMD graphics
- Reboot to finalize installation:
-
$ reboot
-
Open your
/etc/fstab
and find UUID for your swap partition -
Open GRUB configuration file and add resume UUID to
GRUB_CMDLINE_LINUX_DEFAULT
:
-
$ sudo vim /etc/default/grub Example: ... GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=UUID=<UUID of your swap partition>" GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=UUID=97d9e9f5-899f-4e9e-910e-623a5f665271" ...
- Generate GRUB config:
-
$ sudo grub-mkconfig -o /boot/grub/grub.cfg
- Open mkinitcpio configuration file and add
resume
hook:
-
$ sudo vim /etc/mkinitcpio.conf Example: ... HOOKS="base udev resume autodetect modconf block filesystems keyboard fsck" ...
- Generate initramfs:
-
$ sudo mkinitcpio -p linux
- From now onwards, you can hibernate your system using:
-
$ sudo systemctl hibernate
-
$ sudo pacman -S firefix # web-browser $ sudo pacman -S obsidian # note-taking app $ sudo pacman -S bitwarden # password manager for all devices (use keepassxc provider) $ sudo pacman -S bitwarden-cli # command line bitwarden client $ sudo pacman -S mousepad # simple graphical text editor $ sudo pacman -S file-roller # archive manager $ sudo pacman -S evince # pdf viewer $ sudo pacman -S xournalpp # pdf editor $ sudo pacman -S libreoffice # office packages $ sudo pacman -S gimp # image editor $ sudo pacman -S gpick # color picker $ sudo pacman -S inkscape # vector graphics editor $ sudo pacman -S fontforge # fonts editor $ sudo pacman -S gparted # grphical disk management tool $ sudo pacman -S vlc # video player $ sudo pacman -S remmina # remote desktop client $ sudo pacman -S shotcut # video editing tool $ sudo pacman -S evolution # email client $ sudo pacman -S redshift # adjusts the color temperature of your screen $ sudo pacman -S obs-studio # screencasting and streaming app $ sudo pacman -S wireshark-qt # network protocol analyzer $ sudo pacman -S spotify-launcher # spotify client $ sudo pacman -S telegram-desktop # my preffered messenger $ sudo pacman -S rclone # manage or migrate files on cloud storage $ sudo pacman -S openvpn # openvpn client $ sudo pacman -S wireguard-tools # wireguard client $ sudo pacman -S arandr # gui for xrandr
-
$ git clone https://aur.archlinux.org/yay.git $ cd yay $ makepkg -si
- General purpose development tools:
-
$ sudo pacman -S neovim # powerful console editor $ sudo pacman -S zed # ultimate graphical editor $ sudo pacman -S tree-sitter # parsing system for programming tools $ sudo pacman -S tree-sitter-cli # cli tool tree-sitter parsers $ sudo pacman -S stow # configuration manager $ sudo pacman -S sqlite3 # console sqlite client $ sudo pacman -S tldr # collection of simplified man pages $ sudo pacman -S jq # cli json processor $ sudo pacman -S tmux # terminal session multiplexer $ sudo pacman -S nmap # network scanner with advanced features $ sudo pacman -S masscan # high performance network scanner $ sudo pacman -S pgcli # console client for PostgreSQL $ sudo pacman -S redis # console client for Redis $ sudo pacman -S apache # http server + some useful utilities (htpasswd) $ sudo pacman -S meld # git visual diff and merge tool $ sudo pacman -S websocat # command line client for websockets $ sudo pacman -S sshpass # noninteractive ssh password provider $ sudo pacman -S git-filter-repo # faster and safer git-filter-branch alternative
-
π‘ IMPORTANT NOTE: execute
sudo setcap 'cap_net_raw+epi' /usr/bin/masscan
to enable the ability to runmasscan
as non-root user.
- Infrastructure as a Code and DevOps tools:
-
$ sudo pacman -S ansible # infrastructure as a code tool (bare metal) $ sudo pacman -S podman # cli tool for container management $ sudo pacman -S podman-compose # run multi-container applications with podman $ sudo pacman -S docker # cli tool for container management $ sudo pacman -S docker-compose # run multi-container applications with docker $ sudo pacman -S kubectl # cli tool for managing kubernetes clusters $ sudo pacman -S helm # package manager for kubernetes $ sudo pacman -S terraform # infrastructure as a code tool (clouds) # configure docker $ sudo systemctl enable docker # enable docker daemon on system start # sudo usermod -a -G docker yourusername # to be able to run docker as non-root $ newgrp docker # login to docker group without restart
- Install Golang and its tools:
-
$ sudo pacman -S go $ go install github.com/fullstorydev/grpcurl/cmd/grpcurl@latest $ go install github.com/hairyhenderson/gomplate/v4/cmd/gomplate@latest
- Install Java and its tools:
-
$ sudo pacman -S jdk8-openjdk # OpenJDK Java 8 development kit $ sudo pacman -S jdk11-openjdk # OpenJDK Java 11 development kit $ sudo pacman -S jdk17-openjdk # OpenJDK Java 17 development kit $ sudo pacman -S jdk21-openjdk # OpenJDK Java 21 development kit $ sudo pacman -S jdk-openjdk # OpenJDK Java 22 development kit $ sudo pacman -S maven # Java project management tool $ sudo pacman -S gradle # Java project management tool
-
π‘ IMPORTANT NOTE: JVM version can be switched using
archlinux-java
. List all available JVM versions usingarchlinux-java status
and set one usingarchlinux-java set VERSION
. -
Install Dart and Flutter following instructions from https://docs.flutter.dev/get-started/install/linux
-
Install C, C++ and tools for low-level development:
-
$ sudo pacman -S gcc # GNU Compiler Collection, C and C++ frontends $ sudo pacman -S gdb # GNU Debugger $ sudo pacman -S clang # C/C++ frontend compiler for LLVM $ sudo pacman -S cmake # C/C++ project management tool $ sudo pacman -S ninja # Build system with a focus on speed $ sudo pacman -S cuda # NVIDIA GPU programming toolkit $ sudo pacman -S nasm # Asssembler for the x86 CPU architecture $ sudo pacman -S boost # C++ library with general purpose utils and data structures $ sudo pacman -S cdrtools # CD/DVD/BluRay command line recording software $ sudo pacman -S qemu-full # Open source machine emulator and virtualizer
- Install Python and its tools:
-
$ sudo pacman -S python # python itself $ sudo pacman -S python-pip # python package manager $ sudo pacman -S python-poetry # python package manager (better one)
- Install Lua:
-
$ sudo pacman -S lua # Collection of Lua tools
- Install JavaScript and its tools:
-
$ sudo pacman -S nodejs # JavaScript runtime $ sudo pacman -S npm # JavaScript package manager $ sudo pacman -S yarn # JavaScript package manager
- Install Rust and its tools:
-
$ sudo pacman -S rust # Rust compiler and tools for project management
- Install Virtualbox:
-
$ sudo pacman -S linux-headers # Headers for building Linux kernel modules $ sudo pacman -S virtualbox-host-dkms # VirtualBox Host kernel modules sources $ sudo pacman -S virtualbox # Hypervisor for x86 virtualization
- Architecture diagraming tools:
-
$ sudo pacman -S plantuml # Tool for creating UML diagrams
- Install hugo (static website generator):
-
$ sudo pacman -S hugo # fast and flexible static site generator in go $ sudo pacman -S dart-sass # implementation of sass (required for hugo)
- Accounting software:
-
$ sudo pacman -S gnucash # Personal and small-business financial-accounting application
- 3D-Printing software:
-
$ sudo pacman -S freecad # Feature based parametric 3D CAD modeler $ sudo pacman -S prusa-slicer # G-code generator for 3D printers
- Go to
/etc/pacman.conf
and uncomment (or add) following lines: -
[multilib] Include = /etc/pacman.d/mirrorlist
- Update package database:
-
$ sudo pacman -Syu
- Install Wine and its utilities:
-
$ sudo pacman -S wine # Compatibility layer for running Windows programs $ sudo pacman -S wine-mono # Wine's replacement for Microsoft's .NET Framework $ sudo pacman -S wine-gecko # Wine's replacement for Microsoft's Internet Explorer $ sudo pacman -S winetricks # Installer for various runtime libraries in Wine $ sudo pacman -S zenity # Display dialog boxes from shell scripts (wine dependency)
- Configure smooth font in Wine applications:
-
$ winetricks settings fontsmooth=rgb
-
π‘ IMPORTANT NOTE: if you are facing error
wine: Read access denied for device L"\\??\\Z:\\", FS volume label and serial are not available
, go to~/.wine/dosdevices
, removez:
symbolic link and make it point to your$HOME
- Donwload texlive installer:
-
$ wget http://mirrors.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
- Upack texlive installer archive:
-
$ mkdir ./texlive $ tar -xvf install-tl-unx.tar.gz -C texlive --strip-components=1
- Run texlive install and select nearest CTAN mirror:
-
$ cd ./texlive $ sudo ./install-tl -select-repository
-
Download zip-archive from here: https://developer.android.com/studio from Command line tools only section.
-
Unpack archive and copy cmdline-tools to
$ANDROID_HOME
(in my case~/Android
): -
$ unzip commandlinetools-linux-..._latest.zip # archive you got from website $ mkdir -p ~/Android/cmdline-tools/latest $ mv ./cmdline-tools/* ~/Android/cmdline-tools/latest/
-
Set
ANDROID_HOME
environment variable to~/Andoird
in.bashrc
-
Install platform tools, build tools and accept all licenses:
-
$ sdkmanager "platform-tools" "platforms;android-29" $ sdkmanager "build-tools;29.0.3" $ sdkmanager --licenses $ sdkmanager --update
-
$ sudo pacman -S yubikey-manager $ sudo pacman -S yubikey-personalization-gui
-
Binary reverse engineering:
gdb
,strace
,ltrace
,ldd
,objdump
radare2
,frida
,Ghidra
,IDA Pro
,cutter
+rz-ghidra
+cutterref
,angr-management
API Monitor
,PEiD
,UpxUnpacker
-
Python:
pycdc
-
Java:
jd-gui
,jadx
-
C#:
Avalonia ILSpy
-
xhci_hcd 0000:00:14.0: PM: pci_pm_freeze(): hcd_pci_suspend+0x0/0x20 returns -16 xhci_hcd 0000:00:14.0: PM: dpm_run_callback(): pci_pm_freeze+0x0/0xc0 returns -16 xhci_hcd 0000:00:14.0: PM: failed to freeze async: error -16
-
#!/bin/sh run_pre_hook() { echo "Disable xhci module before suspend at $(date)..." >> /tmp/systemd_suspend_log grep XHC.\*enable /proc/acpi/wakeup && echo XHC > /proc/acpi/wakeup } run_post_hook() { echo "Enable xhci module after wakeup from $(date)" >> /tmp/systemd_suspend_log grep XHC.\*disable /proc/acpi/wakeup && echo XHC > /proc/acpi/wakeup } case $1 in pre) run_pre_hook ;; post) run_post_hook ;; esac
- Open
/etc/default/grub
with text editor and add following lines: -
GRUB_TERMINAL_OUTPUT="gfxterm" GRUB_GFXPAYLOAD_LINUX=keep GRUB_GFXMODE=1920x1080x32,1024x768x32,auto
- Generate
grub.cfg
: -
$ sudo grub-mkconfig -o /boot/grub/grub.cfg
-
Open
/etc/lightdm/lightdm.conf
file and add following line under[Seat:\*]
section:display-setup-script=xrandr --output eDP-1 --mode 1920x1080
P.S. your screen output name, like eDP-1 in my case, can be found inxrandr -q
-
$ gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'
- If system goes to sleep after 3-5 minutes, this might be screensaver.
To stop this, disable option
Settings -> Screensaver -> Activate Screensaver when computer is idle
. - This happens when your Wireguard server can only handle requests only to configured IP addresses and DNS names.
Use
resolvectl revert wg0
(changewg0
to your wireguard interface name). This will prevent system from using Wireguard interface for all routes. - If you screen freezes (or hangs) while not touching keyboard or mouse for some time (usually 2-10 minutes),
this might be an issue with picom. Try first stopping picom at all to see if this helps.
If yes, try to change rendering backend of picom from
xrender
toglx
and check if it helps. Worked for me. Window -> Always show menu bar -> disable
- [Only once] Select disk partition to be encrypted (in this example
/dev/sdb1
) and initialize LUKS: -
$ sudo cryptsetup luksFormat /dev/sdb1
- Open and decrypt LUKS partition, this will create decrypted device at
/dev/mapper/cryptdev
: -
$ sudo cryptsetup open /dev/sdb1 cryptdev
- [Only once] Initialize filesystem on decrypted partition, in this example
ext4
: -
$ sudo mkfs.ext4 /dev/mapper/cryptdev
- Mount created filesystem, to
/mnt
folder in this example, and use it as you want: -
$ sudo mount /dev/mapper/cryptdev /mnt
- Unmount filesystem and close LUKS device after using it:
-
$ sudo umount /mnt $ sudo cryptsetup close cryptdev
- [If needed] Change LUKS disk encryption passphrase:
- TLDR: LUKS generates a single master key (also known as the "encryption key"), which is used to encrypt the data on the disk. Instead of storing the master key directly, LUKS uses key slots. Each slot contains the master key encrypted with a unique password or other authentication information. To change the password, we need to obtain LUKS slot number for the current key.
-
$ sudo cryptsetup luksDump /dev/sdb1 # most probably it will be 0 $ sudo cryptsetup luksChangeKey /dev/sdb1 -S 0 # use your own slot number in -S parameter
In some Linux kernels there are some broken USB 3.0 device drivers, that sometimes wake up
the system right after you launch hibernation process. If you see errors like this in your
dmesg
command output after an unsuccessful hibernation:
To fix the issue put following lines in /usr/lib/systemd/system-sleep/xhci
and make this file executable:
Original solution: https://gist.github.com/ioggstream/8f380d398aef989ac455b93b92d42048
This can help if you have very tiny grub font on your 4k monitor
This can help if you use lightdm and have very tiny font on your 4k monitor