Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Arch Installation Commands
- https://wiki.archlinux.org/index.php/Installation_guide
- https://wiki.archlinux.org/index.php/General_recommendations
- https://www.youtube.com/watch?v=VwvHeFixpZY
- https://www.youtube.com/watch?v=lizdpoZj_vU
- # Backup
- Backup SafeBoot MBR (from Linux Live USB):
- mount /dev/sdb1 /mnt (or whatever the desired flash drive address is)
- dd if=/dev/sda of=/mnt/safeboot.mbr bs=512 count=1
- umount /dev/sdb1
- Restore SafeBoot MBR (from Linux Live USB):
- mount /dev/sdb1 /mnt
- dd if=/mnt/safeboot.mbr of=/dev/sda bs=512 count=1
- umount /dev/sdb1
- Fix Windows MBR (from elevated Windows recovery):
- bootrec.exe /fixmbr
- bootrec.exe /fixboot
- bootrec.exe /rebuildbcd
- # Pre-installation
- ## Verify not UEFI
- ls /sys/firmware/efi/efivars
- (If directory doesn't exist, system is probably in BIOS or CSM mode)
- ## Check connection
- ping archlinux.org
- ping -c 3 google.com
- ## Time
- timedatectl set-ntp true
- timedatectl status
- ## Partition
- fdisk -l
- cfdisk /dev/sda (your choice of disk)
- gpt
- New Linux Filesystem
- New Linux Swap (1.2x your RAM = 10GB?)
- ## Make Filesystem and Mount
- mkfs.ext4 /dev/sda1
- mount /dev/sda1 /mnt
- mkswap /dev/sda2
- swapon /dev/sda2
- # Installation
- ## Edit mirrors (optional)
- /etc/pacman.d/mirrorlist
- ## Install packages
- pacstrap /mnt base base-devel vim
- # Configuration
- ## Generate Fstab
- genfstab -U /mnt >> /mnt/etc/fstab
- vim /mnt/etc/fstab
- Verify no errors. should be similar to fdisk -l drive list
- ## Change root
- arch-chroot /mnt
- ## Time zone
- ls /usr/share/zoneinfo
- ln -sf /usr/share/zoneinfo/America/Vancouver /etc/localtime
- hwclock --systohc --utc
- ## Locale
- vim /etc/locale.gen
- Uncomment en_US.UTF-8 UTF-8
- # en_US ISO-8859-1 (Latin-1) is a single byte encoding so nah
- locale-gen
- Then:
- vim /etc/locale.conf
- LANG=en_US.UTF-8
- Alternatively:
- echo LANG=en_US.UTF-8 > /etc/locale.conf
- According to 2nd youtube video, we could also do:
- localectl set-locale LANG="en_US.UTF-8"
- ## Set hostname
- echo PC-MORDOR-Arch > /etc/hostname
- vim /etc/hosts
- Add 127.0.1.1 PC-MORDOR-Arch.localdomain PC-MORDOR-Arch
- ## Initramfs (optional)
- Creating a new initramfs is usually not required, because mkinitcpio was run on installation of the linux package with pacstrap.
- mkinitcpio -p linux
- ## Set root password
- Different from user password!
- passwd
- ## Bootloader
- ### GRUB
- pacman -S install grub
- grub-install --target=i386-pc --recheck /dev/sda
- mkinitcpio -p linux #optional????
- grub-mkconfig -o /boot/grub/grub.cfg
- ### Intel ucode
- If you have an Intel CPU, install the intel-ucode package in addition, and enable microcode updates.
- pacman -S intel-ucode
- grub-mkconfig -o /boot/grub/grub.cfg # Regenerate after installing intel-ucode
- ## Reboot
- exit
- umount -R /mnt
- reboot
- Remove USB
- # Login
- Username: root
- Password: [root password]
- ## User account
- (from youtube vid)
- useradd -m -g users -G wheel -s /bin/bash mulhaq
- passwd mulhaq
- vim /etc/sudoers
- Uncomment %wheel ALL=(ALL) ALL
- ## Network
- ping test
- ls /etc/netctl/examples
- sudo cp /etc/netctl/examples/ethernet-dhcp /etc/netctl
- ip a
- vim /etc/netctl/ethernet-dhcp
- Change interface enp0s3 or something
- sudo netctl start ethernet-dhcp
- sudo netctl enable ethernet-dhcp
- ping test
- ## Verify up to date
- sudo pacman -Syu
- ## Enable 32-bit multilib support
- sudo vim /etc/pacman.conf
- Uncomment
- [multilib]
- Include = /etc/pacman.d/mirrorlist
- sudo pacman -Syu
- # or sudo pacman -Syyu to refresh ALL package lists (including unchanged)
- # Nvidia
- sudo pacman -S nvidia nvidia-utils lib32-nvidia-utils
- reboot
- NOTE If on VirtualBox, it cannot access graphics drivers, so do this instead:
- sudo pacman -S xf86-video-nouveau mesa lib32-mesa
- reboot
- ## Sound
- sudo pacman -S alsa-utils
- alsamixer
- Set gain to 0
- # Xorg Packages
- sudo pacman -S xorg-server xorg-xinit xorg-apps
- # Graphics/Desktop Manager
- lspci -k | grep -A 2 -i "VGA"
- sudo pacman -S virtualbox-guest-utils
- sudo pacman -S xfce4
- cp /etc/X11/xinit/xinitrc ~/.xinitrc
- vim ~/.xinitrc
- Comment out
- twm &
- xclock ...
- xterm ...
- xterm ...
- exec xterm ...
- Add
- exec startxfce4
- # Display manager
- sudo pacman -S sddm
- ## Reboot
- reboot
- ## Open DE
- startx
- # Automatically startx?
- ... [test on Windows VBox]
- cp /etc/skel/.bash_profile ~/.bash_profile
- vim ~/.bash_profile
- Append:
- if [ -z "$DISPLAY" ] && [ -n "$XDG_VTNR" ] && [ "$XDG_VTNR" -eq 1 ]; then
- exec startx
- fi
- See also for multiple DEs: https://wiki.archlinux.org/index.php/Xinit#Switching_between_desktop_environments.2Fwindow_managers
- # Optimization
- ## SSD Lifetimes
- https://wiki.archlinux.org/index.php/Solid_State_Drives
- # Networking, Security
- ## Firewall
- iptables?
- Frontends: https://wiki.archlinux.org/index.php/Firewalls
- sudo pacman -S ufw
- sudo ufw enable
- sudo ufw status verbose
- sudo systemctl enable ufw.service # startup with system
- reboot
- sudo ufw status verbose
- # System service
- ## Printing
- sudo pacman -S cups cups-pdf gtk3-print-backends
- Change default location (/var/spool/cups-pdf/$USER) of PDF prints
- sudo vim /etc/cups/cups-pdf.conf
- ...
- Enable and start:
- systemctl start org.cups.cupsd.service
- systemctl enable org.cups.cupsd.service
- # Appearance
- More here:
- https://wiki.archlinux.org/index.php/Category:Eye_candy
- ## Fonts
- https://wiki.archlinux.org/index.php/Fonts#Font_packages
- sudo pacman -S adobe-source-sans-pro-fonts ttf-anonymous-pro ttf-bitstream-vera ttf-dejavu ttf-droid ttf-fira-mono ttf-gentium ttf-inconsolata ttf-liberation ttf-monaco ttf-roboto ttf-ubuntu-font-family ttf-vista-fonts
- ## GTK+ and Qt themes
- [todo]
- More here:
- https://wiki.archlinux.org/index.php/Uniform_look_for_Qt_and_GTK_applications
- # LTS, headers
- uname -r
- sudo pacman -S linux-headers
- sudo pacman -S linux-lts linux-lts-headers (not really needed but just in case...?)
- reboot
- uname -r # verify not running LTS...
- # Packages
- List: https://wiki.archlinux.org/index.php/List_of_applications
- Popular apps: https://docs.google.com/forms/d/1hBNZDVdj9kY1BBPb8xR3QI4yOt1xPi83p1aZPIQNHqQ/viewanalytics
- Determine harddisk space usage:
- expac '%m\t%n' | sort -h
- linux-headers linux-lts linux-headers-lts
- openssh
- qbittorrent qbittorrent-nox
- Browsers: firefox, google-chrome
- Drivers: ntfs-3g
- Zipping: p7zip zip unzip gzip tar
- Codecs: flac lame libmpeg2 libtheora libvorbis x264-git x265-hg xvidcore neroaac
- Communication: discord skypeforlinux
- File Manager: thunar
- Image viewers: viewnoir photoqt
- Multimedia: gimp imagemagick audacity vlc pulseaudio
- Screen locker: i3lock-color-git
- PDF:
- zathura zathura-pdf-mupdf zathura-djvu # Oooh has fancy config files + dark (like sumatra) and simplicity
- foxitreader acroread
- okular
- fbreader
- https://askubuntu.com/questions/472540/is-there-a-pdf-reader-allowing-me-to-change-background-color-of-arxiv-pdfs
- Fonts (favorite): ttf-monaco ttf-roboto
- Fonts (installed): noto-fonts
- Fonts (other?): adobe-source-sans-pro-fonts ttf-anonymous-pro ttf-bitstream-vera ttf-dejavu ttf-droid ttf-fira-mono ttf-gentium ttf-inconsolata ttf-liberation ttf-ubuntu-font-family ttf-w10-fonts?? ttf-vista-fonts
- Laptops:
- Power management
- System maintenance: bleachbit bleachbit-git
- Malware: clamav, maldet, rkhunter
- Scientific computing:
- Anaconda2,3
- numpy-mkl (2,3)
- scipy-mkl
- C++ MKL, etc libraries (see OpenCV docs)
- CUDA
- ## Programming
- Editors: vim vim-plug neovim sublime-text-dev visual-studio-code atom lighttable slap
- Other: git mercurial tmux
- Python: python python2 pip pip2 cython
- Build: gcc-fortran clang perl
- Desired: gcc sage haskell julia
- Other: rust cargo
- Libraries: cuda intel-mkl intel-tbb eigen opencv-cuda tensorflow-cuda
- PyLibs: numpy-mkl scipy-mkl
- # Lock screen
- This doesn't ACTUALLY work... just use .xinitrc:
- xfconf-query -c xfce4-session -p /general/LockCommand -s "i3lock -c 222222 -i "/media/hdd/Dropbox/DB Pictures/Wallpaper/0Lockscreen/000current.png" --create -t string
- Update using:
- xfconf-query -c xfce4-session -p /general/LockCommand -s "i3lock"
- **Current**:
- i3lock -k --indicator --datestr="%a %m-%d" --radius=120 --textsize=36 --datesize=20 --timecolor=112266cc --insidecolor=ffffff33 --linecolor=ffffff33 --ringcolor=ffffff77 --line-uses-inside --separatorcolor=ffffff77 -c 555555 -i /usr/share/backgrounds/000current.png
- xautolock -time 10 -notify 10 -corners 000- -resetsaver -locker "i3lock -k --indicator --datestr=\"%a %m-%d\" --radius=120 --textsize=36 --datesize=20 --timecolor=112266cc --insidecolor=ffffff33 --linecolor=ffffff33 --ringcolor=ffffff77 --line-uses-inside --separatorcolor=ffffff77 -c 555555 -i /usr/share/backgrounds/000current.png"
- works with i3lock-color-git
- Create blurred background file:
- convert "/media/hdd/Dropbox/DB Pictures/Wallpaper/0Lockscreen/000current_orig.jpg" -resize 1920x2000 -blur 0x5 "/media/hdd/Dropbox/DB Pictures/Wallpaper/0Lockscreen/000current.png"
- Use as follows:
- i3lock -c 222222 -i "/media/hdd/Dropbox/DB Pictures/Wallpaper/0Lockscreen/000current_blur.png"
- Blur current window:
- i3lock -i <(import -window root - | convert -blur -1x5 - png:-)
- Resize-blur current window:
- i3lock -i <(import -window root - | convert -scale 6.25% -filter Cubic -resize 1600% - png:-)
- Pixelate current window (fast):
- scrot /tmp/screen_locked.png
- mogrify -scale 10% -scale 1000% /tmp/screen_locked.png
- i3lock -i /tmp/screen_locked.png
- xautolock:
- xautolock -time 10 -resetsaver -locker "i3lock -c 222222 -i /usr/share/backgrounds/000current.png"
- # CURRENT
- ## Todo
- xautolock -notifier "screen_dim?.sh"
- Tiling Window Manager (on top of XFCE?):
- i3, i3-gaps, bspwm, awesome, sway, xmonad, dwm
- Alternatives to launchy:
- rofi, dmenu, krunner, albert, whisker-menu, synapse, gnome-do
- Moon Lockscreen
- Monitor backlight adjustment
- ## Terminal
- https://wiki.archlinux.org/index.php/General_recommendations#Console_improvements
- https://terminalsare.sexy/#terminal-emulation-applications
- Regular
- termite
- urxvt - Fast; Good on X11 systems?
- st - Fast; "simple"
- Hyper
- Terminator
- Pantheon
- Alacritty - GPU. No tabs: tmux recommended
- Pull-down/Dropdown terminal
- Tilda
- Terminal theming
- Powerline: https://www.youtube.com/watch?v=_D6RkmgShvU
- zsh, oh-my-zsh or antigen or prezto
- ## Custom Scripting
- day-mode
- night-mode
- switch-wallpapers
- drunk
- ## /r/unixp ideas
- Title: Don't drink and derive
- GIF: Pull down sage, derive, then switch to new tab and type "drunk" which causes screen to cycle through weird colors or make weird effects
- ## Backlit keyboard sddm
- # One of the following:
- xset led 3
- xset led on
- # And:
- xmodmap -e 'add mod3 = Scroll_Lock'
- ## External Monitor Backlight
- https://www.reddit.com/r/archlinux/comments/3mp6tl/how_to_control_screen_backlightbrightness/?st=j3jbjfmf&sh=97cacdcf
- https://bbs.archlinux.org/viewtopic.php?pid=1389005#p1389005
- https://bugzilla.kernel.org/show_bug.cgi?id=62941
- https://wiki.archlinux.org/index.php/backlight
- http://www.omgubuntu.co.uk/2017/05/adjust-external-monitor-brightness-ubuntu
- https://wiki.archlinux.org/index.php/Backlight#Other_utilities
- https://askubuntu.com/questions/476664/cannot-change-backlight-brightness-ubuntu-14-04
- /etc/default/grub
- GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi_backlight=vendor"
- GRUB_CMDLINE_LINUX_DEFAULT="quiet video.use_native_backlight=1"
- grub-mkconfig -o /boot/grub/grub.cfg
- "If you have an external monitor, and you're not using HDMI-CEC (which, if you don't recognize what that is, you aren't), there's no way for your computer to change your monitor's brightness. It doesn't matter what software you use."
- ... but apparently you can actually use DDC/CI
- sudo ddccontrol -p
- Detected monitors :
- No monitor supporting DDC/CI available.
- If your graphics card need it, please check all the required kernel modules are loaded (i2c-dev, and your framebuffer driver).
- Hmmm I tried `modprobe i2c-dev` but idk.
- Maybe just ask on /r/archlinux or something, if grub methods don't work.
- ## Software Monitor Backlight
- xrandr --output DVI-D-0 --brightness 1.0
- redshift -b 1.0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement