Skip to content

Instantly share code, notes, and snippets.

@imnetcat
Created January 13, 2021 12:35
Show Gist options
  • Save imnetcat/26e7df1839d98a5e9ea37323d52b2c56 to your computer and use it in GitHub Desktop.
Save imnetcat/26e7df1839d98a5e9ea37323d52b2c56 to your computer and use it in GitHub Desktop.
# my-arch-setup
Step by step commands for set up my arch
## Load into live-system virtual console
### First of all connect to wifi
turn on the network interface (wlan0)
```
ip link set wlan0 up
```
make sure the wireless card is not blocked with
```
rfkill unblock wifi
```
scan for network
```
iwctl station wlan0 scan
```
connect to my wifi
```
iwctl --passphrase passphrase station wlan0 connect SSID
```
the connection may be verified with ping
```
ping archlinux.org
```
### Setup time&date
syncronize time&date
```
timedatectl set-npt true
```
### Partition the disks
Create UEFI with GPT partion layout without swap
enter partioner
```
parted
```
check current partions and verified that our hard drive have device name "sda" (or replace next all "sda" to your device name)
```
print list
```
remove all partions
```
rm 1
rm 2
rm 3
```
creating partions: 500MB for UEFI bootloader & other for root
```
mkpart boot fat 0 500
mkpart root ext4 500 256000
```
exit partioner
```
quit
```
create filesystem
```
mkfs.fat -F32 /dev/sda1
mkfs.ext4 /dev/sda2
```
mount a filesystem
```
mkdir /efi
mount /dev/sda1 /efi
mount /dev/sda2 /mnt
```
install the base package, Linux kernel and firmware for common hardware
```
pacstrap /mnt base linux linux-firmware vim grab efibootmgr networkmanager
```
Generate an fstab file
```
genfstab -U /mnt >> /mnt/etc/fstab
```
Change root into the new system
```
arch-chroot /mnt
```
Set the timezone
```
ln -sf /usr/share/zoneinfo/Region/City /etc/localtime
```
generate /etc/adjtime:
```
hwclock --systohc
```
Edit /etc/locale.gen with already installed vim and uncomment
```en_US.UTF-8 UTF-8```
```ru_RU.UTF-8 UTF-8```
Then generate locales
```
locale-gen
```
Create the locale.conf file, and set the LANG variable
```
echo "LANG=en_US.UTF-8" > /etc/locale.conf
```
### Network configuration
Create the hostname file
```
echo "domain" > /etc/hostname
```
Create hosts file
```
echo "127.0.0.1" > /etc/hosts
echo "::1 localhost" >> /etc/hosts
echo "127.0.1.1 domain.localdomain domain" >> /etc/hosts
```
### Root password
Set the root password
```
passwd
```
### Bootloader
install grub
```
grub-install --target=x86_64-efi --efi-directory=efi --bootloader-id=GRUB
grub-mkconfig -o /boot/grub/grub.cfg
```
### Finish the bare arch linux installation
type ```exit``` to exit from chroot
then onplug the usb-installation media and type ```reboot``` for reboot pc
## Load into newed installed arch linux
connect to the wifi (using already installed NetworkManager)
```
systemctl enable NetworkManager
systemctl start NetworkManager
nmcli device wifi connect SSID password password
ping archlinux.org
```
install xorg
https://wiki.archlinux.org/index.php/Xorg#Installation
```
pacman -S xorg
pacman -S xf86-video-intel
pacman -S xf86-video-nouveau
```
install KDE Plasma
https://wiki.archlinux.org/index.php/KDE#Installation
```
pacman -S plasma terminator dolphin sddm sudo
systemctl enable sddm
cp /etc/X11/xinit/xinitrc ~/.xinitrc
```
then edit ~/.xinitrc file - delete all down of "start some nice programs" and the add
```
export DESKTOP_SESSION=plasma
exec startplasma-x11
```
add xorg & kde to autostart on login
```
echo "if [ -z "${DISPLAY}" ] && [ "$(tty)" = "/dev/tty1" ]; then" > /etc/profile.d/kde.sh
echo " exec startx" >> /etc/profile.d/kde.sh
echo "fi" >> /etc/profile.d/kde.sh
```
add new user
```
useradd --create-home example_user
passwd example_user
usermod --append --groups wheel example_user
```
then uncomment this line in /etc/sudoers
```
...
## Uncomment to allow members of group wheel to execute any command
%wheel ALL=(ALL) ALL
...
```
let's reboot to KDE
```
reboot
```
### finish the installation
#Make sure the system is up to date.
```
sudo pacman -Syu --noconfirm
```
install some apps
```
sudo pacman -S neofetch lynx firefox curl wget telegram-desktop vlc gimp htop
```
install libre ofice
```
sudo pacman -S ttf-dejavu
sudo pacman -S libreoffice-still
```
install starship command prompt
```
curl -fsSL https://starship.rs/install.sh | bash
```
install pacaur
```
sudo pacman -S binutils make gcc fakeroot expac yajl git jq pkg-config gtest gmock meson --noconfirm
git clone https://aur.archlinux.org/auracle-git.git
cd auracle-git
makepkg -Cs --noconfirm
sudo pacman -U auracle-git-*
git clone https://aur.archlinux.org/pacaur.git
cd pacaur/
makepkg -si --noconfirm
sudo pacman -U pacaur*.tar.zst --noconfirm
echo "export EDITOR=\"/usr/bin/vim\"" >> ~/.bashrc
source ~/.bashrc
```
install stacer
```
git clone https://aur.archlinux.org/stacer.git
cd stacer
makepkg -si
```
### customize ~~~
- Install Sweet KDE in Global Theme
- Apply Breeze SDDM login screen in "Startup and shutdown"
- Set up user public pretty name & avatar
- Customize menu and panel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment