If you work on Windows during your most time, you must be curious about why should I shift to Linux and why suddenly Linux becomes so popular in the recently decade, even Microsoft migrated Linux kernel into latest windows version named WSL/WSL2 and run its 70% cloud service on Linux including SQL server.
Why should we use Linux?
Although Windows is still the dominate leader especially in the desktop market, more and more professional industries are moving to Linux. The emerging areas like loT device, cloud service, smart phone are all using Linux. In my points, there are several things Linux significantly better than Windows: Reliability, Software management, Hardware compatibility and Customization.
Reliability: How many times you meet blue screen and reboot on windows? Install an application —> reboot; uninstall —> reboot; change a setting —> reboot; even security upgrade will cause a reboot. On Linux, you will never worry about it. It significantly reduces downtime of server.
Software management. On windows, “Click-Installation” maybe an easy way for a normal user, but it would never be a good way for programmer or server admin. Linux adopts a repository methodology, pretty like “Android store”. We only need to run a very short script like “sudo apt install <appname>” or “sudo snap install <appname>”. Even more, we can put all scripts together as a bash, then we can leave it alone and have a cup of coffee.
Hardware compatibility. So many smart devices coming out these years. They have weaker computational ability compared to the desktop or laptop, but we can put them anywhere and let them control home security, TV, freezer or washer. You can not install windows on these device since it is too “fat”. Linux is a good choice and has a nice compatibility with ARM device.
Customization. Not everyone like flexibility. My wife, for example, likes out of box using. So I would never recommend Linux for her. but for the most geek or tech worker, Linux could provide varies distros and desktop environments. In each environment, you can also deeply customize in term of your needs.
How to set Linux for your daily life?
First thing first, you need to choose Linux distro. Linux has hundreds distros, and coming out many branches each year. but most of them are child-parent relationship. Debian, Red-hat and Arch are three most popular families. Here we look at Debian and Arch family. For the daily life, we need to use stable and easy to use one. Debian, Ubuntu, Mint Linux are all good in Debian family. Manjaro, Arch are the most popular in Arch family. Beside these, you can also find Android and ChromeOS in the left distribution map. But they are only designed for mobile or special device.
If you are beginner for Linux and want to get wiki answer quickly. Ubuntu LTS would be a good choice. In end of April, 2020, Ubuntu 20.04 LTS is going to launch.
In the following steps, I will use Ubuntu for example by default.
Second, How to install application. As I mentioned before, Linux use Repository to download and install application. Basically, Repository is like a store where you can find a list of goods(application) in it. For different Linux distros family, you would use different repositories. In Ubuntu, you can run following simple script to install application.
# update repository as root sudo apt update # install application sudo apt-get install <app name> # find the install path of application whereis <app name>
There is another popular repository called snapcraft which is my favor. Install snapcraft is super easy: https://snapcraft.io/docs/installing-snapd. In Ubuntu, you only need to run:
sudo apt update sudo apt install snapd
Then in the page of application page in snapcraft, you can copy the installation code from there. I took Visual Studio Code for example blew.
If you feel even script is complex, you can install snap store, which provides you “Android store” like GUI and click-install experience.
sudo snap install snap-store
In some case, you can only find the application on the official website, like anaconda, Microsoft Team. What should we do?
For deb file, just click and install, this is the package for Debian family. If failed, use script below.
sudo dpkg -i <file name.deb>
For shell file end with “.sh” like anaconda.
# download package wget <download URL> # add execution mode chmode +x <file name.sh> # execute file sudo ./<file name.sh>
Most applications you can find Linux version, they are some alternatives in Linux.
|Windows Application Name||Alternative|
|MS Office 365||LibreOffice or office online|
|check point VPN||SNX|
Third, Command Line. Terminal is the most important tool in Linux. Once you familiar with it, you would never use your mice. Since terminal saves you lot of time. Here I list some common commands. For more information you can check: https://files.fosswire.com/2007/08/fwunixref.pdf.
# check command meaning man <command name> # file operation ls # listing files and dir cd <path> # change to the path pwd # show current dir mkdir <dir> # create dir rm <file> # delete file rm -r <dir> # delete dir recursively cp -r <dir1> <dir2> # copy dir1 to dir2 touch <file> # create or update file cat > <file> # places standard input into file more <file> output contents of file # file permission chmod # change file mode chown # change owner of file # ssh ssh user@host # system info top/htop # task monitor whereis app # app location df # disk usage w # who is online # compression tar cf file.tar files # create tar file tar xzf file.tar.gz # extract a tar using Gzip tar xf file.tar # extract a tar file # download wget # search grep <pattern> # split terminal tmux # schedule crontab # back up sudo dd if=/dev/sda1 of=/media/c/back.img
What else benefit can Linux bring for you?
For big data engineer, the most popular foundation is Apache software, which provides many excellent projects, like spark, hadoop, Kafka, Maven,Tomcat. All of these are natively support Linux. And they recommend using Linux as well.
For application developer, python, java, C# have already cross platform. You can choose whatever OS you like. As I said before, you won’t meet the problems of windows in Linux, which saves you lots of time.
For administrator, Linux provides sable and flexible solutions. You would send out mails less that explains downtime for some upgrading maintenance.
Who is not recommended moving to Linux .
If you are very sticking to some software like Adobe suit, you need to leave Linux away.