Look, I have to be honest with you. I love it when aspiring developers ask questions, and this is a question that we get asked by people who are trying to take their first steps into software development. So, let’s take a look at whether or not you should learn Linux or Python first.
It is always best if you know your way around your operating system before you jump into programming. So, it would be best if you learned Linux before you learn Python. It is also good to familiarize yourself with your preferred IDE (Integrated Development Environment) and then start learning the Python language.
I recently did a poll on my YouTube channel where I asked whether or not you should learn Linux or Python first, and out of over 200 votes, the majority said that you should learn Linux. Below, you can see an image of that poll. And yes, I had decided to cast my vote as well.
By the way, if you get overwhelmed as soon as Python is required for a project, I recommend checking out my e-book “Master Python on Raspberry Pi“. It will guide you step-by-step to learn the essential concepts (and only them) to achieve any project in the future. Raspberry Pi without Python is like a car without an engine, you miss all the fun part. Get 10% off by downloading it today!
What is better, Linux or Python?
If like me, you always mix the languages syntax, download my cheat sheet for Python here!
Python and Linux are two completely separate things. So, it is impossible to compare them in any aspect. Linux is an operating system that you install on a device such as a PC, Mac, or Raspberry Pi.
On the other hand, Python is a programming language that you can use to write programs for operating systems like Linux, Windows, iOS, Android, and much more. There are better questions that you can ask instead. These questions are:
- Can Linux and Python be used together: Yes, Linux is an OS with the tools needed for Python programming.
- Are there advantages to using Linux for Python: Yes, you can. However, Windows is still the first choice for most developers.
- Do you have to learn Linux as a Python developer: No, you can stick to your preferred OS, but you become a better candidate during interviews if you know Linux as an extra skill.
Is it worth learning Linux?
I recommend that all aspiring programmers should learn Linux. It is an open-source operating system that has a large library and a dedicated community. The operating system itself has very few barriers, making learning how to program on it slightly more rewarding. However, there is a catch.
Learning Linux is not easy. Yes, once you have sufficient knowledge regarding the operating system, programming on it is quite friendly. That said, during your learning process, you can expect to endure a few late nights and tedious moments.
Before you start trying to understand all the concepts regarding Linux, you should know what distributions are.
Linux has Different Variations
When you start learning about Linux, you will notice that there are different variations. The correct term is “distributions.” To use an example, let us briefly discuss Android. See, you can have two different phones running Android 11, but they each have their own versions tailored to the specific phones. A Linux distribution for Linux works similarly.
Some distributions of Linux are better for some activities than others, which is especially true when it comes to programming. Because you are reading this article, I can safely assume that you want to learn Linux for programming using Python. So, you want to start your Linux learning journey using these three distributions:
Ubuntu is by far the most popular, and it is the one that I recommend for anyone who is starting out because it is overall the most user-friendly distribution of Linux.
Which OS is best for Python?
In my experience, Windows is still the best platform for developers using most languages, including Python. Linux does seem to be the second choice for most developers. During a recent poll on a developer forum, around 26% say that they use Linux. However, it is important to remember that you should use the OS that you prefer.
Productivity is highly important for programmers, and if you are more productive on Linux than you are on Windows, that is the best platform for you and vice versa.
Windows is the best OS for Python because, as an operating system, it has everything that you need, from the ability to run different IDEs to source code libraries and much more.
Can I learn Linux and Python at the same time?
You can learn as many languages and Systems at the same time as you want. However, I advise against learning more than one at a time. See, I always advise people to learn your operating system, your IDE (Integrated Development Environment, an app for developers) and then specialize in a language such as Python. Doing things in this order might make things seem slow at first, but in my experience, it streamlines the learning process.
At the beginning of my software development journey, I had to learn C# and Visual Studio. For some reason, I decided it would be a good idea to learn Microsoft Access simultaneously. Doing this slowed down my learning progress.
If I had simply learned the ins and outs of Visual Studio before C#, it would streamline my progress, and while I am glad I know my way around databases, I should have left Microsoft Access for a later date.
Should I learn Python or Bash?
I would most definitely learn Python instead of Bash. However, at a later date, you can start learning the ins and outs and fundamentals of Bash.
With that said, Bash and Python are not developed to do the same thing. They are inherently different from each other. You will be better off learning other languages, such as:
Bash Is Not Technically a Programming Language
You could say that for an advanced software developer, Bash can be used as a programming language because they can still use it to manipulate operating systems to perform certain tasks. Remember, we are talking about developers who have years of experience.
It is important to remember that Bash is not technically a programming language. It is a command-line interpreter. When you try to use Bash to write programs, you will notice that it is sluggish and slow, meaning your code will never be clean, at least in my experience.
The best thing that bash is used for is writing shell scripts (a sequence of command lines with simple expressions and conditions). By the way, if you are not familiar with command lines, I would recommend checking this article first, which will give you the most important ones to remember with a free cheat sheet you can download to have all of them at your fingertips.
Bash is Extremely Difficult
As mentioned, Bash is best used to write shell scripts. However, it is extremely difficult to learn how Bash works, especially for beginner developers. If you want to write a shell script, I recommend using Perl 5. You will have a much better experience.
Python is Powerful and Easy
If you are questioning which language you should learn, one thing I can say about Python is that it is extremely powerful. Many companies hire Python developers, and there are a lot of programs that need Python.
When you compare Python to other languages, you will notice that it is a lot easier to learn, especially when comparing it with other object-oriented languages such as C# and C++.
That’s why Python has been chosen as the main language on Raspberry Pi, and also why I used it in my book about programming on Raspberry Pi.
Grab your free PDF file with all the commands you need to know on Raspberry Pi!
That brings us to the end of this article. Hopefully, you can walk away from it with more answers than you had questions. Ultimately, Python is a great language to learn. It opens up many doors for you, and if you know Linux and Windows, that should increase your chances of getting a job.
Support us: Join the community on Patreon to show your support, get behind-the-scenes content and other awesome perks!
Raspberry Pi Resources
Not sure where to start?
Understand everything about the Raspberry Pi, stop searching for help all the time, and finally enjoy completing your projects.
Watch the Raspberry Pi Bootcamp course now
Master your Raspberry Pi in 30 days
Don’t want the basic stuff only? If you are looking for the best tips to become an expert on Raspberry Pi, this book is for you. Learn useful Linux skills and practice multiples projects with step-by-step guides.
Download the e-book
If you just want to hang out with me and show your support, you can also join the Patreon community. I share behind-the-scenes content there and give you early access to my content. You’ll also get a shoutout when you join.
More details here
Need help to build something with Python?
Create, understand and improve any Python script for your Raspberry Pi.
Learn the essentials, step-by-step, without losing time understanding useless concepts.
Get the e-book now
You can also find all my recommendations for tools and hardware on this page.