Programming software in linux

Linux Programming Made Easy – A Complete Guide With Resources For Beginners

Updated June 18, 2021

Disclosure: Your support helps keep the site running! We earn a referral fee for some of the services we recommend on this page. Learn more

Linux is an operating system, platform, ecosystem, and culture. While the continued dominance of Windows and Mac OS for desktop computing causes the uninitiated consumer to assume that Linux is a sort of fringe option for extreme geeks and those who don’t want to pay for an operating system, the truth of the matter is that Linux is the most used and most important operating system on the planet. It powers the web, it powers our infrastructure, it powers the largest supercomputers in the world.

Developing for Linux can be a bit of a challenge, but it can also be extremely rewarding. This short guide will provide you with an introduction to the information and resources you need to get started with Linux programming. It covers four areas of Linux development: contributing to the kernel, building new modules, developing applications for Linux, and Shell scripting.

Need Web Hosting?

If you’re in the market for a new web hosting provider, be sure to check out our user reviews, our A-Z hosting guide and our top three popular hosting picks:

Linux kernel development

The Linux kernel is, perhaps, the most ambitious software development project on the planet. New stable releases come out approximately every three months, and each release involves thousands of developers working in dozens of countries.

Getting involved with kernel development is, paradoxically, both easier than it seems like it should be, and also ridiculously difficult. It is easier than it seems like it should be, because there is no hiring process, no interview, no bureaucracy. Anyone who knows what they are doing is welcome to develop for the core, and submit patches. On the other hand, it is also extremely difficult because the kernel is extremely complicated. Moreover, the kernel development community, while quite welcoming in some ways, does not tolerate amateur shenanigans very well. While it helps to have thick skin, nothing really substitutes for actually knowing what you are doing. Developing the core is pretty serious business, involving pretty serious computer science. If you are just getting started with operating system development, this is not really the place to start.

What You Need to Know

Development Skills

Programming of the Linux kernel is done in C. Not C++, not Objective-C, not C#. So the first thing that you need to do is learn the C programming language extremely well.

You also need to have a deep understanding of operating system theory, particularly as it relates to the Linux system. More on that in the next section.

  • The C Programming Language: the definitive guide to the language. Also available as a free PDF.
  • Operating System Concepts: a thorough introduction to the theory and practice of operating system development.

Understanding Linux

Naturally, you need to understand Linux both as a user and as a developer. This includes having a fairly deep understanding of how the Linux kernel is structured, and how the various sub projects fit together.

Process and Culture

Finally, you need to understand how the Linux development process actually works. This includes getting a feel for the community as a whole, for its culture, and how the various members of the development community relate to each other. Also, it means understanding distributed version control, and the development release cycle.

  • How to Participate in the Linux Community: required reading. Start here.
  • Three Ways for Beginners to Contribute to the Linux Kernel: a short, friendly guide to getting involved.
  • Official Things:
    • The Linux Kernel Archives
    • The Linux Kernel Mailing List
    • The Kernel Bug Tracker
  • Being a Moron on linux-kernel: a guide on how not to behave on the Linux Kernel (or any other) mailing list. (Our recommendation: lurk for at least six-months before posting anything.)

Developing Kernel Modules

Before jumping into core development on the Linux kernel, a good way to increase your knowledge and expertise with Linux programming is to work on a kernel module. These are independently developed pieces of software that work with the kernel in order to function as a complete operating system. Kernel modules include things like device drivers for various hardware peripheries, as well as file managers and other low level operating system features.

The barriers to entry for working on a kernel module are, generally speaking, much lower than they are for working on the Linux kernel. There are hundreds of modules, developed by many different teams and individuals, so there is not one set of gatekeepers setting the tone for development. Moreover, the stakes are a bit lower with module development.

Читайте также:  Менеджеры автозагрузки windows 10

What You Need to Know

Kernel modules, like the kernel itself, are usually written in C. (There is some fringe debate about developing kernel modules in C++, and there are some off-the-wall ways of accomplishing this, but it is certainly not the normal way nor is it recommended.)

Obviously, if you are writing a device driver for a piece of hardware, you will need to know quite a bit about the type of hardware, and the firmware embedded on it. You also need a decent understanding of the Linux-based kernel, and the way that it interacts with kernel modules. Finally, if you are contributing to an existing kernel module, you will need to learn about their procedures and development cycle.

Also see the list of resources above in the Kernel Development section.

We think the following plans will suit the majority of our visitor’s needs.

BlueHost

Dreamhost

SiteGround

A2 Hosting

GreenGeeks

Hostinger

Developing Applications For the Linux Operating System

Once we get up out of the weeds of operating system development, and start talking about developing actual applications for the Linux operating system, the job gets a little easier and we have a lot more options about how to proceed. Compilers and interpreters for just about every programming language are available for the Linux platform, often more than one for a particular language.

What You Need to Know

If you are used to developing for Windows or Mac OS, the biggest shock when developing for Linux is probably the wide variety of Linux environments. There are dozens of Linux distros, and every Linux user has the ability to change quite a lot about how their particular environment works. This means, among other things, that you have to pay attention to dependency management a lot more than you might otherwise need to.

Another difference, particularly as compared to a Windows system is that many Linux users prefer to compile their applications from source code. This happens on Mac OS as well but with less frequency. In the Linux world, a large number of users will always prefer to compile applications from source, rather than using an installer package. This might affect how you think about development and distribution of your software.

Most Linux-centric development takes place in C, C++, Perl, or Python. Learning those languages well, and diving into the resources mentioned above (Kernel and Modules) and below (scripting) will help a lot.

  • C Programming in Linux: a thorough introduction and tutorial about programming Linux applications in the C language.
  • Linux Developer Training: paid courses on Linux development, from the Linux Foundation.

Scripting in Linux

Perhaps the “lowest-level” of programming in Linux is shell scripting. However, this is no less “programming” than anything else. Shell scripting in Linux is a great way to automate routine tasks and accomplish more work in less time. Additionally, digging into advanced shell scripting will give you a deeper knowledge and understanding of the Linux operating system. Shell scripting is really what separates novice Linux consumers from advanced Linux users.

What You Need to Know

While there are other options, the most common scripting language is Bash. Even if you plan to move on to more advanced scripting languages, getting a handle on Bash will start you off on the right foot for all types of operating system scripting. Most people who really get into scripting as a way to boost productivity, use either Python or Perl for most of their work. Once you have hit a wall with what you can easily accomplish in Bash, you will probably want to move onto one of those languages.

Bash Resources

Python Resources

  • Learn Python the Hard Way: one of the most popular introductions to Python development.
  • Automate the Boring Stuff with Python: Practical Programming for Total Beginners: a great introduction to scripting (as opposed to “development”) in Python. Also available for free online as a video course.

Perl Resources

Need Web Hosting?

If you’re in the market for a new web hosting provider, be sure to check out our user reviews, our A-Z hosting guide and our top three popular hosting picks:

General Linux Resources

Linux.org: a central forum for all things Linux.

The Linux Documentation Project: a giant library of Linux guides on all of the subjects above, plus a bunch of other things. This is one of the most important places to go for in-depth Linux information.

Summary

That was a wild ride! From Linux kernel programming all the way down to shell scripting. There are endless ways to program the Linux operating system. With this guide, you should be well on your way.

Источник

11 Best Linux Distros For Programming And Development [2021 Edition]

L inux-based operating systems are the most sought after and best suited for developers and programmers. Most developers use different Linux distributions to get their work done swiftly and create something new, but as a former developer myself, one of my major concerns were “Which Linux distro should I be looking at exactly?” Similarly, some of the other concerns while choosing a Linux distro for programming or software development are compatibility, power, stability, and flexibility.

Distros like Ubuntu and Debian have managed to establish themselves as the top picks when it comes to the best Linux distro for developers. Some of the other great choices are openSUSE, Arch Linux, etc. Don’t forget the credit-card-sized Raspberry Pi using which you can learn how to code and build interesting projects.

Читайте также:  Быстродействие linux and windows

11 Best Linux Distros For Programming In 2020

Here is the list of the best Linux distros for developers and programming

  • Debian GNU/Linux
  • Ubuntu
  • openSUSE
  • Fedora
  • Pop!_OS
  • Arch Linux
  • Solus OS
  • Manjaro Linux
  • Elementary OS
  • Kali Linux
  • Raspbian

1. Debian GNU/Linux

Debian GNU/Linux needs no introduction. It is one of the most crucial distros not because it’s popular but because many other distros are based on its stable branch.

Image Credits: Thomas Papp on Medium

