Archlinux Installation 思路整理

BabbleDay posted @ 2013年7月15日 20:34 in 不折腾会死 , 1663 阅读

Abstract: This is a record of archlinux installation with necessary commands. It provides the general idea of ARCHLINUX INSTALLATION which could be more comprehensible than wiki for newbies.

// Since I am a totally newbie~^0^~ It is always appreciated it you can pick out some mistakes in my article~

概要: 这是Arch Linux安装过程思路整理,是本人在安装过程中学习理解的整理,或许比wiki更适合新手快速获得直观的印象。
Without deep understanding of Arch Linux, you can just input the commands and get some kind of general understanding of what you have done.

 

  • U盘准备
        下载iso文件,写入U盘
        # dd bs=4M if=/path/to/archlinux.iso of=/dev/sdb
        // dd命令会覆盖原来所有的数据,注意备份神马的
  • 分区
        查看当前硬盘情况 # fdisk ls 或者 # lsblk    // fdisk是linux硬盘分区的工具,具体了解可以看实例解说fdisk
        进入硬盘执行各项操作 # fdisk /dev/sda
        m 帮助 d 删除分区 n 新建分区 p 显示当前分区情况 w 写入(执行此操作后才会把先前的分区动作写入硬盘) q 不保存退出 
  • 格式化
        将目标分区(以/dev/sda6为例)格式化为ext4的文件系统
        # mkfs.ext4 /dev/sda6
        或者 
        # mkfs -t ext4 /dev/sda6
  • 挂载到你的安装盘
        挂载:其实就是把一些存储介质(硬盘、U盘等)指定成文件系统中的某个目录,这样以后就可以直接访问这个目录而实现对这些介质的访问了
       # mount /dev/sda6 /mnt 
  • 连接网络
       我这里就直接用无线了~
       # wifi-menu 
  • 修改镜像
       镜像其实就是安装愿,安装的所有内容都来自某个服务器。在中国的话一般就选择163或ustc
       # vi /etc/pacman.d/mirrorlist  // 编辑服务器地址文件
       :%s/^S/#S/g   // 这里是vi的替换操作,注释掉不用的服务器地址,找到ustc取消注释 
  • 安装base到mnt
       # pacstrap /mnt base
        pacstrap是别人已经写好的脚本,我们使用它完成将archlinux的base部分装到我们的挂载目录下
  • 生成fstab
    The /etc/fstab file contains static filesystem information. It defines how storage devices and partitions are to be mounted and integrated into the overall system. 
    就是说fstab是文件系统相关的信息,我们需要生成它给操作系统使用
    # genfstab -p /mnt >> /mnt/etc/fstab
  • chroot
        chroot是change root directory,这里我们把当前目录/mnt作为根目录“/”,更多了解看理解chroot
       # arch-chroot /mnt 
  • 主机名,时区,编码
       # echo HOSTNAME > /etc/hostname
       # ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
       # echo LANG=en_US.UTF-8 > /etc/locale.conf
       # export LANG=en_US.UTF-8 //这里是设置locale preferences确定编码,否则终端可能无法显示中文字符
       取消/etc/locale.gen想使用的编码的注释,# locale-gen
  • mkinitcpio
        可以理解成mkinitcpio是一个创建启动时的基本系统的脚本
        # mkinitcpio -p linux 
  • 安装无线工具
       # pacman -S wireless_tools wpa_supplicant wpa_actiond dialog 
  • 安装启动导引GRUB
       这里的grub就是当你开机时到底是进入Windows还是Linux的那个选择界面
      # pacman -S grub-bios
       # grub-install --recheck /dev/sda
       # cp /usr/share/locale/en@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo
       # grub-mkconfig -o /boot/grub/grub.cfg
  • 为root创建密码
       # passwd
  • 退出chroot # exit
  • 取消挂载 # umount
  • 重新启动 # reboot

