### Correct Usage of Arch Linux
2017-05-24 10:06
Talking about my journey of learning Linux, the time is actually not long. But I spent relatively little time and have already reached the point where I can use Linux as my desktop system.
The experience with Ubuntu made me a bit frustrated, and besides, it wasn't suitable for my computer. Then I learned about Debian, which is said to be stable and robust. This time I installed it with a hesitant mood. The installation process wasn't as smooth as Ubuntu's. I remember I encountered some problems, but they were solved. This installation of Debian satisfied me, and my computer was revived like new, no longer stuck. However, what could I do with Debian? Later I found that I did nothing. I didn't understand anything, and I could only use the mouse to click, right-click to view properties, and double-click to run executable files. This went on for a week or two (I only had half a day from school to touch the computer on weekends). One day, I saw the group discussing a distribution called Arch. Out of curiosity, I searched for it, and this was the beginning of my encounter with Arch.
The design concept of Arch Linux is lightweight and simple. This exactly suits my heart, and I started my Arch journey without hesitation. At that time, I didn't understand what the command line was. I followed the process of Arch Wiki for the installation. Although I didn't understand why, I succeeded in one installation. I felt a great sense of accomplishment when I saw the system I installed step by step by typing commands. Arch Wiki provides a one-stop service. The newly installed Arch has no desktop, but Arch Wiki provides detailed processes for desktop configuration and input method configuration. Checking my memory usage, with LXDE + 32-bit Arch Linux, my memory usage was only about 70 MB. I knew I found my true love this time, so I have been using Arch ever since. Also, thanks to my low-configured computer, otherwise I might have stayed with Ubuntu.
A
### Advantages of Using Arch Linux
Why do I recommend Arch Linux? For a novice, what are the advantages compared to other distributions?
Many people say Arch is too difficult, not suitable for novices, and not friendly to novices. But I don't think so. Difficulty is because you stand at a higher starting point, and this high starting point will make you progress faster and understand Linux faster. Arch has brought me such a learning experience. The time from me not knowing to knowing and then to teaching others is not long. Maybe someone will say I'm just a special case, then this article is for those who want to be special cases. Learning depends on yourself. As long as you have the heart, what can't you learn? Recently, many new people in the "Linux China - Novice Village" QQ group always ask for answers as soon as they come up, but they never think about what attempts they have made for this problem and whether they have the perseverance to persist in learning Linux.
The following are some reasons I think recommend Arch, which only represent my personal views:
Arch makes you start at a higher starting point, but correspondingly, you will need to be patient to learn, and you will learn faster
Arch Wiki is very rich, which is a sharp tool to solve problems when we encounter them. When encountering a problem, first search on Arch Wiki, which can basically solve it. This is much more reliable than the blogs or notes written by others found by search engines
Arch uses a rolling update method, so you don't need to consider the problem of reinstalling the system when upgrading it in the future
Arch, in addition to basic software packages, won't attach some redundant things, so your system is basically what you need
Arch's pacman is a very simple and efficient package management tool, helping you easily manage the system
Arch's AUR repository contains a large number of software packages, which can be built with just one makepkg command, very convenient
For the above reasons, I think Arch is actually suitable for novices.
First, it is more free than most other distributions; second, it doesn't have pre-installed graphical package management tools, which makes us have to complete most of our operations in the terminal. This will be a driving force and pressure for us to escape from the Windows mouse mode, because you can't do much with the mouse; finally, Arch Wiki has detailed instructions on how to configure most software packages and how to solve problems when encountering them, which must be a gospel for novices.
I recommend Arch actually puts myself in a relatively embarrassing situation (but in fact, the author doesn't think this is a dilemma. I fell in love with Arch at first sight and took Arch with great interest). Only in this way will your motivation be activated, overcome it, you will win yourself and gain skills. If you choose to give up, then maybe you are not suitable for this learning method.
E
### Conclusion
It can be said that my learning of Linux basically benefits from Arch's Wiki. It has solved many problems for me. I no longer have to search for answers like a headless fly. Of course, you can also refer to Arch Wiki when using other distributions, don't waste this precious resource. Also, if you really want to learn Linux, I recommend you read Linus's autobiography "just for fun" and Bird Brother's "Bird Brother's Linux Private Kitchen". Linus's autobiography will make you understand a small part of the story about Linux. What I did is also just for fun; and Bird Brother's book can be used as an introductory book. Bird Brother wrote it very detailed. Just read some selected parts. Finally, I wish everyone to move forward bravely in the next learning journey.
The above is the main text part. The following are some problems I encountered during the use of Arch. Some of these problems have been solved, and some are still unsolved.
### No ifconfig command after Arch Linux installation
Q: Many commands related to the network are not available, such as ifconfig, route, nslookup, etc. There is an error in variable setting. I can't find them even with root. What is the reason?
A: Previously, net-tools belonged to the base group and was automatically installed when base was installed. Now it doesn't belong to any group. These tools need to be installed separately. Among them, ifconfig and route are in the net-tools package, nslookup and dig are in the dnsutils package, ftp, telnet, etc. are in the inetutils package, and the ip command is in the iproute2 package.
pacman -S net-tools dnsutils inetutils iproute2
### Graphics card driver
This part of the content mainly comes from the ArchLinux official Wiki page:
First, determine the type of graphics card. The following command can see your graphics card information:
$ lspci | grep VGA
For Intel graphics card: # pacman -S xf86-video-intel
For Nvida display:
For closed-source driver:
# pacman -S nvidia
Note: If it is GeForce 6/7 series, please install nvidia-304xx
For open-source driver:
# pacman -S xf86-video-nouveau # pacman -S xf86-video-vesa
For AMD/ATI graphics card:
For closed-source driver: Refer to Arch Wiki / AMD Catalyst
For open-source driver:
pacman -S xf86-video-ati
### Input method (Fcitx)
Related Wiki: Wiki:
https://wiki.archlinux.org/index.php/Fcitx_(Simplified Chinese)
pacman -S fcitx
To get a good input experience (such as cursor following and displaying pre-edited strings) in gtk and qt programs and avoid some bugs that xim can't solve, please install the corresponding input method modules as needed: fcitx-gtk2, fcitx-gtk3, fcitx-qt4 and fcitx-qt5. If you want to install the Fcitx main program and related modules at one time, you can use this command:
pacman -S fcitx-im
Before using FCITX, some environment settings must be done first: If you use display managers such as KDM, GDM, LightDM, etc., add the following 3 lines in ~/.xprofile (create one if it doesn't exist). If you start with startx or Slim (that is, in the case of using.xinitrc), add in ~/.xinitrc:
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"
In addition, Fcitx provides a graphical configuration program. You can install them: kcm-fcitx (based on KDE's kcm), fcitx-configtool (based on gtk3)
To install other input methods on Fcitx: Pinyin input method: fcitx-sunpinyin; Wubi input method: fcitx-table-extra (which includes Cangjie and other input methods)
### Office software (WPS)
Since WPS only releases a 32-bit version, so if the ArchLinux system is 64-bit, you need to add the multilib repository. Uncomment the following two lines in the /etc/pacman.conf file:
Include = /etc/pacman.d/mirrorlist
Install WPS (originally called kingsoft-office)
yaourt -S wps-office
There may be the following error during the installation process (insufficient space in the temporary directory):
No space left on device ==> ERROR: A failure occurred in package(). Aborting... ==> ERROR: Makepkg was unable to build kingsoft-office. ==> Restart building kingsoft-office ?
The solution is to remount /tmp
mount -t tmpfs -o size=2200M tmpfs /opt/
If an error "The system is missing fonts..." occurs when opening the WPS application, you can download the corresponding fonts and put them in the ~/.fonts directory and then restart WPS.
### Virtual machine (VirtualBox)
When starting the operating system in VirtualBox, the following error may be encountered:
Kernel driver not installed (rc=-1908)
The following command can solve it:
sudo modprobe vboxdrv
### Video player (mplayer)
mplayer can be installed directly with pacman.
To make mplayer display subtitles correctly, the key is to make the encoding of the subtitle file consistent with the encoding used in the mplayer config. If the subtitle file encoding is gbk, then subcp=cp936; if the subtitle file encoding is utf-8, then subcp=utf8. If the subtitle file encoding is utf-8 and set to subcp=cp936, some garbled characters will appear. Another simpler method is to set it to subcp=enca:zh:ucs-2, and let enca be responsible for the encoding display of subtitles.
Modify ~/.mplayer/config:
font='文泉驿正黑'
subcp=enca:zh:ucs-2
Use the following command to manually load subtitles:
mplayer xxx.avi -sub xxxxx.srt
### Dictionary (stardict)
Stardict (StarDict) was developed by Hu Zheng. The current latest version is 3.0.5-1, released on June 28, 2014; you can see its information from here:
https://www.archlinux.org/packages/community/x86_64/stardict/ StarDict is a cross-platform international dictionary software! It is powerful and practical; functions such as "wildcard matching", "mouse word lookup", "fuzzy query" are highly favored! StarDict 3.0 version has added new functions such as full-text translation and network dictionary.
Stardict homepage:
http://www.stardict.org
Hu Zheng's homepage:
http://www.huzheng.org
Install stardict:
packman -S stardict
Stardict does not bring dictionaries by default, so after installing the software, you need to download and install the corresponding dictionaries; the installation of dictionaries is very simple. Go to the dictionary page to download the dictionary compressed package, decompress it, and put the dictionary directory in the /usr/share/stardict/dic/ directory. If the dic directory does not exist, you can create it manually.
Dictionary download:
http://abloz.com/huzheng/stardict-dic
Take "Langdao English-Chinese Dictionary" as an example, its download address is:
http://abloz.com/huzheng/stardict-dic/zh_CN/stardict-langdao-ec-gb-2.4.2.tar.bz2
wget
http://abloz.com/huzheng/stardict-dic/zh_CN/stardict-langdao-ec-gb-2.4.2.tar.bz2
tar -jxvf stardict-langdao-ec-gb-2.4.2.tar.bz2
mv stardict-langdao-ec-gb-2.4.2 /usr/share/stardict/dic/
Restart stardict to load the dictionary.
Author: Alien of the Earth
Link:
https://www.zhihu.com/people/diqiuyo/answers
[
Last edited by zzz19760225 on 2017-7-18 at 20:36 ]