How Linux Works

This is a book that has been sitting on my shelf for a while. I started using Linux about 5 years ago when I started my own business. Starting out on my own required me to be my own IT guy so I setup a Redmine and SVN server. The easiest way I found was to use Turnkey Linux. Around the same time I also built myself a WorkStation. I couldn’t bring myself to pay Microsoft for the “privilege” of using Windows so I just installed Linux. I was able to use a previously owned Windows license in a VM to run LabVIEW so that seemed like a good compromise.

I found Linux to be easier to learn than I thought. It didn’t take long before I was able to do all the basics. It did require becoming comfortable with the CLI, but luckily I learned a little bit of that in college. However I never really felt like I fully understood what was going on. It was like peeling layers of an onion. Everything time I peeled back one layer I got closer to the center, but there were always more layers. That’s why I originally bought this book.

So what does Linux have to do with LabVIEW? Well 2 things really. For starters you can actually run LabVIEW on Linux. Few people do that, but it is possible. In fact, part of the reason that I finally picked up this book and decided to actually read is that someone approached me about writing a CAN driver for LabVIEW on Linux.I thought brushing up on my Linux skills would be a good start. There is another practical reason as well; linux-rt. Starting a few years ago NI transitioned all their realtime systems to linux-rt. So if you plan on doing anything with cRIO or PXI RT systems then learning Linux is a worthwhile endeavour.

This book covers a lot of ground. It mostly centered around the CLI. It for the most part ignores the Desktop systems that are out there (it does very briefly touch on them). It does go in-depth on a handful of topics. For some of the more advanced topics, it simply gives the very basics and then points you to further resources.

Here are the topics that the book covers:

  • System Startup. This is useful information to know for troubleshooting and making sure your system is set up correctly.
  • Hardware drivers. This is really useful for talking to and interacting with various types of hardware and troubleshooting issues.
  • Networking. This section covers network setup, firewall rule, ssh, and file transfer all of which are incredibly relevant for embedded systems.
  • CLI commands and shell scripting. Being able to write Bash scripts is a very useful skill to have.
  • Compiling C code. I don’t do a lot with linux-rt but I troll the forums a bit. It seems like there are always questions about cross-compiling linux drivers for various things to get them to run in linux-rt. This book seems to be a decent starting point for that. It certainly left a lot of questions, but I feel like it at least gave me a starting point and left me pointed in the right direction.

3 Comments on “How Linux Works

  1. Great article!
    I’d also add for Linux-rt that it is based on yocto, source code is available on GitHub.com/ni. I found learning yocto useful to understanding a great deal and building an automating imaging process as well. Knowing it’s yocto I guess helped me know what is Linux versus what is NI Linux.

Leave a Reply

Your email address will not be published. Required fields are marked *

*