The reason behind Debian’s status as a developer’s operating system is a large number of packages and software support, which are important for developers. It’s highly recommended for advanced programmers and system administrators.

Please note that if you are a beginner Linux user and want to learn the basic coding nuances, Debian isn’t the perfect programming operating system. For that, you need to look for beginner-friendly Linux distros such as Ubuntu 20.04, Linux Mint, or Zorin OS.

2. Ubuntu

Ubuntu is the most popular Linux distro when it comes to development. Over the years, thanks to the open-source community, it has grown to become one of the highlights of the Linux desktop scenario.

It is a Debian-based distro which is used in cloud and server applications. It also ships in multiple flavors with different desktop environments and features to gratify people’s different needs.

It is easy to get started with development in Ubuntu. Thanks to the .deb packages, your favorite apps and tools are just a couple of clicks away. Not to mention, its own Software Center has a lot of free applications that make it a great Linux OS for programming. Its LTS version remains supported for 5 years and provides the stability of a fixed release.

3. openSUSE

openSUSE, which can easily give Ubuntu a run for its money due to its professional and timely development, is a very stable operating system for programming. This Linux distro is available in two versions — Leap and Tumbleweed.

While openSUSE Leap is an LTS release that remains pretty up-to-date and guarantees stability, Tumbleweed is a rolling release for those who love the taste of the latest software. If you want to try the latest bleeding-edge hardware support, Tumbleweed is the way to go.

One of the major advantages of openSUSE is its jYaST package management, making it easy to automate different tasks. Another great characteristic of this dependable Linux distro for developers is its software delivery method. My personal favorite thing about openSUSE is, you can head over to its software portal website and install anything in just one click. Its vast package database and supportive community is another plus point.

4. Fedora

Fedora is a community-driven project that delivers the most cutting edge operating system in several editions aiming for particular use cases. The best thing about Fedora is its primary sponsor, Red Hat Inc., which is a well-known company among the Linux ecosystem.

Fedora comes in several editions, and the Fedora workstation is specially designed for developers. It is pretty stable and features numerous tools to configure the development environment. It serves mostly out-of-the-box on most hardware, and its small release delivers all-new features, security, and bug fixes.

Moreover, Fedora only ships with open source components, making it a perfect choice if you’re a die-hard open-source enthusiast. Even Linus Torvalds prefers Fedora over Debian and Ubuntu. Moreover, you can share your problems in the Fedora forum and expect a solution to arrive quickly. As Red Hat backs fedora, you can also expect it to work without issues during the development process.

5. Pop!_OS

The US-based Linux hardware manufacturer System76 announced its custom Ubuntu-based Linux distribution called Pop!_OS in 2017. The company took this step after Ubuntu decided to ditch its homegrown Unity desktop environment and adopted the already flourishing GNOME desktop environment. Now, they’ve made their own desktop environment which they’re calling COSMIC, which is a GNOME-based environment with extra features.

System76 calls Pop!_OS an operating system for developers, makers, and computer science professionals who use their machines to create new things. It supports tons of programming languages and programming tools natively.

To make your workflow more productive, Pop!_OS gives programmers a unique power with a keyboard-driven tiling window manager. Advanced window management, shortcuts, and workspaces enhance the user experience.

If you’re confused between Pop!_OS and Ubuntu, do read our Ubuntu VS. Pop!_OS article.

6. Arch Linux

Arch Linux is a favorite Linux distribution for die-hard Linux enthusiasts who want full control of their operating system. If you want to start from the ground up, you can choose Arch Linux to build a customized operating system that could easily become a great Linux distro for programming and other development purposes.

If you love the rolling Linux distributions (here are some fixed vs. rolling release differences), then look no further. Arch Linux has a bleeding-edge repository that is always up-to-date. A one-time installation is sufficient, and every time a new version is released (very early every month), you need to update your packages to install the latest versions of the same.

Again, the community is always there for you if you need help. Overall, it’s a great distro for programming and advanced users.

7. Solus OS

And here comes Solus. We’ve mentioned it a couple of times in our previous articles. Powered by the Budgie desktop environment, it is one of the most cleaner looking and one of the best distros for programming as it comes with a lot of programming tools out of the box.

Читайте также:  Mac os mojave установка с флешки хакинтош

