Skip to content

Instantly share code, notes, and snippets.

@XMB5
Created January 5, 2019 03:10
Show Gist options
  • Save XMB5/5a118c33bf8664ec23df2b96082115e9 to your computer and use it in GitHub Desktop.
Save XMB5/5a118c33bf8664ec23df2b96082115e9 to your computer and use it in GitHub Desktop.
Arch Linux Install Guide
#download the arch linux ISO from https://www.archlinux.org/download/
#write the ISO onto an installation medium like a DVD or flash drive
#boot the server off of the installation medium
#now we install arch linux from the bootable medium
#based off of https://www.youtube.com/watch?v=f5MewjcSjDA
wget https://matmoul.github.io/archfi
sh archfi
Disk Partitions
Auto Partitions (gpt)
/dev/sda
yes
Back
Select Partitions and Install
select /dev/sda2 for boot device
select /dev/sda3 for swap device
select /dev/sda4 for root device
select none for home device
yes
format devices
yes
ext4 for boot
swap for swap
btrfs for root
Mount
Install Arch Linux pacstrap base
Config Arch Linux
Set Computer Name
#type computer name and press enter
Set Keyboard Layout
us
Set Locale
en_US
Set Time
America
New_York
Yes
Set root password
#type root password and press enter twice
Generate fstab
UUID
Bootloader
grub
Install grub
Install bootloader
/dev/sda
Back
Enable dhcpcd
Back
Unmount
Back
Exit
sudo shutdown now
#take out installation medium
#arch linux now installed
#now install ssh
#turn on the server
#wait for the "login:" prompt
#login as root with the root password from earlier
pacman -S openssh --noconfirm
nano /etc/ssh/sshd_config
#change "#PermitRootLogin prohibit-password" to "PermitRootLogin yes" (no quotes)
#ctrl-x, y, enter
systemctl enable sshd
systemctl start sshd
ip a
#find the server's IP address
#ctrl-d
#switch to the computer you will SSH to the server with
#in the following commands, replace IP_OF_SERVER with your server's IP address
#if you have not already generated an SSH key, run ssh-keygen
ssh-copy-id root@IP_OF_SERVER
#type root password from earlier and press enter
ssh root@IP_OF_SERVER
#type root password from earlier and press enter
nano /etc/ssh/sshd_config
#change "PermitRootLogin yes" to "#PermitRootLogin yes" (no quotes)
#ctrl-x, y, enter
systemctl restart sshd
#arch is now installed with ssh access with authentication through your public key
#colored bash prompt
echo "PS1='\[\033[01;31m\][\h\[\033[01;36m\] \W\[\033[01;31m\]]\$\[\033[00m\] '" > ~/.profile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment