timedatectl set-ntp true
To check the service status, use
timedatectl status
timedatectl set-timezone America/Los_Angeles
To manually set timezone
- If you don't know which one is near you issue this command
timedatectl list-timezones
- Or you know your location then type this command to find your location
timedatectl list-timezones | grep <name>
cfdisk
fdisk -l
for checking list disk
For home and base system
mkfs.ext4 /dev/sdX1
For swap partition
mkswap /dev/sdX2
For root partition
mount /dev/sdX1 /mnt
For home partition
mount /dev/sdX2 /mnt/home
For EFI Scheme, make sure directory
/boot/efi
is created then mount it
mount /dev/sdX3 /mnt/boot/efi
vim /etc/pacman.d/mirrorlist
sudo pacman-mirrors -g
choose your closet mirrors
pacstrap /mnt base base-devel linux linux-firmware ntfs-3g sudo vim grub os-prober netctl dialog wpa_supplicant dhcpcd ppp
Generate an fstab file use -U
genfstab -U /mnt >> /mnt/etc/fstab
Enable user in the wheel group to have sudo access by uncommenting this line # %wheel ALL=(ALL) ALL
ln -s /usr/bin/vim /usr/bin/vi
Change root into the new system
arch-chroot /mnt
Set the time zone*
ln -sf /usr/share/zoneinfo/America/Los_Angeles /etc/localtime
Run hwclock to generate /etc/localtime
hwclock --systohc
Uncomment en_US-UTF-8 YTF-8
in /etc/locale.gen
, and generate them with:
locale-gen
Create the locale.conf file, and set the LANG variable accordingly:
/etc/locale.conf
LANG=en_US.UTF-8
Create the hostname file:
/etc/hostname
myhostname
Add matching entries to hosts(5):
/etc/hosts
127.0.0.1 localhost
::1 localhost
127.0.1.1 myhostname.localdomain myhostname
mkinitcpio -P
Set the root password:
passwd
useradd -m john
usermod -aG wheel,audio,video,optical,power,storage john
For MBR Scheme
grub-install --target=i386-pc /dev/sdX
For EFI Scheme
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB
If you are planning to install Arch Linix on an external disk then put the --removable flag to the grub command on top
grub-mkconfig -o /boot/grub/grub.cfg
Because Grub will automatically detect Windows partition when generating grub config when using MBR, EFI need to make sure that grub is intalled inside the Windows boot partition
sudo systemctl start netctl
netctl enable profile
sudo systemctl enable [email protected]
To enable at boot
sudo systemctl start [email protected]
sudo pacman -Sy archlinux-keyring && sudo pacman -Syu