Advertisement
skullsherminator

ARCH LINUX

Feb 19th, 2017
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.91 KB | None | 0 0
  1. HOW TO INSTALL MINIMAL ARCH LINUX DESKTOP (USING I3, MATE, OPENBOX AND LIGHTDM)
  2.  
  3. # download ISO from https://archlinux.org/download/, mount and boot
  4. $ loadkeys pt-latin1
  5. # boot uses dhcpcd and wireed, test
  6. $ ping -c 3 www.google.com
  7.  
  8. # erase partition table
  9. $ sgdisk --zap-all /dev/sda
  10. # using cgdisk to create GPT (root, home, swap) partitions; alternative to fdisk (which creates MBR partitions)
  11. $ cgdisk /dev/sda
  12. 1 6.0 GiB Linux filesystem
  13. 2 1024MB GiB Linux filesystem
  14. 3 1024MB GiB Linux filesystem
  15. # create filesystems
  16. $ mkfs.ext4 /dev/sda1 ; mkfs.ext4 /dev/sda2
  17. $ mkswap /dev/sda3 ; swapon /dev/sda3
  18. # mount the partitions
  19. $ lsblk -f
  20. $ mount /dev/sda1 /mnt
  21. $ mkdir /mnt/home ; mount /dev/sda2 /mnt/home
  22.  
  23. # optionally select a mirror
  24. $ nano /etc/pacman.d/mirrorlist
  25. # install the base system
  26. $ pacstrap -i /mnt base base-devel
  27. # generate an fstab
  28. $ genfstab -U -p /mnt >> /mnt/etc/fstab
  29. $ nano /mnt/etc/fstab
  30.  
  31. # chroot and configure the base system
  32. $ arch-chroot /mnt /bin/bash
  33. # locale, uncomment 'en_US.UTF-8 UTF-8'
  34. $ nano /etc/locale.gen
  35. $ locale-gen
  36. $ echo LANG=en_US.UTF-8 > /etc/locale.conf
  37. $ export LANG=en_US.UTF-8
  38. # console font and keymap
  39. # nano /etc/vconsole.conf
  40. KEYMAP=pt-latin1
  41. FONT=lat9w-16
  42. # time zone
  43. $ ln -s /usr/share/zoneinfo/Europe/Lisbon /etc/localtime
  44. # hardware clock
  45. $ hwclock --systohc --utc
  46. # kernel modules '/etc/modules-load.d/*.conf', no need to set since all are loaded automatically by udev
  47. # hostname
  48. $ echo archlinux > /etc/hostname
  49.  
  50. # configure the network; wired using dhcpd (see 'ip link')
  51. $ systemctl enable dhcpcd@ens32.service
  52.  
  53. # generate kernel config
  54. $ nano /etc/mkinitcpio.conf
  55. $ mkinitcpio -p linux
  56.  
  57. # set the root password
  58. $ passwd
  59.  
  60. # install and configure a bootloader, using grub
  61. $ pacman -S grub
  62. $(ether BIOS) grub-install --target=i386-pc --recheck --force /dev/sda
  63. $(or UEFI) grub-install --target=x86_64-efi --efi-directory=$esp --bootloader-id=arch_grub --recheck
  64. $ grub-mkconfig -o /boot/grub/grub.cfg
  65.  
  66. # add users, see https://wiki.archlinux.org/index.php/users_and_groups
  67. $ useradd -m -G wheel -s /bin/bash
  68. $ passwd
  69. $ nano /etc/sudoers
  70. %sudo ALL=(ALL) ALL
  71.  
  72. # add openssh, see https://wiki.archlinux.org/index.php/Secure_Shell
  73. $ pacman -S openssh
  74. $ systemctl start sshd.service
  75. $ systemctl enable sshd.service
  76.  
  77. # change shell prompt, see https://wiki.archlinux.org/index.php/Color_Bash_Prompt
  78. $ cat ~/.bashrc
  79. PS1='\[\e[1;32m\][\u@\h \W]\$\[\e[0m\] '
  80.  
  81. # unmount the partitions and reboot
  82. $ exit ; reboot
  83.  
  84. # update system
  85. $ pacman -Syu
  86. # removing orphaned packages
  87. $ pacman -Rns $(pacman -Qtdq)
  88.  
  89. # install xorg and drivers
  90. $ pacman -S xf86-video-vmware | xf86-video-intel | nvidia nvidia-utils pangox-compat | xf86-video-ati (see https://wiki.archlinux.org/index.php/xorg)
  91. $ pacman -S xorg-server ttf-dejavu
  92. $ pacman -S xterm (or rxvt-unicode, see https://wiki.archlinux.org/index.php/rxvt-unicode)
  93. $ localectl set-x11-keymap pt
  94.  
  95. # install lightdm login/display manager, use F9 to change session
  96. $ pacman -S xorg-server-xephyr lightdm lightdm-gtk2-greeter
  97. $ systemctl enable lightdm.service
  98. # see https://wiki.archlinux.org/index.php/LightDM#Missing_icons_with_GTK_greeter
  99. $ pacman -S adwaita-icon-theme
  100. $ nano /etc/lightdm/lightdm-gtk-greeter.conf
  101. [greeter]
  102. theme-name = TraditionalGreen
  103. icon-theme-name = mate
  104. font-name = Sans 10
  105. background = /usr/share/backgrounds/mate/nature/Wood.jpg
  106.  
  107. # install desktops
  108. $ pacman -S i3 dmenu
  109. $ pacman -S mate mate-extra (or just 'mate-panel')
  110. $ pacman -S lxde (or just 'lxde-common openbox obconf obmenu lxappearance tint2')
  111. $ pacman -S xfce4 xfce4-goodies
  112. $ pacman -S cinnamon
  113. $ pacman -S gnome gnome-extra (or just 'gnome-shell')
  114. $ pacman -S kde (or just 'kdebase')
  115.  
  116. # generate openbox menus, see http://trizenx.blogspot.co.uk/2012/02/obmenu-generator.html
  117. $ yaourt obmenu-generator
  118. $ obmenu-generator -i -p
  119. $ openbox --reconfigure
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement