Why should I switch from Windows to Linux?

Source: Java Guide "ID: Java Guide"

Oh, when you see this title, don't think I want to write the same content as Wang Yin-senior, hehe. However, here is a link to the article written by Wang Yin's predecessor: Working entirely with Linux [1] .

Why write this article?

First introduce the time when this article was produced. The article is written on August 22, 2020. Three or four days ago, I actually did not intend to write this article, but for these three or four days, I have been busy switching from Ubuntu 18 to Debian 10 Buster. I don’t have time to write code, and my hands are really itchy. You may not imagine that I, a person who has been using Ubuntu before, just switched to Debian and it took such a long time. You may think that I am trying to persuade fellow students, but it is not. I just want to express: I am not about Linux. Familiar, part of the reason for this is that I am using the user-friendly version of Ubuntu, and part of the reason is that I still don't have so much motivation to learn Linux, even if it has always been my daily use.

This article is not to boast or belittle Windows and Linux systems, but to record my experience of using Linux as a daily study, and my feelings since I tossed Debian again these days.

Why should I switch from Windows to Linux?

Windows is commercial software, which makes it easy to use. Linux is free software, which makes it an open source nature.

Easy-to-use software usually brings about user-friendliness, so that since the development of Windows, it has been adopted by many ordinary users. Free software usually brings the development of its community, so you can now see many forums such as ask ubuntu on the Internet.

I very much agree with a point in "Working with Linux": UNIX is not the patent of computer experts.

My understanding of this sentence is: even if your direction of study or work is not computer, you can still learn Unix/Linux. If you are a classmate of computer, then you should learn Unix/Linux even more.

But this is only part of the reason why I switched from Win to Linux. Another very important reason is that I am fed up with the "ease of use" of Windows. The ease of use here does not mean that I reject the humanization of Windows, but because humanization has brought me a lot of learning difficulties. To give a very simple chestnut: When you are learning a technology, whether you have the need to interview rockets or not, will you be curious to understand its principles and implementation, even if you may know it is complicated.

Why are you curious about the source of a thing?

I personally think the answer is: interesting things are right here, why not understand it?

Windows is just interesting, but it is not "in sight."

My personal experience, I don’t know if any classmates have the same experience as mine. In many cases, your Windows may have some inexplicable problems, but you don’t know how to solve them. You can only ask search engines for help. After you solve the problem, you don't want to understand why this problem occurs, because Windows is too large.

For example: I have installed Git now and I have no problems with it. But after a period of time, Git can no longer be used inexplicably, obviously you didn't do anything. What's more, there are some rogue problems or rogue software that cannot be solved and blocked.

The problem has arisen, it must be solved, so at this time you start to inquire about the solution of the related problem on the Internet. If you are lucky, then someone may have encountered the same problem as you, and you may get the answer. . But the general answer only teaches you how to solve it, such as opening the registry, adding or deleting a key, you don’t want to know why, because for beginners, when you see so many contents in the registry , You just need to think about making no mistakes, so how can you still have the mind to learn this stuff? If you are unlucky and have no plans to replace the system, then you may just use it, but at this time, your heart may have developed a feeling of boredom towards Windows.

My definition of rogue software is: when you want a software to stop running or stop pop-up advertisements as you want, when the software cannot or cannot do well to meet your requirements, this is a rogue software. You might say that everyone has different requirements, how can the software meet everyone's standards? But I mean the most basic demands such as stopping and stopping pop-up advertisements. If a piece of software can't even realize the most basic demands, why bother to use it?

In summary, the main reasons why I switched from Window to Linux are: learning and freedom.

Yes, you have to admit that Linux is a very good environment for you to learn computers. It is naturally integrated with C/C++. It seems a little more feeling than when you install an IDE on Windows and start typing code.

Another point is that some classmates may be like me. When they first came into contact with Linux, they installed a virtual machine environment on Windows or used Docker for learning. It is undeniable that this is indeed the main way to learn Linux on Windows, but do you feel that when you learn this way, you always have a sense of strangeness to Linux. It seems that I am just learning for learning.

The main reason for this idea is that you have not integrated into the Linux environment. When you integrate into the Linux environment, you no longer only need to learn those operating commands, you will inevitably encounter someone you have never touched. I’ve just mentioned that this problem is not the annoying problem of "losing icons" on Windows, but it may be the problem of black screen due to Nvidia driver that scares you. You will also check on the Internet why this problem occurs, but what you get is not an answer like "modify the registry", but you will learn: Why does Nvidia have this problem on Linux? What can I do to solve the driving problem? Do other drivers have similar problems like Nvidia? When you solve the problem, your computer starts to work normally, and you start to use it for your daily use...

The last point about the reason for learning with Linux is that I think I am not cautious or restrained enough. When I use Windows, I can't completely restrain myself from the idea of ​​contacting those new games. I usually play games for a long time, maybe one day -_-. But I don’t mean that there are no games on Linux. On the contrary, Linux supports many games. You can play a lot of games. But if you are not so obsessed with games because of Linux, at least I am. . This can be boiled down to "using Linux is helpful for gaming", haha.

Talk about freedom again:

My understanding of freedom is: software is under your control, you can understand every part of it, and you can go where you want to go without any restrictions. It only depends on whether you want to.

Take a look at the basic Linux directory:

Linux directory

You may not know many of these directories, but it doesn't matter, because these are (mostly) all the directories in the Linux system. If you understand a little, you will know what files are in these directories.

This is also my personal experience. In short, the freedom of Linux is an open source spirit, which is much greater than I described. As for Windows, I am not even familiar with the contents of the C drive directory, but I am not belittling Windows, because this is the price of Windows ease of use. Correspondingly, as free software, Linux also has many shortcomings. .

Disadvantages of Linux as a daily use

Hardware driver problem

Hardware driver problems are generally problems that occur during the installation of Linux. Depending on the configuration of your personal computer, your computer's hardware drivers may be incompatible with the Linux distribution to be installed, causing corresponding problems in the system. My deepest experience of driving problems in the past few days has come to understand why Linus will complain: "Nvidia Fuck You". Many driver vendors are closed-source for Linux systems. You can download drivers from these vendors, but you will have to pay for them if you can use them or if you have any problems with them.

As Linux begins to become popular among ordinary users, I believe that in the future, the Linux ecosystem will develop better and better, and now many Linux distributions are more and more compatible with various hardware. As far as Ubuntu18 is used, Nvidia, Wifi, Bluetooth and other drivers are no problem. The Debian 10 Buster that I use now may not support Nvidia so well. There are always some minor problems in using it, but it is harmless. In fact, there is no problem. I am still a bit uncomfortable. Didn't Debian be the father of Ubuntu? Haha.

Software problem

I have to admit that the software ecosystem of Linux is indeed not as rich as Windows. Before you consider switching systems, you must first investigate whether there is the software you need on Linux, whether the software you need supports cross-platform or is there an alternative Applications. My personal requirements for software are relatively simple, most of which are productivity tools, and other applications such as entertainment software can be replaced by the web version. If you want to try the game on a Linux system, I think it is OK, because I have also tried Linux Dota2 and the experience is very good (not advertising -_-). However, most domestic game manufacturers have very poor support for Linux, so if you can't pass this hurdle, don't switch the system.

Software problems can actually be viewed in two parts, one is the ecological problems just introduced, and the other is that when you use certain software, there will always be some small bugs.

Take Fcitx as an example. Fcitx is a general Linux input method framework called Little Penguin input method. Many input methods are developed on top of Fcitx, such as Sogou, Googlepinyin, Sunpinyin, etc. Students who have used Fcitx may encounter this problem: when you use Fcitx to type on some software, the candidate box will not follow the position of your cursor, but will always be fixed at a certain position, and you cannot Change, this problem is the biggest bug I have seen so far. However, this bug is only found in some software. There is no such problem in Chrome or Typora. This makes me suspect that it is a software internationalization problem, not a Fcitx problem.

So the second part summed up is that some software may have some unknown bugs, you have to find a solution, or endure to use, use Linux also has to sacrifice some price.

Do you really need to use Linux completely?

Having said this, I actually want to borrow the words of a senior from Zhihu to express my true thoughts: "The best part of Linux is openness and freedom, and the biggest problem is here. Ordinary people have no ability to choose, and no time. Make a choice. Is transparency necessary? There are many people who like to be arranged! "(Knowledge-Han Qing [2] )

As I said at the beginning: “I’m not familiar with Linux. Part of the reason is that I’m using the user-friendly version of Ubuntu, and part of the reason is that I still don’t have that much motivation to learn Linux. It has always been my daily use."

I use Linux completely for the sake of learning and freedom. I did feel freedom on Linux and learned a lot, but I have been indulging in the satisfaction of using Linux, and I can’t really understand what Linux gives us. What did it bring?

The reason for switching from Ubuntu to Debian this time was that I wanted to try a new environment, but after I spent 3 or 4 days, I understood: I just stayed in one place for a long time and wanted to change to a new place, but the old place It’s not necessarily bad , because I didn’t know much about this old place. Just like when I switched from Windows to Linux, I didn’t have a thorough understanding of Windows and then changed. At that time, I still complained about various shortcomings of Windows. Now it seems very ridiculous.

end

This article says almost everything I want to say. Personal writing is limited, and the subjective consciousness of this article is too strong. If you think this article does not meet your appetite, just read it as a joke.


Problems I encountered when using Debian/Ubuntu

The following are the problems and related solutions I encountered under Debian10 Buster, and students who use Ubuntu and other versions of Debian can also learn from it.

PS: You are welcome to write down your problems and solutions here.

IDEA edit Markdown pre-rendering problem

This problem took me a long time.

When I installed IDEA and used it to edit markdown files, the following picture appeared:

IDEA's Markdown pre-rendering problem under Debian10

You can see that there is obviously a problem with the rendered picture on the right. At the beginning, I suspected that it was a problem with the IDEA version, so I installed other versions of IDEA, but it didn't work. At this time, I suspected that it was the cause of the graphics card:

My computer configuration

You can see that Intel’s core display is used, so when I query related information, I use a script to change the core display to a standalone display. No screenshots are left here. When you switch to a standalone display, the graphics will show the configuration of the standalone display. Use The nvidia-smi command can view the status of independent display. So I opened IDEA expectantly, but it didn't help. When I thought it was a Debian bug, I discovered that Bumblebee can manage graphics cards. Why not give it a try? So after installing Bumblebee, I used the optirun command to start IDEA. I didn't expect it, but it really works:

After IDEA's Markdown pre-rendering under Debian10 is resolved

I'm really surprised, why the display can be displayed normally after optirun is started. So I later inquired whether optirun enabled gpu acceleration, but unfortunately, I didn't get the relevant answer, but it made me sure that the problem occurred on the graphics card. If there are students who know the reason, please let me know, I am grateful.

wifi adapter not found

I guess (not sure) this problem should occur on most of the classmates' computers who use Lenovo notebooks, not only Debian, but Ubuntu also has this problem. After installing the system, when we open the settings, we will find that the wifi column displays an error message such as "wifi adapter not found". The probable cause of this problem is: the wireless network adapter is blocked, you need to manually turn on the wifi switch on the computer, and the wifi switch on my laptop, so it can be guessed that it is a problem with the Lenovo network driver. You can use the rfkill list all command to check whether your wlan is blocked, students who don’t have this command can use it

sudo apt-get install rfkill

Install, when wlan displays Hard blocked: true, it proves that your wireless driver is blocked. The solution is to remove the module that blocks the infinite drive from the kernel, and edit the blacklist.conf file directly in the /etc/modprobe.d directory. Its content is:

blacklist ideapad_laptop

The file name does not have to be the same as mine, but it should end with .conf. You can understand the files in the modprobe.d directory as blacklist files. When Linux starts, the modules specified in the conf file will not be loaded. Here ideapad_laptop is the wireless module we need to remove.

Aftereffects: When we remove the ideapad laptop module, when we turn on it later, sometimes the Bluetooth adapter cannot be found. This problem was not found on Ubuntu before. It seems that Debian is not as good as Ubuntu in terms of drivers. , But this is understandable, and it can be used normally most of the time ...

XMind installation

XMind is written in Java and depends on Openjdk8. Therefore, to use XMind on Linux, you first need an Openjdk8 environment. Secondly, you need to write a Shell script to start it when you start it (not the only way, but it is a very simple way). I didn't expect it, I didn't expect it, this is what I played through many pits.

First of all, we need to prepare a XMind software startup picture: XMind.png. I have put this in the directory [3] . Students who need it, please pick it up.

Next, we enter the XMind_amd64 directory, the students of the 32-bit system enter the XMind_i386 directory, we create and edit the start.sh script, its content is:

#!/bin/bash
cd /home/guang19/SDK/xmind/XMind_amd64 (这个路径为你的XMind脚本的路径)
./XMind

The content of this script is very simple. When starting the script, enter the directory and start XMind directly.

After the script is written, it needs to be executed. Use

chmod +x start.sh

The command allows start.sh to be executed.

At this point, you can try to execute the ./start.sh command to start XMind. If the startup is successful, it is 99% complete. If the startup is not successful, you can check whether the previous steps are wrong.

If you only want to start XMind with Shell in the future, that's it, not even the pictures mentioned above. If you want to start more conveniently, then you need to create a desktop file to start. Under Debian/Ubuntu, all the desktop files you see are stored in the /usr/share/applications directory (and some are in the .local/share/applications directory). The files in this directory all end with .desktop. We now need to create the xmind.desktop file in this directory (the name may not be called xmind).

Its content is:

[Desktop Entry]
Encoding=UTF-8
Name=XMind
Type=Application
Exec=sh /home/guang19/SDK/xmind/XMind_amd64/start.sh
Icon=/home/guang19/SDK/xmind/XMind.png

We only need to understand the Icon and Exec attributes for the time being. Icon is the icon of the application you see on the desktop, just change the path of Icon to the path of your XMind.png. Look at the Exec attribute again. When we click on the XMind icon on the desktop, the command or script corresponding to Exec will be executed. We can change Exec to the path of the start.sh file. Don't drop the sh command, because start. sh is a script and requires sh command to start.

After the above steps are completed, after saving the desktop file, you can see the XMind application on the desktop.

Location problem of Fcitx candidate frame

This question can be understood by posting a screenshot of my situation:

Fcitx candidate frame positioning problem

You can see that my cursor is positioned at line 207, but the candidate box of my input method stays at the lower left corner of IDEA. Why do I say stay in the lower left corner of IDEA? Because as far as my use is concerned, this problem only exists under IDEA, not only Debian, but Ubuntu also has this problem. I personally think that this should be an IDEA problem. Most of the related articles I found are about Swing. Question, it seems that this question is really more difficult. If any students know the solution, please feel free to share it, thank you very much.

Reference

[1]

Work entirely with Linux:  https://www.douban.com/group/topic/12121637/

[2]

Zhihu-Han Qing:  https://www.zhihu.com/question/309704636

[3]

Directory:  https://github.com/guang19/framework-learning/tree/dev/img/linux

end

Friends who like this article, welcome to follow the official account  programmer Xiaohui , and watch more exciting content

点个[在看],是对小灰最大的支持!

Guess you like

Origin blog.csdn.net/bjweimengshu/article/details/108413736