Home  >  Article  >  Operation and Maintenance  >  Why you should consider Linux for web development

Why you should consider Linux for web development

青灯夜游
青灯夜游forward
2019-02-11 11:48:152535browse

This article will discuss with you why you should consider using Linux for web development? It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you. [Video Tutorial Recommendation: Linux Tutorial]

Why you should consider Linux for web development

If you design and/or develop for the web, chances are you are using a Mac running OS X. Your chances of using Windows are slightly less, but still pretty good. Either way, you're probably happy with your environment. This is great because both OS X and Windows create excellent development environments. My purpose with this article is not to try to convince you why your chosen operating system is inferior and mine is superior. But I would rather suggest a third option, one that you may not have tried, and may not even have considered.

In my experience, Linux is great for web development for a number of reasons. I would like to present some of these reasons in an attempt to inspire and inform those who like to try new things. Maybe you'll find that Linux isn't for you, and that's okay. But you might just discover a whole new world of convenience and efficiency, switch to Linux and never look back. You won't be the first.

Misunderstandings about Linux

First of all, I would like to lay out some common misunderstandings and misconceptions about Linux.

Linux is hard to install and use

The first thing new Linux users need to know is that there is no operating system named "Linux". Linux is an operating system kernel - the basic core component of an operating system. When we talk about using Linux, we are talking about using one of the many distributions of Linux. A Linux distribution (or "distribution") is an operating system built around the Linux kernel. For simplicity, we often refer to the operating system itself as "Linux".

No two distributions are exactly the same, and they vary greatly in terms of barriers to entry. Some are created for hardcore Linux geeks who are at home configuring bootloaders, mounting filesystems, and manually compiling software. It's this flavor of Linux that gives it the reputation of being extremely difficult to use. But other distros are aimed at users who want a full-featured, full-featured system that doesn't require any manual configuration or deep system know-how to run. The most popular Linux distributions fall into the second category.

I'm going to assume that most web developers who might consider switching to a Linux operating system fall into the second category. In this case, I recommend any of these distributions: Linux Mint, Ubuntu, Basic OS, Zorin OS and openSuse. All of this will make Windows or OS X users feel right at home. Everything will work.

Linux is "Cheap"

A weird thing happens when you tell someone something they think should cost a lot of money is actually free . Their first instinct is to assume it's of lower quality than the analogues for which they paid a lot of cash. I guess that's understandable. If I paid $30,000 for a new Jeep and then someone showed me a similar looking vehicle with similar features that cost nothing, I would assume there was a significant problem. But the fact about Linux is that there isn't a problem. Software distribution works differently than the automotive industry (or most other industries). Sometimes people just want to create something awesome and share it with the world. As web developers, we should be familiar with this concept since many of us enjoy and contribute to open source software. Do we think jQuery is "cheap" because we don't have to pay for it? No. This is the same way Linux handles it.

Everything is done from the command line

This is similar to the first point. There are developers out there - no shame if you're one of them - they're getting root canal soon instead of working on the command line. While I personally don't understand this disdain for the terminal, I can offer good news. The distributions I recommended above (and many others) don't require any more command line use than what you're used to. Many tasks, like installing new software or using build tools, are faster and easier once you get used to the command line, but tasks that absolutely require it are the exception rather than the rule.

Linux is not compatible with my keyboard/mouse/printer/graphic card/USB drive/whatever

This may have been partially true ten years ago, but the big Most modern Linux distributions come with plug-and-play functionality just like Mac or Windows. I have more difficulty installing new hardware on Windows than on Linux. The creators and contributors of modern Linux distributions often make device compatibility one of their top priorities.

Why I use Linux for web development

Let’s do it. Here are my favorite things about Linux.

You can make your own environment

Ask any fan what they love most about Linux, and their first answer is likely to be "customizability." As a designer, I love creating something unique. As a developer, I want my environment to be like this. If you're like me in this regard, you'll love the customizability Linux offers you. We're not just talking about desktop wallpapers and icon sizes. Everything can be customized in Linux, from changing the location of the menu panel to choosing a completely different desktop environment. Don't like the command used to launch Sublime Text? Change. Don't like the way your windows stand against each other? Change. If you find yourself limited by the options provided, you can hack the code and create your own. That's the beauty of working in an open source operating system.

