archlinux xfce4 - RedFalsh/Wiki GitHub Wiki


###查看磁盘:

fdisk -l

###磁盘分区:

cfdisk /dev/sda

dos

/dev/sda1 1G linux boot

/dev/sda2 2G linux swap /solaris

/dev/sda3 37G linux

###查看分区:

fdisk -l

mkfs.ext4 /dev/sda1

mkswap /dev/sda2

swapon /dev/sda2

mkfs.ext4 /dec/sda3

###挂载:

mount /dev/sda3 /mnt

mkdir /mnt/boot /mnt/var mnt/home

mount /dev/sda1 /mnt/boot

###修改国内镜像源:

nano /etc/pacman.d/mirrorlist

####添加以下内容:

Server = http://mirrors.aliyun.com/archlinux/$repo/os/$arch

Server = http://mirrors.163.com/archlinux/$repo/os/$arch

###安装基本系统:

pacstrap /mnt base base-devel

###更新内核:

pacman -Syu

###安装引导工具grub:

pacstrap /mnt grub-bios

###生成fstab:

genfstab -p /mnt >> /mnt/etc/fstab

###转回到主目录:

arch-chroot /mnt

###配置时钟:

hwclock --systohc --utc

###创建初始内存盘:

mkinitcpio -p linux

mkinitcpio参考

###设置root密码:

passwd root

###添加用户:

useradd -m -g users -G wheel -s /bin/bash john

###设置用户密码:

passwd john

###安装到磁盘上

grub-install /dev/sda

grub-mkconfig -o /boot/grub/grub.cfg

grub参考

###退出:

exit

###重启:

reboot

###登录root:

root

###设置主机名称:

hostnamectl set-hostname archlinux

###查看IP:

ip addr

###打开dhcpcd

systemctl enable dhcpcd

systemctl start dhcpcd

ping www.google.com

###允许用户:

nano /etc/sudoers

root ALL=(ALL) ALL john ALL=(ALL) ALL

###安装xorg:

pacman -S xorg

xorg参考

###安装xorg工具: pacman -S xterm xorg-xclock xorg-twm xorg-xinit xorg-server-utils

###安装xfce4:

pacman -S xfce4

###安装完成重启:

reboot

###登录并进入界面:

startxfce4




#后面可参考安装 ###slim安装----图形登录界面 pacman -S slim slim-themes archlinux-themes-slim xdg-user-dirs

pacman -S systemctl enable slim.service

pwd

cp /etc/X11/xinit/xinitrc ~/.xinitrc

###修改启动文件

nano .xinitrc

#twn &

#...

#...

#..

exec xfce4-session

###修改slim配置:

nano /etc/slim.conf

###登录主题更换

current_theme archlinux-soft-grey

##注:安装完成后只能登录root,不知道为什么不能登录用户

###安装plasma桌面

plasma

pacman -S plasma kdebase

pacman -R plasma-mediacenter

pacman -S ttf-freefont

systemctl enable sddm

reboot

###ifconfig pacman -S net-tools dnsutils inetutils iproute2

###openssh sudo pacman -S openssh

systemctl enable sshd

systemctl start sshd

###yaourt: sudo nano /etc/pacman.conf

[archlinuxcn]

SigLevel = Optional TrustedOnly

Server = http://repo.archlinuxcn.org/$arch

sudo pacman -Sy yaourt fakeroot

###numix-themes:

pacman -S numix-themes

yaourt -S numix-circle

###Cairo-Dock

Cairo-Dock