One of the hurdles you might face if you’re coming from using Ubuntu is the “eopkg” package manager. Understanding eopkg is no rocket science, but you’ll need to spend extra time learning it.

8. Manjaro Linux

Manjaro is the choice of people who find installing Arch difficult. It has an easy GUI installer, just like Ubuntu or Linux Mint which makes the installation process a whole lot easier.

It is the second most popular distro, according to Distrowatch, which, in itself, says a lot about the distro. Combining all the power of Arch Linux, it suits best for beginners looking for Arch alternate. Moreover, Manjaro comes in three editions GNOME, KDE, and XFCE, so you don’t miss out on your favorite desktop environment.

Manjaro’s development team has been doing a pretty great job with each release and making the overall experience more polished.

9. elementaryOS

Wait but, what’s the best-looking Linux distro doing on this list? While elementaryOS is an amazing Linux distro looks-wise, it’s also based on Ubuntu which is also one of the best Linux distros for programming. Hence, if you want a nice blend of programming and macOS-like feels, look no further and install elementaryOS.

elementaryOS was one of the first Linux distros that I tried when I was pursuing my CS graduation. I absolutely loved it and was glad that something like it existed as I was tired of constant Windows slowdowns on my potato PC.

10. Kali Linux

Kali Linux, created by Offensive Security, is primarily preferred by ethical hackers to perform penetration tests on vulnerable networks and computers. But it can also act as a great companion for programmers looking for a Linux distro for programming and development.

It comes loaded with tons of pre-installed tools. However, let me clarify that it’s not designed for people who’re new to the Linux world. However, you’ll be fine using it if you’ve tried Linux and programming. Kali Linux also helps you gain knowledge that’ll surely help you excel in your career.

Just like other entries on this list, you can download its latest version and install it or dual boot from scratch.

11. Raspbian/Raspberry Pi OS

Let me get straight to the point. The Raspberry Pi is the coolest thing that I’ve ever tried. The first time I showed it to my non-techie friends, their reactions were so precious, “Wait, that thing is a computer. You’re joking, right?” This credit-card-sized computer has become a viral hit in schools as it’s heavily used for Linux programming and teaching the basics of coding.

This modest computer’s official Raspbian/Raspberry Pi OS comes loaded with tons of programming tools, connector pins, and other useful ports. This makes it a perfect Linux OS for learning embedded systems programming.

It has BlueJ, Geany, Greenfoot, Mathematica, Python, Node-RED, Scratch, and other tools for making your learning process more effective. We have a complete series of how-to articles on Raspberry Pi so, do make sure to check them out if you’re interested.

If you want to buy a Raspberry Pi, decide after reading our Raspberry Pi 4 Model B review. (Psst… It’s the most powerful Raspberry Pi ever made)

Why Is Linux Best For Programmers And Developers?

Firstly, there’s no such thing as “the best Linux distro for programming.” You can code on any GNU/Linux operating system as long as you know how to install the necessary development tools. But, we think Linux is best for programmers because; most web frameworks, tools, code editors are also open-source, just like Linux; hence, everything, when used together, feels like an ecosystem in itself and gives a good, seamless feel.

But why is Windows popular if Linux is so good? People normally still assume that things don’t function right out of the box like Windows. There are other reasons, too, like gaming which we have covered in the Linux gaming article. While you’re here, do make sure to check out our article on 13 Best Linux Distros for Gaming.

But a Linux-based OS is still the best Linux distros for programming and development purposes. If you want to learn new technologies such as game development, web development, Blockchain, or Machine learning, Linux is the best choice because it is free to use and open-source.

You don’t need software licenses to get started; instead, you can download any open-source tool for free, make changes in its source code, and heavily personalize it to suit your development environments, and maybe make your own repository of the personalized version on GitHub.

You can customize the terminal, try different text editors, and install the desktop environment of your choice. Moreover, most programming languages (if they aren’t limited to a particular OS) work on Linux. Last but not least, Linux expertise is in great demand. Getting started with Linux now can slowly but surely help you in your career.

Now that you know that Linux is great for programming let’s look at some of the best Linux distros for programming and all developers.

Conclusion

So, these were some of the best Linux distros for programming and development. There are a lot of other distros, but we included the popular ones. These distros are like a drop in the ocean.

If you’ve used a distro that deserves to be on this list, do let us know. Also, make sure to check out our other best Linux distros articles.

Источник

Оцените статью