How to get started with a Linux CNC

posted in: CNC, CNC Router | 4

Why use Linux CNC?

I suppose the obvious answer is that LinuxCNC software is FREE  to use being Open Source. This post shows how to get the OX CNC router from OpenBuilds working with LinuxCNC and a TB6560 CNC controller. But this should work for most 3 axis CNC routers.

I’ve used Mach3 for several years and it always worked well for me. I did briefly try to get Linux CNC working on my Hot Wire CNC foam cutter but had a couple of issues that made me switch to Mach3. The issues weren’t major but I wasn’t very experienced in CNC and was keen to get my machine working. There was a good tutorial on Mach3 configuring a 4 axis foam cutter on YouTube, so I followed that and got my machine running.  I then had to pay $175 for Mach3.

But it always bugged me because I almost had Linux CNC working and vowed to revisit it when I had some spare time. Getting the OX CNC router from OpenBuilds working with Mach 3 was just adding a new profile and setting the slave axis option for the 2 steppers on the Y-axis.

Works with Foam Cutters as well

Getting the Hot Wire CNC foam cutter working with Linux CNC post is here  All the steps up to “Stepconf for TB6560 Motion Controller” are the same.  Which covers the install and Latency test Max Jitter figure, which you need for the hot wire machine as well.

So what’s changed now and why use LinuxCNC. Well, I don’t have to work anymore, I’ve managed to retire a few years early so I have plenty of time, wife permitting. I’ve had lots of feedback on my CNC machines and by far the biggest issue is always the software. The cost can be a factor when you’re thinking of building a CNC machine and software can soon add up. Which may just put your machine out of your reach, Mach3 is $175. I’ve spent more money on software on my foam cutter than the actual machine. So Linux CNC may be just what you need to bring your build to life. It’s very easy to use and in some ways much simpler than Mach3, but best of all as said previously its FREE.

Is Linux CNC hard to use

No, in fact, I think it’s a bit easier than Mach3. When you first open up Mach3 it can be a bit overwhelming. There are several screens which if your just a hobbyist like me without a CNC background it can look a bit complicated. LinuxCNC looks less daunting but still fully capable.

LinuxCNC Main Screen
Linux CNC Main Screen
Mach3 Main Screen
Mach3 Main Screen

If you have grown up with Windows or a Mac then Linux may look a bit strange, but don’t discount it. I’ve worked with Linux from its early days and finished my working career as a Linux System Administrator. So I’m quite proficient in Linux. LinuxCNC is just a piece of software that runs on top of Linux. Getting it working on the OX OpenBuilds router from Ozznest has been quite easy, I now have it working really well. Read on if you want to get yours working.

CNC Router Options

You have a few options depending on your requirements, how much you can afford and the amount of time you have to spare.

OpenBuilds OX router design from Ooznest in the UK.

I went for the 750mm by 500mm which is the smallest because I don’t have a great deal of space.  It’s not cheap but has some improvements over the original design for rigidity.  See my full build log on this site OX router from Ooznest

Buy a complete router.

The Chinese 6040 seem to be very popular.  Most come with a trial version of Mach3 which only allows 500 lines of G-code so using Linux CNC will save you $175. 

Build your own

If you have the time and none of the above suit your needs then this is a viable option, which I did consider myself before purchasing mine from Ozznest.  Usually, plans can be found for free on the Internet which quite often use skateboard bearings and aluminium angle to create the linear motion and is mostly built with MDF particleboard.

Linux CNC requirements

Like Mach3 you’ll need a PC with a parallel printer port. So it’s probably going to be an old desktop or one with a parallel port add-on card.  Make sure you get a 5 Volt version and not a 3.3 Volt PCI-Express card, which is not suitable for Linux CNC or Mach3.  Here’s a link to a suitable one PCI parallel printer

There are some special I/O cards you can get for Linux CNC called Mesa cards which can be used on more modern PC’s, but this post won’t cover that. I’ll assume you are using a parallel port. Linux is known to be less resource-hungry than Windows so you don’t need a powerful PC. Check the wiki here for more details http://Linux My machine is a Dell GX620 OptiPlex with 2GB of RAM, 80GB disk drive and a Pentium 4 3GHz processor.

CNC Controller hardware

I use TB6560 4 axis board which are easy to get hold of from Amazon or eBay The 4th axis is used to drive the 4th stepper in slave mode on the Y-axis. These boards get some bad reviews but mine has been 100% reliable. I think some of it may be due to the Chinese translation of the manuals and buyers not fully understanding how to configure the boards for their stepper motors.

This kit is good value on Amazon and has everything you need for a parallel port build.

TB6560 separate drivers

The alternative is to use one of the Gecko CNC controllers which are a lot more money, but very good. If you’re on a budget then try one of the Chinese TB6560 from Amazon and if you have issues you can always send it back. If you order from other sources then check their returns policy. I had issues with a 3d printer I purchased directly from a China warehouse and it was very frustrating. It got resolved eventually but took a long time.

Installing Linux CNC

First of all its very easy to install. There are a couple of ways to do this and you can even run Linux CNC from a Live install CD to see if it will run on your machine, without actually installing it. You can use a 64bit PC but it will run as a 32bit application. I choose to swap out the hard drive on my Dell for a spare disk, so I could leave Mach3 untouched. The Dell has a quick release system for the disk and I can swap it out in about 30 seconds.

You can dual-boot your PC if it has Windows installed and you have no other machine, but I’d recommend using a separate disk.

Here’s my video on how I did my install and step configuration and cutting out a drone frame for a tricopter.

It’s quite long about 45 minutes, but I’ve added sections if you check the description.

Here are the brief steps assuming you are installing on a dedicated disk drive.

Download Linux CNC http://www.Linux CNC-2.7-wheezy.iso and burn the ISO to a CD/DVD or USB pen drive. USB is much quicker.

Boot your PC from the CD or Pen drive – press F12 on most PC’s or configure the BIOS to boot from CD or USB

Linux CNC is a Real-Time Operating System, unlike Windows. So what does that mean.?

It gets a bit technical but in essence, means its guaranteed to service an instruction in a given time without being interrupted. This is the purpose of the Latency test to determine what that time is. I think I may have oversimplified this but it should help to understand why we need to do the latency test. Mach3 uses a special driver to help get around the fact because Windows isn’t a real-time OS. It does a similar test to determine if the PC is OK by looking at the interrupts. What we don’t want is the CNC software being interrupted while it’s making a cut and causing missed steps or errors in the cut path.

Latency Test

Before we start any configuration we need to run a Latency test to use in the Step configuration wizard. You need to abuse the computer, not physically. Open up several programs and move the mouse and open lots of windows. Let it run for about 15 minutes and then note the Base Max Jitter value. The test I did gave me 41801 which is OK but heading towards 50000 which is considered the maximum

linuxcnc latency

Installation on a dedicated disk

Once you have the Max Jitter value we can install from the USB drive

Select Install Graphical

Most of the option can be left at default values.  Just give the machine a name when it asks and a username name and password. When it gets to the “Partition Disk” screen just select “Guided – use entire disk”

I would advise not enabling networking if you have a dedicated machine. When running the Latency test I found when abusing the machine as they suggest it made a significant difference. To get my g-code on I use a USB thumb drive. I prefer to have the machine dedicated to being a machine controller.

Just reboot and we are ready to configure, that was easy.  The video shows each step if you’re unsure.

Stepconf for TB6560 Motion Controller with Linux CNC

I’m using the Chinese TB6560 4 axis all in one board the same one my Mach3 system is configured for.

From the menu select Linux CNC Stepconf Wizard

LinuxCNC stepconf

If this is your first configuration then select New and configure similarly to below. You can call the Machine Name anything you like. Then add your value from the Latency test to the Base Period Maximum Jitter

linuxcnc stepconf base

This next screen took a few tries to get right. The OX has two steppers on the Y axis and as my controller board is a 4 axis I can use this to drive the slave stepper. You can see that the Y step and direction are on two sets of pins but one is inverted. Don’t test this axis as it doesn’t drive both steppers. While I was getting this working I had the belts slack so I could check the steppers were going in the right direction and both working. Once I was happy I re-tensioned the belt. My limit and home switched are all wired in series and on Pin 10.

linuxcnc stepconf parallel port

Set your X-axis as below, you can test this Axis by clicking on the Test button

linuxcnc stepconf x axis

Don’t test the Y axis as it doesn’t drive both steppers.

linuxcnc stepconf y axis

The Z axis is configured as below.

linuxcnc stepconf z axis
linuxcnc stepconf done

You should have a working configuration now. On the desktop, you will see a Linux CNC logo icon with the name of your router, double-click on that and Linux CNC will start.

Testing Y axis with dual stepper motors

If you switch on your machine and click the power icon and use the up and down cursor keys, the Y-axis should move. Holding shift will move it faster. Make sure it moves without any missed steps. See my video at to hear what it should sound like.

Cutting your first CNC part

This is what it’s all been about and if you watched the video and configured your machine correctly we should be ready to make the first part.

Here’s the g-code if you want to try it out.  Just use a 3mm bit and 3mm or 1/8″ LitePly and it should work just fine.


I hope this helps to get to grips with Linux CNC.  As I said it bugged me that in my early days I almost had it working but now it works really well.  LinuxCNC is a great piece of software and still evolving.  CNC can be a money pit and as an RC hobbyist I like to have the tools to make good reliable parts, but don’t want to spend my life savings on CNC software and machines.  LinuxCNC can help here and luckily there is good free software to generate g-code such as Fusion 360.

4 Responses

  1. Pankaj Vig

    Very detailed information. Thanks! I want to ask if cheap Chinese boards like 5 axis boards work or not? I am totally new to CNC. I have seen you explain one of those in your video. Please let me know.

    • Keith

      Hi Pankaj
      Yes, they are usually OK. The best thing to do is to test it as soon as it arrives. Just mock it all up on the bench and check all the axis are working. Most of the Chinese vendors sell through Amazon which may be easier to deal with it you do have any problems.


  2. rod

    Je suis entrain de finir table CNC 1,20 x 2,10 m, avec 4 contrôleurs DM 545 avec carte d’interface 5 Axis.
    je n’ai pas confiance en la carte 5 Axis, avez vous un modèle à me conseiller.

    • Keith

      Hi Rod
      What size stepper motors are you using for your CNC Machine. Do you have the model number? It’s the stepper motors that really determine the controller. You might want to check they are well known to produce good CNC products with support for the end-user.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.