mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-01-25 23:11:02 +08:00
Merge pull request #28590 from Chao-zhi/patch-1
Chao-zhi has translated
This commit is contained in:
commit
5e8e9b404d
@ -1,290 +0,0 @@
|
|||||||
[#]: subject: "How to Install GNOME Desktop in Arch Linux [Complete Guide]"
|
|
||||||
[#]: via: "https://www.debugpoint.com/gnome-arch-linux-install/"
|
|
||||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
|
||||||
[#]: collector: "lkxed"
|
|
||||||
[#]: translator: "Chao-zhi"
|
|
||||||
[#]: reviewer: " "
|
|
||||||
[#]: publisher: " "
|
|
||||||
[#]: url: " "
|
|
||||||
|
|
||||||
How to Install GNOME Desktop in Arch Linux [Complete Guide]
|
|
||||||
======
|
|
||||||
|
|
||||||
**This guide explains the steps you need to install GNOME Desktop in Arch Linux.**
|
|
||||||
|
|
||||||
This guide has two parts. The first part deals with installing the base Arch system. The second part is installing the complete GNOME desktop environment on top of Arch Linux.
|
|
||||||
|
|
||||||
### What is the GNOME Desktop?
|
|
||||||
|
|
||||||
GNOME is a popular desktop environment that is a default desktop choice for many top-tier desktops-based Linux distributions such as Ubuntu and Fedora. Almost all flavors provide a GNOME desktop option.
|
|
||||||
|
|
||||||
The GNOME desktop is one of the stable and user-friendly desktops, hence it is preferred by many average, advanced users. If you want a desktop that remains invisible while you carry out your work, GNOME is the one. It never gets into your way while working. Hence it is still popular and default option for many despite many controversies about being GNOME3 (current iteration) being slow, resource-heavy, etc,
|
|
||||||
|
|
||||||
With all that said, let’s take a look at how you can install a GNOME desktop in bare metal Arch installations.
|
|
||||||
|
|
||||||
### Install GNOME Desktop in Arch Linux
|
|
||||||
|
|
||||||
#### Part 1: Install Arch Linux
|
|
||||||
|
|
||||||
If you have already Arch Linux installed, you can skip this step and directly go to the install GNOME Desktop section below.
|
|
||||||
|
|
||||||
For a quick Arch Linux base installation, follow the below steps. You can also visit [this guide][1] for a complete tutorial on how to install Arch Linux as Dual Boot or in a virtual machine.
|
|
||||||
|
|
||||||
The following steps are a straightforward legacy way of installing Arch. Follow the guide below for a more modern way of using the archinstall script. Once you are done, come back to resume GNOME installation via [step 2][2].
|
|
||||||
|
|
||||||
Modern method: Install using archinstall script (recommended)
|
|
||||||
|
|
||||||
##### Legacy method: Download Arch Linux
|
|
||||||
|
|
||||||
Download Arch Linux .iso from the below link. There are magnet and torrent links available. Once you download, write the ISO to a USB drive. And then boot from the drive.
|
|
||||||
|
|
||||||
[Download Arch Linux][3]
|
|
||||||
|
|
||||||
If you are planning to install it as a virtual machine image via GNOME Boxes, virt-manager – then you do not need to write it to a USB drive.
|
|
||||||
|
|
||||||
##### Boot and Configure Partitions
|
|
||||||
|
|
||||||
After you boot from the Arch Linux iso, you have to run a series of commands to install the base system.
|
|
||||||
|
|
||||||
First, run the below command to find out the device identifier.
|
|
||||||
|
|
||||||
```
|
|
||||||
fdisk -l
|
|
||||||
```
|
|
||||||
|
|
||||||
![fdisk -l before][4]
|
|
||||||
|
|
||||||
Then with the device identifier, run the below command to start partitioning your disk. Make sure to change `/dev/sda` as per your system.
|
|
||||||
|
|
||||||
```
|
|
||||||
cfdisk /dev/sda
|
|
||||||
```
|
|
||||||
|
|
||||||
Select `label type = dos` in the next prompt.
|
|
||||||
|
|
||||||
Select the free space and choose option NEW from the bottom. In this example, I will create three partitions as per below.
|
|
||||||
|
|
||||||
```
|
|
||||||
/dev/sda1 - 1G - for /boot/dev/sda2 - 5G - for root/dev/sda3 - 1G - for swap
|
|
||||||
```
|
|
||||||
|
|
||||||
![cfdisk][5]
|
|
||||||
|
|
||||||
In the next screen provide partition size for the boot partition (for this example, I gave 1 GB). Select it as the primary partition.
|
|
||||||
|
|
||||||
Repeat the same step for the main root partition of size 5GB.
|
|
||||||
|
|
||||||
![Swap partition type change][6]
|
|
||||||
|
|
||||||
Create a swap partition using the same steps with size 1G (you may change it as per your need). After you create the swap partition, make sure to choose Type at the bottom and mark it as a swap with the option “Linux Swap/Solaris”.
|
|
||||||
|
|
||||||
![final partition list in cfdisk][7]
|
|
||||||
|
|
||||||
Once done, write the changes to the disk using the Write option at the bottom. Make sure you take a backup before you write as this is a permanent change in your system.
|
|
||||||
|
|
||||||
Run the below command to check before you proceed. You can see in this example, three partitions are listed.
|
|
||||||
|
|
||||||
```
|
|
||||||
fdisk -l
|
|
||||||
```
|
|
||||||
|
|
||||||
![final partition list in fdisk][8]
|
|
||||||
|
|
||||||
Run the following commands in sequence to format and create an ext4 file system in the newly created partition above. Make sure you change the /dev/sda1 and /dev/sda2 as per your need.
|
|
||||||
|
|
||||||
```
|
|
||||||
mkfs.ext4 /dev/sda1mkfs.ext4 /dev/sda2mkswap /dev/sda3swapon /dev/sda3
|
|
||||||
```
|
|
||||||
|
|
||||||
After completion, mount the system and create necessary directories.
|
|
||||||
|
|
||||||
```
|
|
||||||
mount /dev/sda2 /mntmkdir /mnt/boot /mnt/var /mnt/homemount /dev/sda1 /mnt/boot
|
|
||||||
```
|
|
||||||
|
|
||||||
Again, make sure you change /dev/sda1, /dev/sda2 and /dev/sda3 as per your system.
|
|
||||||
|
|
||||||
![prepare file system][9]
|
|
||||||
|
|
||||||
##### Install the base system
|
|
||||||
|
|
||||||
I hope you are already connected to the internet. If not, try using a USB dongle or wired internet connection which Arch installer automatically configure and detect. If you do not have a wired connection available, follow [this guide][10] to configure a wireless or wifi network using Arch Linux installer.
|
|
||||||
|
|
||||||
Run the below commands in sequence to install the base system in the mounted partition. The download size is approx 400 MB.
|
|
||||||
|
|
||||||
```
|
|
||||||
pacman -Syypacstrap /mnt base base-devel linux linux-firmware nano dhcpcd net-tools grub
|
|
||||||
```
|
|
||||||
|
|
||||||
![Install base system][11]
|
|
||||||
|
|
||||||
Once complete, generate file system table without which you can’t boot the system.
|
|
||||||
|
|
||||||
```
|
|
||||||
genfstab -U /mnt >> /mnt/etc/fstab
|
|
||||||
```
|
|
||||||
|
|
||||||
##### Configure the base system
|
|
||||||
|
|
||||||
Follow the below commands in sequence to configure the base system. This involves setting up your locale, language, add a login user, and setting up the internet.
|
|
||||||
|
|
||||||
```
|
|
||||||
arch-chroot /mntnano /etc/locale.gen
|
|
||||||
```
|
|
||||||
|
|
||||||
Uncomment the locale of your choice by removing # at the beginning. For this guide, I have chosen en_US.UTF-8 UTF-8. Press CTRL+O, Enter, and CTRL+X to exit from nano.
|
|
||||||
|
|
||||||
![change locale][12]
|
|
||||||
|
|
||||||
Generate the locale using:
|
|
||||||
|
|
||||||
```
|
|
||||||
locale-gen
|
|
||||||
```
|
|
||||||
|
|
||||||
Setup the language using the below command.
|
|
||||||
|
|
||||||
```
|
|
||||||
echo LANG=en_US.UTF-8 > /etc/locale.confexport LANG=en_US.UTF-8
|
|
||||||
```
|
|
||||||
|
|
||||||
Setup the local time zone.
|
|
||||||
|
|
||||||
```
|
|
||||||
ln -s /usr/share/zoneinfo/America/New_York /etc/localtime
|
|
||||||
```
|
|
||||||
|
|
||||||
Again, you can choose them as per your need. You can list the local timezones via the below commands.
|
|
||||||
|
|
||||||
```
|
|
||||||
ls /usr/share/zoneinfo
|
|
||||||
ls /usr/share/zoneinfo/America
|
|
||||||
```
|
|
||||||
|
|
||||||
Setup the hardware clock, create a hostname, and enable the DHCP for the internet using the below commands in sequence. You can change `"arindam-pc"` to any hostname as per your desire.
|
|
||||||
|
|
||||||
```
|
|
||||||
hwclock --systohc --utcecho arindam-pc > /etc/hostnamesystemctl enable dhcpcd
|
|
||||||
```
|
|
||||||
|
|
||||||
The next step is to set up the root user password, create an admin user, and add the user in the sudoers file.
|
|
||||||
|
|
||||||
Follow the below commands in sequence. Make sure to change the user name from `debugpoint` to something else as per your need.
|
|
||||||
|
|
||||||
```
|
|
||||||
passwd rootuseradd -m -g users -G wheel -s /bin/bash debugpointpasswd debugpoint
|
|
||||||
```
|
|
||||||
|
|
||||||
![create user][13]
|
|
||||||
|
|
||||||
Open the sudoers file and add the below lines.
|
|
||||||
|
|
||||||
```
|
|
||||||
nano /etc/sudoers
|
|
||||||
```
|
|
||||||
|
|
||||||
Add below lines. As you already created the root user, the entry should be there.
|
|
||||||
|
|
||||||
```
|
|
||||||
root ALL=(ALL) ALLdebugpoint ALL=(ALL) ALL
|
|
||||||
```
|
|
||||||
|
|
||||||
![update sudoers file][14]
|
|
||||||
|
|
||||||
Install grub, setup the initial ramdisk environment, unmount the system using the below commands in sequence.
|
|
||||||
|
|
||||||
```
|
|
||||||
grub-install /dev/sdagrub-mkconfig -o /boot/grub/grub.cfgmkinitcpio -p linuxexit
|
|
||||||
```
|
|
||||||
|
|
||||||
![configure grub][15]
|
|
||||||
|
|
||||||
Then reboot your system. If you are isntalling in a physical system, unplug the USB media at this step.
|
|
||||||
|
|
||||||
```
|
|
||||||
umount /mnt/boot
|
|
||||||
umount /mnt
|
|
||||||
reboot
|
|
||||||
```
|
|
||||||
|
|
||||||
You have now successfully installed the Arch Linux base system. It’s time to install the complete GNOME desktop.
|
|
||||||
|
|
||||||
![Arch is installed][16]
|
|
||||||
|
|
||||||
#### Part 2: Install GNOME in Arch Linux
|
|
||||||
|
|
||||||
After reboot, choose Arch Linux from grub. In the Arch Linux prompt start running the following commands in sequence. These commands install Xorg server, display manager, GNOME desktop components, controller packages, and additional applications.
|
|
||||||
|
|
||||||
For all the commands use default, i.e. press enter when asked.
|
|
||||||
|
|
||||||
- **Install Xorg server. Approx install size is 80 MB.**
|
|
||||||
|
|
||||||
```
|
|
||||||
sudo pacman -S --needed xorg
|
|
||||||
```
|
|
||||||
|
|
||||||
- **Install display manager, GNOME desktop. Approx install size is 300 MB.**
|
|
||||||
|
|
||||||
```
|
|
||||||
sudo pacman -S --needed gnome gnome-tweaks nautilus-sendto gnome-nettool gnome-usage gnome gnome-multi-writer adwaita-icon-theme xdg-user-dirs-gtk fwupd arc-gtk-theme seahosrse gdm
|
|
||||||
```
|
|
||||||
|
|
||||||
The above installation would ask for several options for packages. Choose any of the ones you want. If you are unsure, choose jack, noto-sans and xdg-portal-desktop-gnome when asked.
|
|
||||||
|
|
||||||
- **Install applications**
|
|
||||||
|
|
||||||
This is just a reference. You can also install the ones you require.
|
|
||||||
|
|
||||||
```
|
|
||||||
sudo pacman -S --needed firefox vlc filezilla leafpad xscreensaver archlinux-wallpaper
|
|
||||||
```
|
|
||||||
|
|
||||||
Now it’s time to enable the display manager and network manager as service. So that next time you log on, they can run automatically by systemd.
|
|
||||||
|
|
||||||
```
|
|
||||||
systemctl enable gdm
|
|
||||||
systemctl enable NetworkManager
|
|
||||||
```
|
|
||||||
|
|
||||||
Reboot the system using the reboot command.
|
|
||||||
|
|
||||||
```
|
|
||||||
reboot
|
|
||||||
```
|
|
||||||
|
|
||||||
![Arch Linux Running GNOME 43 Desktop][17]
|
|
||||||
|
|
||||||
If all goes well, you should see a nice login prompt on the GNOME desktop. Login using the credential you just created. You should be greeted with a nice and clean GNOME 43 desktop in Arch Linux.
|
|
||||||
|
|
||||||
I hope this guide helps you to install GNOME desktop in a bare metal Arch instalation.
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
via: https://www.debugpoint.com/gnome-arch-linux-install/
|
|
||||||
|
|
||||||
作者:[Arindam][a]
|
|
||||||
选题:[lkxed][b]
|
|
||||||
译者:[Chao-zhi](https://github.com/Chao-zhi)
|
|
||||||
校对:[校对者ID](https://github.com/校对者ID)
|
|
||||||
|
|
||||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
|
||||||
|
|
||||||
[a]: https://www.debugpoint.com/author/admin1/
|
|
||||||
[b]: https://github.com/lkxed
|
|
||||||
[1]: https://www.debugpoint.com/2020/11/install-arch-linux/
|
|
||||||
[2]: https://www.debugpoint.com/archinstall-guide/
|
|
||||||
[3]: https://www.archlinux.org/download/
|
|
||||||
[4]: https://www.debugpoint.com/wp-content/uploads/2020/12/fdisk-l-before.jpg
|
|
||||||
[5]: https://www.debugpoint.com/wp-content/uploads/2020/12/cfdisk-1024x159.jpg
|
|
||||||
[6]: https://www.debugpoint.com/wp-content/uploads/2020/12/Swap-parition-type-change.jpg
|
|
||||||
[7]: https://www.debugpoint.com/wp-content/uploads/2020/12/final-partition-list-in-cfdisk-1024x178.jpg
|
|
||||||
[8]: https://www.debugpoint.com/wp-content/uploads/2020/12/final-partition-list-in-fdisk.jpg
|
|
||||||
[9]: https://www.debugpoint.com/wp-content/uploads/2020/12/prepare-file-system.jpg
|
|
||||||
[10]: https://www.debugpoint.com/2020/11/connect-wifi-terminal-linux/
|
|
||||||
[11]: https://www.debugpoint.com/wp-content/uploads/2020/12/Install-base-system-1024x205.jpg
|
|
||||||
[12]: https://www.debugpoint.com/wp-content/uploads/2020/12/change-locale.jpg
|
|
||||||
[13]: https://www.debugpoint.com/wp-content/uploads/2020/12/create-user.jpg
|
|
||||||
[14]: https://www.debugpoint.com/wp-content/uploads/2020/12/update-sudoers-file.jpg
|
|
||||||
[15]: https://www.debugpoint.com/wp-content/uploads/2020/12/configure-grub-1024x639.jpg
|
|
||||||
[16]: https://www.debugpoint.com/wp-content/uploads/2020/12/Arch-is-installed.jpg
|
|
||||||
[17]: https://www.debugpoint.com/wp-content/uploads/2020/12/Arch-Linux-Running-GNOME-43-Desktop-1024x636.jpg
|
|
@ -0,0 +1,303 @@
|
|||||||
|
[#]: subject: "How to Install GNOME Desktop in Arch Linux [Complete Guide]"
|
||||||
|
[#]: via: "https://www.debugpoint.com/gnome-arch-linux-install/"
|
||||||
|
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||||
|
[#]: collector: "lkxed"
|
||||||
|
[#]: translator: "Chao-zhi"
|
||||||
|
[#]: reviewer: " "
|
||||||
|
[#]: publisher: " "
|
||||||
|
[#]: url: " "
|
||||||
|
|
||||||
|
如何在 Arch Linux 中安装 GNOME 桌面 [完整指南]
|
||||||
|
======
|
||||||
|
|
||||||
|
**本指南解释了在 Arch Linux 中安装 GNOME 桌面所需的步骤。**
|
||||||
|
|
||||||
|
本指南有两部分。第一部分是关于安装基本的 Arch 系统。第二部分是在 Arch Linux 基础上安装完整的 GNOME 桌面环境。
|
||||||
|
|
||||||
|
### 什么是 GNOME 桌面?
|
||||||
|
|
||||||
|
GNOME 是一个流行的桌面环境,是许多基于桌面的顶级 Linux 发行版的默认桌面选择,如 Ubuntu 和 Fedora。几乎所有的口味都提供了一个 GNOME 桌面选项。
|
||||||
|
|
||||||
|
GNOME 桌面是稳定和用户友好的桌面之一,因此它被许多普通、高级用户所青睐。如果你想要一个在你进行工作时保持隐形的桌面,GNOME 就是这样的。它在工作时不会妨碍到你。因此,尽管有许多关于 GNOME3(目前的迭代)速度慢、资源重等的争议,它仍然是许多人的流行和默认选项。
|
||||||
|
|
||||||
|
说了这么多,让我们来看看如何在裸机 Arch 中安装 GNOME 桌面。
|
||||||
|
|
||||||
|
### 在 Arch Linux 中安装 GNOME 桌面
|
||||||
|
|
||||||
|
#### 第一部分:安装 Arch Linux
|
||||||
|
|
||||||
|
如果你已经安装了 Arch Linux,你可以跳过这一步,直接进入下面安装 GNOME 桌面部分。
|
||||||
|
|
||||||
|
要快速安装 Arch Linux 基础版,请遵循以下步骤。你也可以访问[该指南][1],了解如何将 Arch Linux 安装为双启动或在虚拟机中的完整教程。
|
||||||
|
|
||||||
|
本文下面介绍的步骤是安装 Arch 的传统方式。新手请按照下面的指南链接,以更现代的方式使用 archinstall 脚本。完成后,回来通过[步骤 2](#第二部分在-arch-linux-中安装-gnome) 继续 GNOME 安装。
|
||||||
|
|
||||||
|
[现代方法。使用 archinstall 脚本安装(推荐)][2]。
|
||||||
|
|
||||||
|
##### 传统的方法。下载 Arch Linux
|
||||||
|
|
||||||
|
从下面的链接下载 Arch Linux .iso。这里也提供磁力和种子链接。下载后,将 ISO 写入 USB 驱动器。然后从该驱动器启动。
|
||||||
|
|
||||||
|
[下载 Arch Linux][3]
|
||||||
|
|
||||||
|
如果你打算通过 GNOME Boxes、virt-manager 把它安装成一个虚拟机镜像--那么你就不需要把它写入 U 盘。
|
||||||
|
|
||||||
|
##### 启动和配置分区
|
||||||
|
|
||||||
|
从 Arch Linux iso 启动后,你必须运行一系列的命令来安装基本系统。
|
||||||
|
|
||||||
|
首先,运行下面的命令,找出设备标识符。
|
||||||
|
|
||||||
|
```
|
||||||
|
fdisk -l
|
||||||
|
```
|
||||||
|
|
||||||
|
![先 fdisk -l][4]
|
||||||
|
|
||||||
|
然后用设备标识符,运行下面的命令,开始对你的磁盘进行分区。请确保根据你的系统改变 `/dev/sda`。
|
||||||
|
|
||||||
|
```
|
||||||
|
cfdisk /dev/sda
|
||||||
|
```
|
||||||
|
|
||||||
|
在下一个提示中选择 `label type = dos`。
|
||||||
|
|
||||||
|
选择自由空间,并从底部选择新的选项。在这个例子中,我将创建三个分区,如下图所示。
|
||||||
|
|
||||||
|
```
|
||||||
|
/dev/sda1 - 1G - for /boot
|
||||||
|
/dev/sda2 - 5G - for root
|
||||||
|
/dev/sda3 - 1G - for swap
|
||||||
|
```
|
||||||
|
|
||||||
|
![cfdisk][5]
|
||||||
|
|
||||||
|
在下一个屏幕中,提供引导分区的分区大小(在这个例子中,我给出了 1GB)。选择它作为主分区。
|
||||||
|
|
||||||
|
对大小为 5GB 的主根分区重复同样的步骤。
|
||||||
|
|
||||||
|
![交换分区类型改变][6]
|
||||||
|
|
||||||
|
用同样的步骤创建一个大小为 1G 的交换分区(你可以根据你的需要改变它)。创建交换分区后,确保在底部选择类型,并将其标记为 "Linux Swap/Solaris "选项的交换分区。
|
||||||
|
|
||||||
|
![cfdisk 中的最终分区列表][7]
|
||||||
|
|
||||||
|
一旦完成,使用底部的写入选项将变化写入磁盘。确保你在写入前做了备份,因为这是你系统中的一个永久性变化。
|
||||||
|
|
||||||
|
在你继续之前,运行下面的命令来检查。你可以看到在这个例子中,有三个分区被列出。
|
||||||
|
|
||||||
|
```
|
||||||
|
fdisk -l
|
||||||
|
```
|
||||||
|
|
||||||
|
![fdisk 中的最终分区列表][8] 。
|
||||||
|
|
||||||
|
依次运行下面的命令,在上面新创建的分区中格式化并创建一个 ext4 文件系统。请确保你根据你的需要改变 `/dev/sda1` 和 `/dev/sda2`。
|
||||||
|
|
||||||
|
```
|
||||||
|
mkfs.ext4 /dev/sda1
|
||||||
|
mkfs.ext4 /dev/sda2
|
||||||
|
mkswap /dev/sda3
|
||||||
|
swapon /dev/sda3
|
||||||
|
```
|
||||||
|
|
||||||
|
完成后,装载系统并创建必要的目录。
|
||||||
|
|
||||||
|
```
|
||||||
|
mount /dev/sda2 /mnt
|
||||||
|
mkdir /mnt/boot /mnt/var /mnt/home
|
||||||
|
mount /dev/sda1 /mnt/boot
|
||||||
|
```
|
||||||
|
|
||||||
|
同样,确保你根据你的系统改变 `/dev/sda1`、`/dev/sda2` 和 `/dev/sda3`。
|
||||||
|
|
||||||
|
![准备文件系统][9]
|
||||||
|
|
||||||
|
##### 安装基础系统
|
||||||
|
|
||||||
|
我希望你已经连接到互联网了。如果没有,请尝试使用 USB 加密狗或 Arch 安装程序自动配置和检测的有线网络连接。如果你没有可用的有线连接,请按照[该指南][10] 使用 Arch Linux 安装程序配置一个无线或 wifi 网络。
|
||||||
|
|
||||||
|
依次运行下面的命令,将基本系统安装到已安装的分区中。下载的大小约为 400MB。
|
||||||
|
|
||||||
|
```
|
||||||
|
pacman -Syy
|
||||||
|
pacstrap /mnt base base-devel linux linux-firmware nano dhcpcd net-tools grub
|
||||||
|
```
|
||||||
|
|
||||||
|
![安装基本系统][11]
|
||||||
|
|
||||||
|
一旦完成,就会生成文件系统表,没有它你就无法启动系统。
|
||||||
|
|
||||||
|
```
|
||||||
|
genfstab -U /mnt >> /mnt/etc/fstab
|
||||||
|
```
|
||||||
|
|
||||||
|
##### 配置基础系统
|
||||||
|
|
||||||
|
依次按照下面的命令来配置基本系统。这涉及到设置你的地域、语言、添加一个登录用户,以及设置互联网。
|
||||||
|
|
||||||
|
```
|
||||||
|
arch-chroot /mnt
|
||||||
|
nano /etc/locale.gen
|
||||||
|
```
|
||||||
|
|
||||||
|
去掉开头的 #,取消对你所选择的 locale 的注释。在本指南中,我选择了 en_US.UTF-8 UTF-8. 按 CTRL+O、Enter 和 CTRL+X 退出 nano。
|
||||||
|
|
||||||
|
![本地化][12]
|
||||||
|
|
||||||
|
使用以下方法生成 locale。
|
||||||
|
|
||||||
|
```
|
||||||
|
locale-gen
|
||||||
|
```
|
||||||
|
|
||||||
|
如果你不想手动去 `/etc/locale.gen` 设置语言,也可以使用以下命令设置语言。
|
||||||
|
|
||||||
|
```
|
||||||
|
echo LANG=en_US.UTF-8 > /etc/locale.conf
|
||||||
|
export LANG=en_US.UTF-8
|
||||||
|
```
|
||||||
|
|
||||||
|
设置当地的时区。
|
||||||
|
|
||||||
|
```
|
||||||
|
ln -s /usr/share/zoneinfo/America/New_York /etc/localtime
|
||||||
|
```
|
||||||
|
|
||||||
|
同样,你可以根据你的需要来选择它们。你可以通过以下命令列出当地的时区。
|
||||||
|
|
||||||
|
```
|
||||||
|
ls /usr/share/zoneinfo
|
||||||
|
ls /usr/share/zoneinfo/America
|
||||||
|
```
|
||||||
|
|
||||||
|
设置硬件时钟,创建一个主机名,并使用以下命令依次启用互联网的 DHCP。你可以根据你的愿望,将 `"arindam-pc"` 改为任何主机名。
|
||||||
|
|
||||||
|
```
|
||||||
|
hwclock --systohc --utc
|
||||||
|
echo arindam-pc > /etc/hostname
|
||||||
|
systemctl enable dhcpcd
|
||||||
|
```
|
||||||
|
|
||||||
|
下一步是设置根用户的密码,创建一个管理员用户,并在 sudoers 文件中添加该用户。
|
||||||
|
|
||||||
|
依次按照下面的命令进行操作。请确保根据你的需要将用户名从 `debugpoint` 改为其他名称。
|
||||||
|
|
||||||
|
```
|
||||||
|
passwd rootuseradd -m -g users -G wheel -s /bin/bash debugpointpasswd debugpoint
|
||||||
|
```
|
||||||
|
|
||||||
|
![创建用户][13]
|
||||||
|
|
||||||
|
打开 sudoers 文件,添加以下几行。
|
||||||
|
|
||||||
|
```
|
||||||
|
nano /etc/sudoers
|
||||||
|
```
|
||||||
|
|
||||||
|
添加以下几行。由于你已经创建了根用户,该条目应该在那里。
|
||||||
|
|
||||||
|
```
|
||||||
|
root ALL=(ALL) ALL
|
||||||
|
debugpoint ALL=(ALL) ALL
|
||||||
|
```
|
||||||
|
|
||||||
|
![更改 sudoer 文件][14]
|
||||||
|
|
||||||
|
安装 grub,设置初始 ramdisk 环境,依次使用下面的命令安装引导。
|
||||||
|
|
||||||
|
```
|
||||||
|
grub-install /dev/sda
|
||||||
|
grub-mkconfig -o /boot/grub/grub.cfg
|
||||||
|
mkinitcpio -p linux
|
||||||
|
exit
|
||||||
|
```
|
||||||
|
|
||||||
|
![配置 grub][15] 。
|
||||||
|
|
||||||
|
然后重新启动你的系统。如果你是在一个物理系统中安装的,在这一步要拔掉 USB 介质。
|
||||||
|
|
||||||
|
```
|
||||||
|
umount /mnt/boot
|
||||||
|
umount /mnt
|
||||||
|
reboot
|
||||||
|
```
|
||||||
|
|
||||||
|
你现在已经成功地安装了 Arch Linux 基本系统。现在是安装完整的 GNOME 桌面的时候了。
|
||||||
|
|
||||||
|
![Arch 安装好了][16]
|
||||||
|
|
||||||
|
#### 第二部分:在 Arch Linux 中安装 GNOME
|
||||||
|
|
||||||
|
重启后,从 grub 中选择 Arch Linux。在 Arch Linux 的提示符下,开始依次运行以下命令。这些命令安装 Xorg 服务器、显示管理器、GNOME 桌面组件、控制器包和其他应用程序。
|
||||||
|
|
||||||
|
所有的命令都使用默认值,即在要求时按回车。
|
||||||
|
|
||||||
|
- **安装 Xorg 服务器。安装大小约为 80MB。**
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo pacman -S --needed xorg
|
||||||
|
```
|
||||||
|
|
||||||
|
- **安装显示管理器,GNOME 桌面。安装大小约为 300MB。**
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo pacman -S --needed gnome gnome-tweaks nautilus-sendto gnome-nettool gnome-usage gnome gnome-multi-writer adwaita-icon-theme xdg-user-dirs-gtk fwupd arc-gtk-theme seahosrse gdm
|
||||||
|
```
|
||||||
|
|
||||||
|
上面的安装会要求提供几个软件包的选项。选择你想要的任何一个。如果你不确定,在询问时选择 jack、noto-sans 和 xdg-portal-desktop-gnome。
|
||||||
|
|
||||||
|
- **安装应用程序**
|
||||||
|
|
||||||
|
这只是一个参考。你也可以安装你所需要的。
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo pacman -S --needed firefox vlc filezilla leafpad xscreensaver archlinux-wallpaper
|
||||||
|
```
|
||||||
|
|
||||||
|
现在是时候把显示管理器和网络管理器作为服务启用了。这样,下次登录时,它们就可以由 systemd 自动运行。
|
||||||
|
|
||||||
|
```
|
||||||
|
systemctl enable gdm
|
||||||
|
systemctl enable NetworkManager
|
||||||
|
```
|
||||||
|
|
||||||
|
使用 reboot 命令重新启动系统。
|
||||||
|
|
||||||
|
```
|
||||||
|
reboot
|
||||||
|
```
|
||||||
|
|
||||||
|
![Arch Linux 运行 GNOME 43 桌面][17] 。
|
||||||
|
|
||||||
|
如果一切顺利,你应该在 GNOME 桌面上看到一个漂亮的登录提示。使用你刚刚创建的凭证登录。迎接你的应该是 Arch Linux 中漂亮而干净的 GNOME 43 桌面。
|
||||||
|
|
||||||
|
我希望这个指南能帮助你在裸机 Arch 安装 GNOME 桌面。
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
通过。https://www.debugpoint.com/gnome-arch-linux-install/
|
||||||
|
|
||||||
|
作者:[Arindam][a] 选题:[lkxed][b] 翻译者:[Chao-zhi](https://github.com/Chao-zhi)校对:[校对者ID](https://github.com/校对者ID)
|
||||||
|
|
||||||
|
本文由[LCTT](https://github.com/LCTT/TranslateProject)原创编译,[Linux中国](https://linux.cn/)荣誉推出
|
||||||
|
|
||||||
|
[a]: https://www.debugpoint.com/author/admin1/
|
||||||
|
[b]: https://github.com/lkxed
|
||||||
|
[1]: https://www.debugpoint.com/2020/11/install-arch-linux/
|
||||||
|
[2]: https://www.debugpoint.com/archinstall-guide/
|
||||||
|
[3]: https://www.archlinux.org/download/
|
||||||
|
[4]: https://www.debugpoint.com/wp-content/uploads/2020/12/fdisk-l-before.jpg
|
||||||
|
[5]: https://www.debugpoint.com/wp-content/uploads/2020/12/cfdisk-1024x159.jpg
|
||||||
|
[6]: https://www.debugpoint.com/wp-content/uploads/2020/12/Swap-parition-type-change.jpg
|
||||||
|
[7]: https://www.debugpoint.com/wp-content/uploads/2020/12/final-partition-list-in-cfdisk-1024x178.jpg
|
||||||
|
[8]: https://www.debugpoint.com/wp-content/uploads/2020/12/final-partition-list-in-fdisk.jpg
|
||||||
|
[9]: https://www.debugpoint.com/wp-content/uploads/2020/12/prepare-file-system.jpg
|
||||||
|
[10]: https://www.debugpoint.com/2020/11/connect-wifi-terminal-linux/
|
||||||
|
[11]: https://www.debugpoint.com/wp-content/uploads/2020/12/Install-base-system-1024x205.jpg
|
||||||
|
[12]: https://www.debugpoint.com/wp-content/uploads/2020/12/change-locale.jpg
|
||||||
|
[13]: https://www.debugpoint.com/wp-content/uploads/2020/12/create-user.jpg
|
||||||
|
[14]: https://www.debugpoint.com/wp-content/uploads/2020/12/update-sudoers-file.jpg
|
||||||
|
[15]: https://www.debugpoint.com/wp-content/uploads/2020/12/configure-grub-1024x639.jpg
|
||||||
|
[16]: https://www.debugpoint.com/wp-content/uploads/2020/12/Arch-is-installed.jpg
|
||||||
|
[17]: https://www.debugpoint.com/wp-content/uploads/2020/12/Arch-Linux-Running-GNOME-43-Desktop-1024x636.jpg
|
Loading…
Reference in New Issue
Block a user