Last active
August 24, 2017 21:26
-
-
Save VassilisPallas/60dc20bdf0c7f391d79aa8d4cb8b3c93 to your computer and use it in GitHub Desktop.
Install Arch linux (Base Intall + OS Settings + Xfce)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# show the list of hard drivers | |
fdisk -l | |
# setup partitions (change /dev/sda to whatever your hard drive is) | |
fdisk /dev/sda | |
# blank out the hard drive | |
o | |
# create first partition (/) | |
n | |
# select primary | |
p | |
# partition number (/) | |
1 | |
# on first sector press enter | |
⏎ | |
# on last sector type the size you want | |
+30G | |
# if after the previous step shows a message that the partition contains ext4 signature type y, to remove it | |
# make this partition bootable | |
a | |
#====================================================================================== | |
# This is for swap. Because I have an SSD I skip that step, but it's up to you if you | |
# want to create a swap partition or not | |
# create swap partition | |
n | |
# select primary | |
p | |
# partition number (swap) | |
2 | |
# on first sector press enter | |
⏎ | |
# on last sector type the size you want | |
+2G | |
# set the type for that partition | |
type | |
# select swap number partition | |
2 | |
# partition type (82 is for swap) | |
82 | |
#====================================================================================== | |
# create second partition (/home) | |
n | |
# select primary | |
p | |
# partition number (/home) if you have a swap partition, the nuumber will be 3, otherwise it will be 2 | |
2 | |
# on first sector press enter | |
⏎ | |
# on last sector press enter to take the remained hard drive | |
⏎ | |
# finalize changes | |
w | |
# show hard drivers list to verify the changes | |
fdisk -l | |
# format OS partition | |
mkfs.ext4 /dev/sda1 | |
# format home partition (if you have a swap partition, the number will be 3, otherwise will be 2) | |
mkfs.ext4 /dev/sda2 | |
#====================================================================================== | |
# internet access set up | |
# check if you have an internet connection (8.8.8.8 is Google DNS Server) | |
ping 8.8.8.8 | |
# if you are getting replies you are ready to continue | |
#=============================== | |
# wired internet connection | |
# copy from the examples the ethernet-dhcp interface | |
cp /etc/netctl/examples/ethernet-dhcp /etc/netctl/ethernet-dhcp | |
# show interfaces | |
ip a | |
# change on file the eth0 with the wired interface | |
nano /etc/netctl/ethernet-dhcp | |
ip link set wired_interface up | |
dhcpcd | |
reboot | |
#=============================== | |
#=============================== | |
# wireless internet connection | |
# copy from the examples the wirelss-wpa interface (the SSID-Name is rooter's name) | |
cp /etc/netctl/examples/wirelss-wpa /etc/netctl/SSID-Name | |
# show interfaces | |
ip a | |
# on the file set ESSID value with SSID Name and the Key with the WPA password, and the wlan0 with the wireless interface | |
nano /etc/netctl/SSID-Name | |
ip link set wired_interface up | |
netctl start SSID-Name | |
reboot | |
#=============================== | |
#====================================================================================== | |
# mount OS partition | |
mount /dev/sda1 /mnt | |
# create home directory on mnt directory to mount the home partition | |
mkdir /mnt/home | |
# mount home partition | |
mount /dev/sda2 /mnt/home | |
# verify that the partition have mounted (on the bottom, you must see the mounted partitions | |
mount | |
# install the packages for arch linux distribution | |
pacstrap -i /mnt base base-devel | |
# on packages selection (both times) press enter to install all the packages and then accept the installation | |
⏎ | |
y | |
#create fstab file | |
genfstab -U -p /mnt >> /mnt/etc/fstab | |
# Synchronize pacman database and accept the installation | |
pacman -Syu | |
y | |
# get the fine-tunings of distribution install (now we are using ou installation to install the packages we want to) | |
arch-chroot /mnt | |
# install some (required and optional) packages -> optional packages are (openssh, linux-headers, linux-lts, linux-lts-headers) | |
# if you are installing arch on laptop (or if you have or want to add in the future a wireless card on your desktop) the packages (wpa_supplicant, wireless_tools and wpa_actiond) are required, otherwise are optional | |
pacman -S openssh grub-bios linux-headers linux-lts linux-lts-headers wpa_supplicant wireless_tools wpa_actiond | |
y | |
# edit locale file (remove # from the languages you want) WARNING: you must remove the # from the locales with .UTF-8 UTF-8 | |
nano /etc/locale.gen | |
# generate locale | |
locale-gen | |
# remove locale semantic link | |
rm /etc/localtime | |
# create semantic link for zone info (eg ln -s /usr/share/zoneinfo/Europe/Athens | |
ln -s /usr/share/zoneinfo/{continent}/{capital_city_name} /etc/localtime | |
# sync the clock | |
hwclock --systohc --utc | |
# create an initial ramdisk environment | |
mkinitcpio -p linux | |
# enable ssh (if you have installed it earlier) | |
systemctl enable sshd.service | |
# set password | |
passwd | |
# install grub | |
grub-install --target=i386-pc --recheck /dev/sda | |
cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo | |
# make grub configuration | |
grub-mkconfig -o /boot/grub/grub.cfg | |
# we are done with the entire proccess, so exit | |
exit | |
# unmount home | |
umount /mnt/home | |
# unmount OS | |
umount /mnt | |
# reboot to start the OS | |
reboot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#login as root | |
#check that everything is installed | |
df -h | |
# set locale (we set locale again because some applications will not run unless we do this | |
localectl set-locale LANG="en_US.UTF-8" | |
#====================================================================================== | |
# enable swap partition | |
# find swap partition (something like /dev/mapper/volgroup0-lv_swap or /dev/sda2) | |
fdisk -l | |
# device_node is the swap partition path (from the response copy the UUID) | |
mkswap device_node | |
# add the line: | |
# UUID=UUID_value none swap defaults 0 0 | |
# HINT: if for any reason you didn't copy the swap UUID type blkid to find it | |
nano /etc/fstab | |
#====================================================================================== | |
#====================================================================================== | |
# edit fstab only if you have a SSD | |
# add on OS partition and home partition the value discard next to rw | |
nano /etc/fstab | |
#====================================================================================== | |
# reboot to take advantage of these values (if after the reboot you don't have internet connection, just type dhcpcd) | |
reboot | |
# install network manager | |
pacman -Sy networkmanager network-manager-applet dialog | |
systemctl enable NetworkManager.service | |
# install x | |
#====================================================================================== | |
# install touchpad (only for touchpads or trackpads) | |
pacman -S xf86-input-libinput | |
y | |
#====================================================================================== | |
pacman -S xorg xorg-server xterm xorg-xclock xorg-twm xorg-xinit xorg-server-utils mesa | |
# config pacman to install 32 bit packages (remove # from mutlilib and from the include below it) | |
nano /etc/pacman.conf | |
# install default video card driver (for if nouveau-dri doesn't run try lib32-nouveau-dri | |
pacman -S xf86-video-nouveau nouveau-dri | |
# install sudo | |
pacman -Sy sudo | |
y | |
# remove # from %wheel ALL=(ALL) ALL | |
EDITOR=nano visudo | |
# create user account (user_name is your user name) | |
useradd -m -G wheel -s /bin/bash user_name | |
# set passwsord to user (user_name is your user name) | |
passwd user_name | |
# name our machine (host_name the name for your machine) | |
hostnamectl set-hostname host_name | |
# change grub timeout (change set timeout=5 to set timeout=x (two times) (x are the seconds, which must NOT be more that 3600) | |
nano /boot/grub/grub.cfg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exit | |
# login as user | |
# install slim | |
sudo pacman -S slim slim-themes archlinux-themes-slim xdg-user-dirs | |
# install xfce | |
sudo pacman -S xfce4 | |
# open xfce4 | |
startxfce4 | |
# create Trash, Documents, Desktop, Downloads, Music, Pictures, Public, Templates, Videos direcotries | |
sudo pacman -S ttf-dejavu | |
sudo pacman -S gvfs | |
# other settings | |
# install slim | |
sudo pacman -S slim | |
# install leafpad | |
sudo pacman -S leafpad | |
# install wget | |
sudo pacman -S wget | |
# install yaourt | |
sudo nano /etc/pacman.conf | |
# add the following repository at the bottom | |
[archlinuxfr] | |
SigLevel = Never | |
Server = http://repo.archlinux.fr/$arch | |
sudo pacman -Sy yaourt | |
# install google chrome | |
sudo pacman -S chromium | |
# start xfce4 automatically | |
sudo pacman -S xorg-xinit | |
leafpad .xserverrc | |
# text: | |
#=================================================== | |
#!/bin/sh | |
exec /usr/bin/Xorg -nolisten tcp "$@" vt$XDG_VTNR | |
#=================================================== | |
cp /etc/X11/xinit/xinitrc ~/.xinitrc | |
leafpad .xinitrc | |
# override text: | |
#=================================================== | |
xscreensaver & | |
exec startxfce4 | |
#=================================================== | |
leafpad .bash_profile | |
# append text: | |
#=================================================== | |
if [ -z "$DISPLAY" ] && [ -n "$XDG_VTNR" ] && [ "$XDG_VTNR" -eq 1 ]; then | |
exec startxfce4 | |
fi | |
#=================================================== | |
# install xfce4 goodies | |
sudo pacman -S xfce4-goodies | |
# install sound | |
sudo pacman -S alsa-tools alsa-utils | |
alsamixer | |
# on alsamixer press m and then add volume or navigate with key arrows. Exit with Esc | |
# init pacman key | |
sudo pacman-key --init | |
# alsa wheel volume | |
yaourt gvolwheel | |
# go to start menu and run program "gvolwheel" | |
sudo pacman -S gnome-alsamixer | |
# install skype | |
wget https://aur.archlinux.org/cgit/aur.git/snapshot/skypeforlinux-bin.tar.gz | |
tar zxf skypeforlinux-bin.tar.gz | |
cd skypeforlinux-bin | |
makepkg -s | |
sudo pacman -U /path/to/package/skypeforlinux-bin-xxxxxxx.pkg.tar.xz | |
# for sound you will be need the pulseaudio | |
sudo pacman -S pulseaudio | |
# install package manager | |
yaourt pamac-aur | |
# install java | |
# download jdk from http://www.oracle.com/technetwork/java/javase/downloads/index.html | |
tar -zxvf jdk-xxxxx.tar.gz | |
sudo mv jdk1xxxx /opt/java | |
chmod +x /opt/java/bin | |
chomd +x -R /opt/java | |
nano /etc/profile.d/java.sh | |
# write | |
export J2SDKDIR=/opt/java | |
export J2REDIR=$J2SDKDIR/jre | |
export JAVA_HOME=/opt/java | |
#=================================================== | |
nano /etc/profile.d/oraclejdk8.csh | |
# write | |
setenv J2SDKDIR=/opt/java | |
setenv J2REDIR=$J2SDKDIR/jre | |
setenv JAVA_HOME=/opt/java | |
#=================================================== | |
nano ~/.bashrc | |
# write | |
export PATH="$JAVA_HOME/bin:$PATH" | |
#=================================================== | |
source ~/.bashrc | |
# unzip zip and rar files | |
pacman -S file-roller p7zip zip unzip unrar | |
# customize ui | |
https://www.youtube.com/watch?v=dxaxFZyBQbc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment