Installation in Arch Linux virtual machine

Installation in Arch Linux virtual machine

Arch Linux image iso download address: Arch Linux

  1. Create a new virtual machine: In the wizard, select 100G for disk capacity and select storage as a single file.
  2. Set the upper virtual machine (M)–>Settings–>Options–>Advanced–>Firmware type: UEFI boot
  3. Open the virtual machine–>Select the first item [Arch Linux archiso x86_64 UEFI]
**按顺序输入并回车**
ping -c 3 www.baidu.com
fdisk /dev/sda
g
n
1
回车
+512M
n
2
回车
+4G
n
3
回车
回车
t
1
1
t
2
19
p
w
mkfs.fat -F32 /dev/sda1
mkswap /dev/sda2
mkfs.ext4 /dev/sda3
swapon /dev/sda2
mount /dev/sda3 /mnt
mkdir /mnt/boot
mount /dev/sda1 /mnt/boot
vim /etc/pacman.d/mirrorlist
pacman -Syy
pacstrap /mnt base linux linux-firmware
pacstrap /mnt networkmanager
genfstab -U /mnt >> /mnt/etc/fstab
arch-chroot /mnt
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
hwclock --systohc
pacman -S vim
vim /etc/locale.gen
去掉zh_CN.UTF-8 UTF-8和en_US.UTF-8 UTF-8前面的#号
locale-gen
echo LANG=en_US.UTF-8 > /etc/locale.conf
echo yangyili > /etc/hostname
vim /etc/hosts
*添加:*
	# Static table lookup for hostnames.
	# See hosts(5) for details.
	127.0.0.1   localhost
	::1         localhost
	127.0.1.1   yangyili.localdomain    yangyili
systemctl enable NetworkManager
passwd
pacman -S intel-ucode
pacman -S grub efibootmgr
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB
grub-mkconfig -o /boot/grub/grub.cfg
exit
umount -R /mnt
reboot
 
*安装完成*
 
**可选配置:**
更新系统:pacman -Syu
*添加用户:*
pacman -S sudo
EDITOR=vim visudo
找到# %wheel ALL=(ALL) ALL,%wheel前面的空格和#号去掉
useradd -m -G wheel 用户名
passwd 密码
reboot
安装gnome桌面环境:
sudo pacman -S wayland 
sudo pacman -S gnome gnome-extra
sudo systemctl enable gdm
sudo reboot
*安装中文字体:*
sudo pacman -S adobe-source-han-sans-cn-fonts
*装open vmware tools*
实现虚拟机和主机之间的相互拖拽文件和复制粘贴
sudo pacman -S open-vm-tools
systemctl enable vmtoolsd vmware-vmblock-fuse
sudo pacman -S gtkmm3
*安装Firefox浏览器*
sudo pacman -S firefox
sudo pacman -S firefox-i18n-zh-cn

Insert image description here
reference

Guess you like

Origin blog.csdn.net/u010100877/article/details/118554834