至此,基本的archlinux系统已经装好。接下来开始后续安装

  • 添加用户
    对于gnome3来说,纯root使用是不行的,必须建立一个普通用户来启动gnome3的图形界面
    # useradd -m -g users -s /bin/bash username
    # passwd username
    # pacman -S sudo // 把sudo顺便装了吧
  • 声卡
    # pacman -S alsa-utils
  • 安装X系统
    X.org是X Window System的良好实现,可以把X理解成在基本linux系统和图形界面之间的桥接
    # pacman -S xorg-server xorg-server-utils xorg-xinit
  • 显卡驱动
    本人使用的是N卡,大家根据情况安装自己的驱动
    # pacman -S nvidia-304xx
  • 触控板、字体
    # pacman -S xf86-input-synaptics // 安装触控板,具体的使用偏好可以在图形界面起来后在设置立调整
    # pacman -S wqy-microhei ttf-dejavu // 安装字体,前者是微软雅黑体,后者是一种流行的英文字体
  • 安装图形化界面Gnome3
    # pacman -S gnome 
    // gnome组里的成员有点多,但是能够满足基本的使用需求,我会选择安装(4 5 6 7 10 11 13 14 15 16 17 18 20 21 22 23 24 26 27 28 29 30 31 32 33 34 36)// 用gimp代替eog,这里有它的成员表(包括名字和主要功能)
  • 输入法ibus
    因为gnome3里已经将将ibus整合了,所以我就使用ibus。以前有用过fcitx,也很不错,不过现在安装后激活热键回和ibus冲突,令需一番调整
    # pacman -S ibus-libpinyin ibus-qt
    这之后,要在图形界面里添加中文输入:设置 -> 区域和语言 -> 输入源 -> 添加英文和中文
    注意把中文添在第二个,因为添加在第一个会默认掉,开不出来
  • 终端
    个人比较喜欢“挂科”guake所以没有装gnome-terminal
    # pacman -S guake
  • 开启需要的自启动
    # systemctl enable gdm.service // 开机自动启动图形化界面,不用输入startx。gdm已经在gnome中安装了,只要启动就好了
    # systemctl enable NetworkManager.service // 开启管理网络连接的NetworkManager
    # exec gnome-session // 可以暂时理解成启动gnome,但exec有较为复杂的意义,可以了解下linux exec的用法
  • 重启,登陆
    Bang! 可以使用你克奈的arch啦~~~
Avatar_small
SBI Retail 说:
2022年8月03日 17:55

SBI is the biggest public sector bank in India and in the recent times the bank has made huge progress with respect to the technology and making it one of the most advanced banks, where most of the services at the bank can be performed in online without the requirement of any bank official. Similar is the case with the net banking facility, SBI Retail An account holder of SBI can register for the internet banking facility with out the need of visiting the customer bank branch, but there are few things which needs to be fulfilled by the customer to register for the net banking facility from home or office to avail the online facilities like SBI ATM PIN generation, funds transfer, account transfer and more.

Avatar_small
Kar 10th SSLC Englis 说:
2022年9月18日 22:05

The Class 10th / SSLC students of Karnataka state can choose English is first language subject for English Medium students and Second language subject for Kannada Medium and other students under KSEEB, Kar 10th SSLC English Question Paper every student can download KAR 10th/ SSLC English Question Paper 2023 with important suggestions to getting a better score in all SA, FA, Term and annual final public examination tests conducted by Secondary Education Examination Board Bangalore.

Avatar_small
Pm kisan-gov-in Stat 说:
2022年10月26日 23:31

The Pradhan Mantri Kisan Samman Nidhi Yojana is a recognized government scheme developed for small and marginal farmers in India. The scheme aims at financing all farmers with Rs 6,000/- each year as income support. Pm kisan-gov-in Status Check The amount is offered in three installments, which are deposited in the beneficiary’s bank account. The scheme works under the Ministry of Agriculture and farmer’s welfare.

Avatar_small
11th Model Paper 202 说:
2023年2月10日 23:46

Class 11th Board Model Paper 2024 Every one of the students are right now sitting tight for the 11th test Model Paper to be Download, so need to reveal to you that as per the data got from the sources as of late, 11th Model Paper 2024 The board will deliver its 11th test Model Paper, realizing that it will be made accessible to you. So continue to check this post consistently. Board of Secondary Education is otherwise called The Educational board leads secondary school and transitional board tests each year.

Avatar_small
ipad und iphone sync 说:
2023年7月26日 04:14

Die Synchronisierung Ihres iPhones mit Ihrem PC ist die einfachste Methode, Inhalte zwischen Ihren Geräten zu teilen. Wenn Sie möchten, dass Ihr iPhone und ein PC dieselbe Musik, Bilder und Kontakte teilen, ist die Synchronisierung die beste Lösung. ipad und iphone synchronisieren Sie können jedoch Ihr iPhone mit Ihrem iPad synchronisieren, um sicherzustellen, dass beide Geräte dieselben Daten und Inhalte teilen. Öffnen Sie die Anwendung „Einstellungen“ Ihres iPhones, klicken Sie dann auf Ihre Apple-ID und wählen Sie die Option „iCloud“, um auf die Umschaltflächen neben den Dateitypen zu klicken.

Avatar_small
Assam 8th Class Tex 说:
2023年7月26日 23:52

SEBA Follows CBSE Curriculum These Textbooks are Updated as per the Syllabus Prescribed by Assam Board. Students of Assam Class Should follow Prescribed Textbooks while Preparing for Exam. Our Team Refer to the Respective Subject Textbook while Preparing the Final Important questions. Students Best Practice Study Materiel about Assam 8th Textbooks 2024 are the Fact that they are so Comprehensible that Assam 8th Class Textbook 2024 it does not require the aid of a Subject Literate.Board of Secondary Education, Assam commonly known as SEBA Regular organization High School Education, Assam State Textbook Production and Publication Corporation


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter