SHARE
TWEET

My Arch Installation List

muntoo Jul 6th, 2017 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Arch Installation Commands
  2.  
  3. https://wiki.archlinux.org/index.php/Installation_guide
  4. https://wiki.archlinux.org/index.php/General_recommendations
  5. https://www.youtube.com/watch?v=VwvHeFixpZY
  6. https://www.youtube.com/watch?v=lizdpoZj_vU
  7.  
  8.  
  9. # Backup
  10.  
  11. Backup SafeBoot MBR (from Linux Live USB):
  12.  
  13.     mount /dev/sdb1 /mnt (or whatever the desired flash drive address is)
  14.     dd if=/dev/sda of=/mnt/safeboot.mbr bs=512 count=1
  15.     umount /dev/sdb1
  16.  
  17. Restore SafeBoot MBR (from Linux Live USB):
  18.  
  19.     mount /dev/sdb1 /mnt
  20.     dd if=/mnt/safeboot.mbr of=/dev/sda bs=512 count=1
  21.     umount /dev/sdb1
  22.  
  23. Fix Windows MBR (from elevated Windows recovery):
  24.  
  25.     bootrec.exe /fixmbr
  26.     bootrec.exe /fixboot
  27.     bootrec.exe /rebuildbcd
  28.  
  29. # Pre-installation
  30.  
  31. ## Verify not UEFI
  32.  
  33.     ls /sys/firmware/efi/efivars
  34.  
  35. (If directory doesn't exist, system is probably in BIOS or CSM mode)
  36.  
  37. ## Check connection
  38.  
  39.     ping archlinux.org
  40.     ping -c 3 google.com
  41.  
  42. ## Time
  43.  
  44.     timedatectl set-ntp true
  45.     timedatectl status
  46.  
  47. ## Partition
  48.  
  49.     fdisk -l
  50.     cfdisk /dev/sda  (your choice of disk)
  51.         gpt
  52.         New Linux Filesystem
  53.         New Linux Swap (1.2x your RAM = 10GB?)
  54.  
  55. ## Make Filesystem and Mount
  56.  
  57.     mkfs.ext4 /dev/sda1
  58.     mount /dev/sda1 /mnt
  59.  
  60.     mkswap /dev/sda2
  61.     swapon /dev/sda2
  62.  
  63. # Installation
  64.  
  65. ## Edit mirrors (optional)
  66.  
  67.     /etc/pacman.d/mirrorlist
  68.  
  69. ## Install packages
  70.  
  71.     pacstrap /mnt base base-devel vim
  72.  
  73. # Configuration
  74.  
  75. ## Generate Fstab
  76.  
  77.     genfstab -U /mnt >> /mnt/etc/fstab
  78.  
  79.     vim /mnt/etc/fstab
  80.         Verify no errors. should be similar to fdisk -l drive list
  81.  
  82. ## Change root
  83.  
  84.     arch-chroot /mnt
  85.  
  86. ## Time zone
  87.  
  88.     ls /usr/share/zoneinfo
  89.     ln -sf /usr/share/zoneinfo/America/Vancouver /etc/localtime
  90.     hwclock --systohc --utc
  91.  
  92. ## Locale
  93.  
  94.     vim /etc/locale.gen
  95.         Uncomment en_US.UTF-8 UTF-8
  96.         # en_US ISO-8859-1 (Latin-1) is a single byte encoding so nah
  97.  
  98.     locale-gen
  99.  
  100. Then:
  101.  
  102.     vim /etc/locale.conf
  103.         LANG=en_US.UTF-8
  104.  
  105. Alternatively:
  106.  
  107.     echo LANG=en_US.UTF-8 > /etc/locale.conf
  108.  
  109. According to 2nd youtube video, we could also do:
  110.  
  111.     localectl set-locale LANG="en_US.UTF-8"
  112.  
  113. ## Set hostname
  114.  
  115.     echo PC-MORDOR-Arch > /etc/hostname
  116.  
  117.     vim /etc/hosts
  118.         Add 127.0.1.1   PC-MORDOR-Arch.localdomain  PC-MORDOR-Arch
  119.  
  120. ## Initramfs (optional)
  121.  
  122. Creating a new initramfs is usually not required, because mkinitcpio was run on installation of the linux package with pacstrap.
  123.  
  124.     mkinitcpio -p linux
  125.  
  126. ## Set root password
  127.  
  128. Different from user password!
  129.  
  130.     passwd
  131.  
  132. ## Bootloader
  133.  
  134. ### GRUB
  135.  
  136.     pacman -S install grub
  137.     grub-install --target=i386-pc --recheck /dev/sda
  138.     mkinitcpio -p linux                                 #optional????
  139.     grub-mkconfig -o /boot/grub/grub.cfg
  140.  
  141. ### Intel ucode
  142.  
  143. If you have an Intel CPU, install the intel-ucode package in addition, and enable microcode updates.
  144.  
  145.     pacman -S intel-ucode
  146.     grub-mkconfig -o /boot/grub/grub.cfg    # Regenerate after installing intel-ucode
  147.  
  148. ## Reboot
  149.  
  150.     exit
  151.     umount -R /mnt
  152.     reboot
  153.  
  154.     Remove USB
  155.  
  156. # Login
  157.  
  158. Username: root
  159. Password: [root password]
  160.  
  161. ## User account
  162.  
  163. (from youtube vid)
  164.  
  165.     useradd -m -g users -G wheel -s /bin/bash mulhaq
  166.     passwd mulhaq
  167.  
  168.     vim /etc/sudoers
  169.         Uncomment %wheel ALL=(ALL) ALL
  170.  
  171. ## Network
  172.  
  173.     ping test
  174.     ls /etc/netctl/examples
  175.     sudo cp /etc/netctl/examples/ethernet-dhcp /etc/netctl
  176.  
  177.     ip a
  178.     vim /etc/netctl/ethernet-dhcp
  179.         Change interface enp0s3 or something
  180.  
  181.     sudo netctl start ethernet-dhcp
  182.     sudo netctl enable ethernet-dhcp
  183.  
  184.     ping test
  185.  
  186. ## Verify up to date
  187.  
  188.     sudo pacman -Syu
  189.  
  190. ## Enable 32-bit multilib support
  191.  
  192.     sudo vim /etc/pacman.conf
  193.         Uncomment
  194.             [multilib]
  195.             Include = /etc/pacman.d/mirrorlist
  196.  
  197.     sudo pacman -Syu
  198.     # or sudo pacman -Syyu to refresh ALL package lists (including unchanged)
  199.  
  200. # Nvidia
  201.  
  202.     sudo pacman -S nvidia nvidia-utils lib32-nvidia-utils
  203.     reboot
  204.  
  205. NOTE If on VirtualBox, it cannot access graphics drivers, so do this instead:
  206.  
  207.     sudo pacman -S xf86-video-nouveau mesa lib32-mesa
  208.     reboot
  209.  
  210. ## Sound
  211.  
  212.     sudo pacman -S alsa-utils
  213.     alsamixer
  214.     Set gain to 0
  215.  
  216. # Xorg Packages
  217.  
  218.     sudo pacman -S xorg-server xorg-xinit xorg-apps
  219.  
  220. # Graphics/Desktop Manager
  221.     lspci -k | grep -A 2 -i "VGA"
  222.     sudo pacman -S virtualbox-guest-utils
  223.     sudo pacman -S xfce4
  224.  
  225.     cp /etc/X11/xinit/xinitrc ~/.xinitrc
  226.  
  227.     vim ~/.xinitrc
  228.         Comment out
  229.             twm &
  230.             xclock ...
  231.             xterm ...
  232.             xterm ...
  233.             exec xterm ...
  234.         Add
  235.             exec startxfce4
  236.  
  237. # Display manager
  238.  
  239.     sudo pacman -S sddm
  240.  
  241. ## Reboot
  242.  
  243.     reboot
  244.  
  245. ## Open DE
  246.  
  247.     startx
  248.  
  249. # Automatically startx?
  250.  
  251. ... [test on Windows VBox]
  252.  
  253.     cp /etc/skel/.bash_profile ~/.bash_profile
  254.  
  255.     vim ~/.bash_profile
  256.         Append:
  257.         if [ -z "$DISPLAY" ] && [ -n "$XDG_VTNR" ] && [ "$XDG_VTNR" -eq 1 ]; then
  258.           exec startx
  259.         fi
  260.  
  261. See also for multiple DEs: https://wiki.archlinux.org/index.php/Xinit#Switching_between_desktop_environments.2Fwindow_managers
  262.  
  263. # Optimization
  264.  
  265. ## SSD Lifetimes
  266.  
  267. https://wiki.archlinux.org/index.php/Solid_State_Drives
  268.  
  269. # Networking, Security
  270.  
  271. ## Firewall
  272.  
  273. iptables?
  274. Frontends: https://wiki.archlinux.org/index.php/Firewalls
  275.  
  276.     sudo pacman -S ufw
  277.     sudo ufw enable
  278.     sudo ufw status verbose
  279.     sudo systemctl enable ufw.service # startup with system
  280.     reboot
  281.     sudo ufw status verbose
  282.  
  283. # System service
  284.  
  285. ## Printing
  286.  
  287.     sudo pacman -S cups cups-pdf gtk3-print-backends
  288.  
  289. Change default location (/var/spool/cups-pdf/$USER) of PDF prints
  290.  
  291.     sudo vim /etc/cups/cups-pdf.conf
  292.         ...
  293.  
  294. Enable and start:
  295.  
  296.     systemctl start org.cups.cupsd.service
  297.     systemctl enable org.cups.cupsd.service
  298.  
  299. # Appearance
  300.  
  301. More here:
  302. https://wiki.archlinux.org/index.php/Category:Eye_candy
  303.  
  304. ## Fonts
  305.  
  306. https://wiki.archlinux.org/index.php/Fonts#Font_packages
  307.  
  308.     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
  309.  
  310. ## GTK+ and Qt themes
  311.  
  312. [todo]
  313.  
  314. More here:
  315. https://wiki.archlinux.org/index.php/Uniform_look_for_Qt_and_GTK_applications
  316.  
  317. # LTS, headers
  318.  
  319.     uname -r
  320.     sudo pacman -S linux-headers
  321.     sudo pacman -S linux-lts linux-lts-headers (not really needed but just in case...?)
  322.     reboot
  323.     uname -r    # verify not running LTS...
  324.  
  325. # Packages
  326.  
  327. List: https://wiki.archlinux.org/index.php/List_of_applications
  328.  
  329. Popular apps: https://docs.google.com/forms/d/1hBNZDVdj9kY1BBPb8xR3QI4yOt1xPi83p1aZPIQNHqQ/viewanalytics
  330.  
  331. Determine harddisk space usage:
  332.  
  333.     expac '%m\t%n' | sort -h
  334.  
  335. linux-headers linux-lts linux-headers-lts
  336. openssh
  337. qbittorrent qbittorrent-nox
  338.  
  339. Browsers: firefox, google-chrome
  340. Drivers: ntfs-3g
  341. Zipping: p7zip zip unzip gzip tar
  342.  
  343. Codecs: flac lame libmpeg2 libtheora libvorbis x264-git x265-hg xvidcore neroaac
  344. Communication: discord skypeforlinux
  345. File Manager: thunar
  346. Image viewers: viewnoir photoqt
  347. Multimedia: gimp imagemagick audacity vlc pulseaudio
  348. Screen locker: i3lock-color-git
  349. PDF:
  350.     zathura zathura-pdf-mupdf zathura-djvu          # Oooh has fancy config files + dark (like sumatra) and simplicity
  351.     foxitreader acroread
  352.     okular
  353.     fbreader
  354.     https://askubuntu.com/questions/472540/is-there-a-pdf-reader-allowing-me-to-change-background-color-of-arxiv-pdfs
  355. Fonts (favorite): ttf-monaco ttf-roboto
  356. Fonts (installed): noto-fonts
  357. 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
  358.  
  359. Laptops:
  360.     Power management
  361.  
  362. System maintenance: bleachbit bleachbit-git
  363. Malware: clamav, maldet, rkhunter
  364.  
  365. Scientific computing:
  366.     Anaconda2,3
  367.     numpy-mkl (2,3)
  368.     scipy-mkl
  369.     C++ MKL, etc libraries (see OpenCV docs)
  370.     CUDA
  371.  
  372. ## Programming
  373.  
  374. Editors: vim vim-plug neovim sublime-text-dev visual-studio-code atom lighttable slap
  375. Other: git mercurial tmux
  376.  
  377. Python: python python2 pip pip2 cython
  378. Build: gcc-fortran clang perl
  379. Desired: gcc sage haskell julia
  380. Other: rust cargo
  381.  
  382. Libraries: cuda intel-mkl intel-tbb eigen opencv-cuda tensorflow-cuda
  383. PyLibs: numpy-mkl scipy-mkl
  384.  
  385. # Lock screen
  386.  
  387. This doesn't ACTUALLY work... just use .xinitrc:
  388.  
  389.     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
  390.  
  391. Update using:
  392.  
  393.     xfconf-query -c xfce4-session -p /general/LockCommand -s "i3lock"
  394.  
  395. **Current**:
  396.  
  397.     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
  398.  
  399.     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"
  400.  
  401. works with i3lock-color-git
  402.  
  403. Create blurred background file:
  404.  
  405.     convert "/media/hdd/Dropbox/DB Pictures/Wallpaper/0Lockscreen/000current_orig.jpg" -resize 1920x2000 -blur 0x5 "/media/hdd/Dropbox/DB Pictures/Wallpaper/0Lockscreen/000current.png"
  406.  
  407. Use as follows:
  408.  
  409.     i3lock -c 222222 -i "/media/hdd/Dropbox/DB Pictures/Wallpaper/0Lockscreen/000current_blur.png"
  410.  
  411. Blur current window:
  412.  
  413.     i3lock -i <(import -window root - | convert -blur -1x5 - png:-)
  414.  
  415. Resize-blur current window:
  416.  
  417.     i3lock -i <(import -window root - | convert -scale 6.25% -filter Cubic -resize 1600% - png:-)
  418.  
  419. Pixelate current window (fast):
  420.  
  421.     scrot /tmp/screen_locked.png
  422.     mogrify -scale 10% -scale 1000% /tmp/screen_locked.png
  423.     i3lock -i /tmp/screen_locked.png
  424.  
  425. xautolock:
  426.  
  427.     xautolock -time 10 -resetsaver -locker "i3lock -c 222222 -i /usr/share/backgrounds/000current.png"
  428.  
  429. # CURRENT
  430.  
  431. ## Todo
  432.  
  433. xautolock -notifier "screen_dim?.sh"
  434. Tiling Window Manager (on top of XFCE?):
  435.     i3, i3-gaps, bspwm, awesome, sway, xmonad, dwm
  436. Alternatives to launchy:
  437.     rofi, dmenu, krunner, albert, whisker-menu, synapse, gnome-do
  438. Moon Lockscreen
  439. Monitor backlight adjustment
  440.  
  441. ## Terminal
  442.  
  443. https://wiki.archlinux.org/index.php/General_recommendations#Console_improvements
  444.  
  445. https://terminalsare.sexy/#terminal-emulation-applications
  446.  
  447. Regular
  448.     termite
  449.     urxvt - Fast; Good on X11 systems?
  450.     st - Fast; "simple"
  451.     Hyper
  452.     Terminator
  453.     Pantheon
  454.     Alacritty - GPU. No tabs: tmux recommended
  455.  
  456. Pull-down/Dropdown terminal
  457.     Tilda
  458.  
  459. Terminal theming
  460.     Powerline: https://www.youtube.com/watch?v=_D6RkmgShvU
  461.  
  462. zsh, oh-my-zsh or antigen or prezto
  463.  
  464.  
  465. ## Custom Scripting
  466.  
  467. day-mode
  468. night-mode
  469. switch-wallpapers
  470. drunk
  471.  
  472. ## /r/unixp ideas
  473.  
  474. Title: Don't drink and derive
  475. 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
  476.  
  477. ## Backlit keyboard sddm
  478.  
  479.     # One of the following:
  480.     xset led 3
  481.     xset led on
  482.  
  483.     # And:
  484.     xmodmap -e 'add mod3 = Scroll_Lock'
  485.  
  486.  
  487. ## External Monitor Backlight
  488.  
  489. https://www.reddit.com/r/archlinux/comments/3mp6tl/how_to_control_screen_backlightbrightness/?st=j3jbjfmf&sh=97cacdcf
  490. https://bbs.archlinux.org/viewtopic.php?pid=1389005#p1389005
  491. https://bugzilla.kernel.org/show_bug.cgi?id=62941
  492. https://wiki.archlinux.org/index.php/backlight
  493. http://www.omgubuntu.co.uk/2017/05/adjust-external-monitor-brightness-ubuntu
  494. https://wiki.archlinux.org/index.php/Backlight#Other_utilities
  495. https://askubuntu.com/questions/476664/cannot-change-backlight-brightness-ubuntu-14-04
  496.  
  497.     /etc/default/grub
  498.  
  499.     GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi_backlight=vendor"
  500.  
  501.     GRUB_CMDLINE_LINUX_DEFAULT="quiet video.use_native_backlight=1"
  502.  
  503.  
  504.     grub-mkconfig -o /boot/grub/grub.cfg
  505.  
  506. "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."
  507.  
  508. ... but apparently you can actually use DDC/CI
  509.  
  510.     sudo ddccontrol -p
  511.  
  512.     Detected monitors :
  513.     No monitor supporting DDC/CI available.
  514.     If your graphics card need it, please check all the required kernel modules are loaded (i2c-dev, and your framebuffer driver).
  515.  
  516. Hmmm I tried `modprobe i2c-dev` but idk.
  517.  
  518. Maybe just ask on /r/archlinux or something, if grub methods don't work.
  519.  
  520.  
  521. ## Software Monitor Backlight
  522.  
  523. xrandr --output DVI-D-0 --brightness 1.0
  524. redshift -b 1.0
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top