Author: redguardtoo)
Note: I will maintain this article for a long time. Please refer to the following update time
Updated on:
Original date:
I have been using Linux desktop on my PC for five years (it takes a long time to use Linux at work), and I have deeply realized the benefits of Linux Desktop.
I am an engineer, computer geek, and attach great importance to efficiency. For a typical user like me, Linux Desktop provides me with a rich and powerful tool that enables me to work and entertain efficiently.
Although Linux is the most convenient and powerful operating system I use today (I have experience with windows and OS X), there is no perfect software, sometimes I also encounter some problems in Linux (much LESS THAN WINDOWS ). these problems can be easily solved as long as they follow the scientific and rational principles. in addition, I can ensure that there are only a few issues in Linux. In this short article, I can basically make it easier for you in the Linux World.
Linux has many releases. I will take arch Linux as an example below. What are the characteristics of archlinux ?) Software updates are fast, and the latest software packages may not undergo rigorous tests for a long time. therefore, arch Linux is by no means the most difficult part of the release. I can be harmonious with it, and I don't need to talk to other releases, such as ubuntu.
From a certain perspective, Linux Desktop is much easier to use than Windows desktop,
- Stick to your own principles. for example, one of my principles is that it is worthwhile to invest in the future for the sake of future returns, so I will spend a lot of time learning software shortcuts (shortcut keys are more efficient for a long time than the mouse ), software that can only be operated with a mouse is "bad" for me.
- Users have rational thinking. in terms of File Manager, I have been using total commander for a long time on the Windows platform. In the Linux platform, there are also several file managers that are very close to total commander on the interface and function, naturally, from the perspective of feelings, I will love the house. however, I finally chose Emacs as the main file manager and assisted by the ugly midnight commander, I have determined that the general principle of selecting software is to use as few software as possible. specifically, Emacs is used to do anything. If other software is used to assist Emacs, the shortcut key should also be Emacs. midnight
Commander meets this condition
- Scientific methods and tools. for details, see the following article. I want to emphasize that the specific tools and methods have been verified by multiple experts and are supported by official documents. for me, the meaning of science is what our predecessors have repeatedly verified. In the past, 100% successes may guarantee future success (because the tool environment is constantly changing, it is only possible ). it is not called science.
Table of contents
- 1. Basic principles: less refined
- Less than 1.1
- 1.2 High Quality
- 1.3 strong functions
- 1.4 low dependency
- 1.5 General Interface
- 2. Examples of software meeting my standards
- 2.1 Editor
- 2.2 Browser
- 2.3 Shell
- 2.4 Desktop
- 2.5 others
- 3. maintenance is also required for the use of the software.
- 3.1 back up the default configuration file in the/etc directory
- 3.2 back up custom configuration files in the user directory
- 3.3 downgrade the software version
- 3.4 cloud backup
- 3.5 backup Operating System
- 3.6 read the official documentation
- 3.7 join the community
- 3.8 Use of virtual machines
- 4 diagnosis and repair of Common Software
- 5. Repair of system startup failure
- 6. Contact me
1. Basic principles: less refined
Specifically, the number of software is small, the quality is high, the function is strong, the dependency is small, the interface is universal.
Less than 1.1
This is very important. It is possible to be proficient only when there are few pieces of software to be used (but only a few pieces of work can be done.
Another advantage of less software is that less system maintenance work is required. For example, if you find that a software shortcut key conflicts with another unknown software, finding the workload of another unknown software is significantly related to the number of software you have installed on the system.
1.2 High Quality
My requirements for quality are simple:
- Tested over time (for example, the development history of Emacs is over 35 years)
- Smart person identification
I believe that we can find many objective indicators. The stricter the indicators are, the fewer results will be.
1.3 strong functions
Forgive me for using Emacs as an example. With Emacs, you can view webpages, receive emails, write programs, take notes, write blogs, and read RSS.
Note that among the features listed by me, Emacs is extremely good, and few similar software products are comparable.
1.4 low dependency
For example, the command line software does not rely on graphical interfaces such as QT and GTK. The installation package is much smaller, the memory consumption during running is also small, and the startup is fast.
1.5 General Interface
For example, I use Emacs for programs, bash shell for general operations, midnight Commander (MC) for file management, Firefox for Internet access, but through appropriate settings (Firefox requires the installation of plug-in keysnil, other software only needs to use the latest version.) Their shortcut keys are Emacs.
2. Software example meeting my standards 2.1 Editor
I use Emacs. Considering that it can do anything, it can be considered lightweight.
Vim is also used, and nano is used as a last resort.
2.2 Browser
There are not many options. Firefox is my frequently updated software.
2.3 Shell
I use Bash and there is the following line in my. bashrc,
export HISTSIZE=200000
Make sure that all the commands I enter will not be lost, because I have said that I prefer command line software, but remember that common command lines consume a lot of brain cells, which is not in line with the principle of investment income. so I asked shell to remember for me. I just need to remember to press Ctrl + R to search for history.
2.4 Desktop
GNOME and KDE will never be considered. I use a more lightweight Musca, and the installation package size is only 100 K.
The advantage of Musca is that tiled desktops (such as opening a window on the left to write code and opening a window on the right to view PDF documents) are extremely convenient, the learning curve is very low (I have tried more than 10 similar software, including mainstream gnome, Kde, and xfce4 ).
2.5 others
- For network management, I use netcfg (command line) instead of wicd, because wicd has many dependencies and has been tossing me, playing videos I use mplayer (command line), and so on.
- Hard Disk Cleanup I use bleachbit (cleanup temporary files generated by common software), localepurge (delete useless multi-language), ncdu (check how hard disk is occupied)
- In File Manager, I use midnight commander. Its keyboard shortcut can be set to the Emacs shortcut, which is useful to me who cannot remember the shortcut key.
3. maintenance is also required for the use of the software.
Installing software is easy with the help of the package management system. The trouble is that the latest software is sometimes unstable, which is usually caused by updating the software configuration file.
3.1 back up the default configuration file in the/etc directory
The default configuration file of Linux software is in the/etc/directory. I use the distributed version control software git to manage the/etc directory. The distributed version control system has many benefits. The biggest benefit is that the data is backed up everywhere, which is very secure. for more information, see Wikipedia.
Similar software, mercurial and bzr, can also be considered whether a third-party server is supported (for distributed version control software, a third-party server is not required ).
After updating the system or installing the latest software package on arch Linux, You can manually back up the files in the/etc directory with git (Debian can be automatically backed up ).
sudo git add /etc/sudo git commit -am "backup"
Once a software is not working properly, you can check the modification records of the default configuration file in/etc to restore the configuration file to the previous normal version.
sudo git log /etc/mysql/my.cnf #check historysudo git checkout commit_ref(version) /etc/mysql/my.cnf #restoren file
Temporary files in the/etc/directory do not need to be backed up. below is my. gitignore
*~*.pacnew*.pacsave*.swp*.pacorig*.swpmtab
3.2 back up custom configuration files in the user directory
I also used git to back up my user's configuration file (under/home/username/) to the GitHub server. the configuration must be synchronized with a third-party server because I use multiple computers.
The specific operation can be written as a long article.
3.3 downgrade the software version
The latest version of the software may be unstable, so downgrading is necessary.
Please refer to archwiki. It is actually very simple to install the software named downgrade and let it do all the physical work.
packer downgrade
3.4 cloud backup
It is better to use professional cloud backup services for e-books and multimedia files. I recommend Dropbox.
Dropbox is really amazing (for example, some people in foreign countries use Dropbox and git together), I just used its simplest function.
By the way, domestic services are not used. security reasons are self-evident.
3.5 backup Operating System
I don't need to do this frequently. I have cloud backup and a distributed version control system. What are you afraid.
Clonezilla is used to back up the entire hard disk. to back up the operating system, run the following command,
tar zcvpf mylinux.tgz --exclude=/proc/* --exclude=/lost+found --exclude='mylinux.tgz' --exclude=/mnt/* --exclude=/home/username/* --exclude=/sys/* /
I suggest using the former, because it is easy.
If you use clonezilla to back up the operating system, we recommend that you put the/directory (operating system directory) And/home directory in two partitions.
If the software can be selected based on the earlier principle, the partition of the operating system directory does not need to be large (8 GB is enough ), at present, the space occupied by my frequently used software and operating systems is limited to about 3 GB (my example is extreme, because my netbook only has 4 GB hard disk), so clonezilla's operations will be fast.
3.6 read the official documentation
Install the software using archwiki.
3.7 join the community
It is better to use IRC for urgent customer support. If IRC is not used, you can install the Firefox plug-in chatzilla.
3.8 Use of virtual machines
My virtual machine software uses virtualbox, and the virtual machine is Windows XP. I will update security patches on a regular basis for this operating system. only IE and Firefox are installed in the software. this operating system is only used to operate online banking. after each operation, I will reset the status of the VM to the snapshot before the operation.
4 diagnosis and repair of Common Software
Even if the above practice is adopted, there will be a bad luck in a year. that is, a software version I want to use has a problem. no one can help, no downgrade, no software configuration change, no error information available.
The problem looks difficult. In fact, it can be done in five minutes. This is often because the version of a third-party library required by a software has a problem.
For example, if Firefox cannot be started, run the following command for debugging,
strace -o err.txt firefox
Read javaserr.txt to find out which database has a problem. Believe me, this does not require any programming knowledge. Just click Google.
You know which database file has a problem (for the sake of security, LDD Firefox should check ). for example,/usr/lib/LibPNG. so.14 cannot be found. The simple solution is to replace the library file of another version.
If/usr/lib/LibPNG. so.15 exists, we can use this library to replace LibPNG. so.14,
sudo ln -s /usr/lib/libpng.so.15 /usr/lib/libpng.so.14
This is usually the case.
In case of impostor failure, we must find the software package to be installed based on the lost library file (which is useless for Pacman ),
pkgfile libpng
Pkgfile is a software package pkgtools, so you must install pkgtools,
packer -S pkgtools-git
5. Repair of system startup failure
The solution is very simple. boot with a common Linux boot disc and then use chroot to specify a directory as the root directory of the operating system ), create a new environment based on the root directory.
See https://wiki.archlinux.org/index.php/Change_Root for details.
For example, if the system fails to be started after I upgrade the kernel, but the old kernel does not have a backup, I can start the computer on the CD, then chroot, and then use the tool mentioned above to upgrade or downgrade the kernel.
6. Contact me
This is my Twitter and Google Plus. You can also contact me via my email <CHENBIN dot sh at gmail dot com>.
My main blog is http://blog.binchen.org.