Howto install archlinux: Difference between revisions
Mandulete1 (talk | contribs) m (Protected "Howto install archlinux" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))) |
|||
(14 intermediate revisions by one other user not shown) | |||
Line 36: | Line 36: | ||
enable ssh connection for remote access: | enable ssh connection for remote access: | ||
systemctl start sshd | systemctl start sshd | ||
update root password: | |||
passwd root | |||
connect from your machine to archlinux: | connect from your machine to archlinux: | ||
ssh root@192.168.75.88 | ssh root@192.168.75.88 | ||
Line 79: | Line 81: | ||
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=ARCHLINUX /dev/vda | grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=ARCHLINUX /dev/vda | ||
grub-mkconfig -o /boot/grub/grub.cfg | grub-mkconfig -o /boot/grub/grub.cfg | ||
= configure desktop = | |||
on first boot configure network: | |||
ip addr add 192.168.75.88/24 dev enp1s0 | |||
ip link set up enp1s0 | |||
ip route add default via 192.168.75.1 | |||
install networkmanager: | |||
pacman -S networkmanager | |||
active and enable networkmanager: | |||
systemctl start NetworkManager | |||
systemctl enable NetworkManager | |||
configure networkmanager: | |||
nmcli con add con-name enp1s0 ifname enp1s0 ipv4.method manual ipv4.address 192.168.75.88/24 ipv4.gateway 192.168.75.1 ipv4.dns 4.2.2.1,4.2.2.2 type ethernet autoconnect yes | |||
configure sshd: | |||
pacman -S openssh | |||
add user to sudoers file: | |||
echo "user ALL=(ALL) PASSWD: ALL" >> /etc/sudoers | |||
active and enable ssh: | |||
systemctl start sshd | |||
systemctl enable sshd | |||
install gnome-shell: | |||
pacman -S gnome-shell gdm gnome-terminal firefox git base-devel xorg-auth xorg | |||
start and enable gdm: | |||
systemctl enable gdm | |||
systemctl start gdm | |||
= configure remote connection = | |||
installing yay: | |||
su - user | |||
git clone https://aur.archlinux.org/yay.git | |||
cd yay | |||
makepkg -si | |||
install nomachine: | |||
yay -S nomachine | |||
edit file "/usr/NX/etc/server.cfg", set "StartNXDaemon" to "Automatic": | |||
StartNXDaemon Automatic | |||
then restart nxserver service: | |||
systemctl restart nxserver | |||
from your desktop computer or another computer install nomachine client: | |||
* for windows: | |||
https://download.nomachine.com/download/7.7/Windows/nomachine_7.7.4_1.exe | |||
* for mac: | |||
https://download.nomachine.com/download/7.7/MacOSX/nomachine_7.7.4_1.dmg | |||
* for linux .rpm: | |||
https://download.nomachine.com/download/7.7/Linux/nomachine_7.7.4_1_x86_64.rpm | |||
* for linux .deb: | |||
https://download.nomachine.com/download/7.7/Linux/nomachine_7.7.4_1_amd64.deb | |||
= references = | |||
* https://wiki.archlinux.org/title/Installation_guide |
Latest revision as of 15:18, 17 January 2022
download and create archlinux usb
download latest archlinux iso:
http://ftp.osuosl.org/pub/archlinux/iso/latest
create a live usb of archlinux:
dd if=/home/carlito/Desktop/isos/archlinux-2022.01.01-x86_64.iso of=/dev/sdb bs=4M status=progress
if you're using windows download etcher to create the live usb:
https://www.balena.io/etcher
boot the computer with the live usb and select Boot Arch Linux (x86_64):
create partitions
list all the disk and partitions on your system:
fdisk -l
select the disk you are going to format and partition:
parted /dev/vda
inside parted use the following commands:
mklabel gpt mkpart primary 1 1G mkpart primary 1G 100% set 1 boot on set 1 bios_grub on quit
format partitions:
mkfs.fat -F32 /dev/vda1 mkfs.ext4 /dev/vda2
configure network
configure your network interface:
ip addr add 192.168.75.88/24 dev enp1s0 ip route add default via 192.168.75.1
configure nameservers in /etc/resolv.conf:
nameserver 4.2.2.1 nameserver 4.2.2.2
if you have wifi you need to configure the following:
wpa_passphrase your-wifi-ssid your-wifi-password > /etc/wpa_supplicant.conf wpa_supplicant -D wext -i wlan0 -c /etc/wpa_supplicant.conf & dhclient wlan0
enable ssh
enable ssh connection for remote access:
systemctl start sshd
update root password:
passwd root
connect from your machine to archlinux:
ssh root@192.168.75.88
mount partitions
create mount directory:
mkdir /mnt/arch
mount partitions:
mount /dev/vda2 /mnt/arch
create boot mount directory:
mkdir /mnt/arch/boot
mount boot partition:
mount /dev/vda1 /mnt/arch/boot
install archlinux
use pacstrap script to install all the necessary packages:
pacstrap /mnt/arch base linux linux-firmware vim nano
define disk partitions mounted into the filesystem:
genfstab -U /mnt/arch >> /mnt/arch/etc/fstab
use arch-chroot and enter the mounted disk as root:
arch-chroot /mnt/arch
list timezones:
timedatectl list-timezones
configure timezone:
timedatectl set-timezone America/Puerto_Rico
edit /etc/locale.gen to set the language, numbering, date and currency formats for your system:
en_US.UTF-8 UTF-8
generate the locale config in /etc directory file using the below commands:
locale-gen echo "LANG=en_US.UTF-8" > /etc/locale.conf export LANG=en_US.UTF-8
set hostname:
echo archlinux > /etc/hostname
modify /etc/hosts:
127.0.0.1 localhost 192.168.75.88 archlinux
set root password:
passwd root
create normal user:
useradd -m user passwd user
install and configure grub using the following commands:
pacman -S grub efibootmgr grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=ARCHLINUX /dev/vda grub-mkconfig -o /boot/grub/grub.cfg
configure desktop
on first boot configure network:
ip addr add 192.168.75.88/24 dev enp1s0 ip link set up enp1s0 ip route add default via 192.168.75.1
install networkmanager:
pacman -S networkmanager
active and enable networkmanager:
systemctl start NetworkManager systemctl enable NetworkManager
configure networkmanager:
nmcli con add con-name enp1s0 ifname enp1s0 ipv4.method manual ipv4.address 192.168.75.88/24 ipv4.gateway 192.168.75.1 ipv4.dns 4.2.2.1,4.2.2.2 type ethernet autoconnect yes
configure sshd:
pacman -S openssh
add user to sudoers file:
echo "user ALL=(ALL) PASSWD: ALL" >> /etc/sudoers
active and enable ssh:
systemctl start sshd systemctl enable sshd
install gnome-shell:
pacman -S gnome-shell gdm gnome-terminal firefox git base-devel xorg-auth xorg
start and enable gdm:
systemctl enable gdm systemctl start gdm
configure remote connection
installing yay:
su - user git clone https://aur.archlinux.org/yay.git cd yay makepkg -si
install nomachine:
yay -S nomachine
edit file "/usr/NX/etc/server.cfg", set "StartNXDaemon" to "Automatic":
StartNXDaemon Automatic
then restart nxserver service:
systemctl restart nxserver
from your desktop computer or another computer install nomachine client:
- for windows:
https://download.nomachine.com/download/7.7/Windows/nomachine_7.7.4_1.exe
- for mac:
https://download.nomachine.com/download/7.7/MacOSX/nomachine_7.7.4_1.dmg
- for linux .rpm:
https://download.nomachine.com/download/7.7/Linux/nomachine_7.7.4_1_x86_64.rpm
- for linux .deb:
https://download.nomachine.com/download/7.7/Linux/nomachine_7.7.4_1_amd64.deb