Linux is free

Most distributions are released under the GNU General Public License (GPL), which means they are free to use and can Free to copy, distribute and modify. Trying out a Linux operating system is as simple as downloading an image file for the distribution you're interested in, burning it to a CD and popping it into your computer. If you like what you see, you can install it alongside your existing operating system. If you get tired of it, just download a different distro and give it a spin.

Like I mentioned before, don’t confuse freedom with cheapness. "You get what you pay for" usually comes true in life, but not here. Modern Linux distributions are fast, elegant, feature-rich, stable, and highly available.

Your development environment will match your production environment

This is a big deal. Your production servers have a very good chance of running Apache on Linux. When you run Linux locally, you can mimic this production environment exactly. Same file system permissions, same version of PHP/Ruby, same web server, etc. This means that when you test your site locally, you can make sure it runs exactly as it does after deployment, and you're less likely to run into platform-specific issues. This makes deployment a simpler, more predictable, and error-free process.

Linux runs well on smaller hardware

Linux operating system is lighter and has fewer resources than Windows or OS X, which means you can start from 2003 Boot up your old Dell Inspiron laptop, boot up Linux, and you're good to go with all your development tasks. There are even some Linux distributions so lightweight that they can reside entirely on a small USB drive. This is magnified when you consider the price of Linux (zero dollars). Linux makes it cheap and easy to breathe life into hardware that would otherwise be garbage.

Linux is stable as hell

There's nothing worse than having your code editor crash when you're solving a tricky problem. Or worse, the operating system itself freezes and requires a reboot. Now, every operating system and every piece of software has the potential to crash, but in my experience, Linux operating systems are the least prone to unexpected software crashes and erroneous performance. This is the main reason why many people use them as web servers.

Some distributions are more stable than others. Debian has a reputation as one of the most stable distributions. I've had good luck with Xubuntu in terms of rock-solid performance. Running Xubuntu, I haven't had to reboot my computer for at least nine months.

Many of your tools run better on Linux

Many popular web development tools and languages ​​are designed for Unix-like systems such as Linux of. Ruby, Jekyll, Grunt, Git (created by Linux creator Linus Torvalds) to name a few, perform better on both Unix and Unix-based systems. You don't need to install additional shell software or worry about system compatibility. On Linux, everything will be smooth as silk. Okay, stop screaming at the screen - I realize that Mac OS X is a Unix system and almost everything that runs on Linux will run on a Mac. So to be fair, this one only applies to Windows users.

Why you shouldn't use Linux

I can only think of one reason, but it's a bad thing:

You can't run Adobe software on Linux

Ouch. This one hurts. However, let me introduce you to some comfort: You can run the VM software VirtualBox in Linux without any problems. You can then install Windows as a virtual machine in VirtualBox, install any Adobe software you like, and it will run just fine in your virtual Windows installation. This is what I do and I use Photoshop almost every day. Since you're effectively running an operating system within an operating system, you need a computer with a decent amount of memory (I'm saying 8GB minimum).

You may think this solution is a bit cumbersome, and I understand why. It feels better to run the software locally rather than running it in a VM. But here's the reason, at least for me, this solution is completely adequate: I need to run my Internet Explorer tests on a virtual machine anyway. I have four different virtual installations of Windows, each with a different version of IE. Since I live in these virtual machines anyway, using one as my Photoshop machine is a no-brainer. I usually leave my Photoshop VM running constantly so switching to it is simple.

Conclusion

If you are happy with your current operating system and don’t have the time (or time) to try something new, there’s nothing wrong . I truly believe that the best software is the software that makes you most productive. But if you're like me, you feel a constant desire to push your skills, learn new things, and push outside of your comfort zone for the sake of new experiences. If that's you, give Linux a try. You may hate it, you may love it, but at least you can say you did it.

The above is the detailed content of Why you should consider Linux for web development. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:chris.house. If there is any infringement, please contact admin@php.cn delete