How to install and use Taskwarrior command line todo list

If you’re looking for a very efficient way to keep track of your to-do lists from the command line, Taskwarrior is the tool for you.

Image: Ribkhan/Adobe Stock

I use several task management tools, most of them in the form of a desktop or web-based application that offers a well-designed and user-friendly graphical user interface to make things easier. However, there are cases where I don’t have access to a GUI, e.g. B. if I’m working on a remote server and still want to keep a list of tasks. In these scenarios, a tool like Taskwarrior comes in handy.

SEE: Hiring Kit: Backend Developer (TechRepublic Premium)

Taskwarrior lets me manage a to-do list from the command line that does just one thing: keep a list of tasks. Taskwarrior is unobtrusive, method-neutral, in active development, open source and easy to use. With this tool I can keep individual task lists on different servers and after logging in I know what needs to be done on each one.

In this tutorial, I’ll show you how to install and use this handy command line task manager.

Jump to:

What you need to install and use Taskwarrior

To install Taskwarrior you need a running instance of Linux. Taskwarrior can also be installed on macOS using Homebrew and Windows via WSL.

I’ll be demonstrating it on Pop!_OS, so all you have to do is change the install command to match your preferred distro. For example, sudo apt-get is replaced by sudo dnf.

So let’s get to the installation.

How to install Taskwarrior

Taskwarrior is in my distribution default repository, which means installation is straightforward.

First, log in to your Linux instance and install using one of the following commands, depending on what you’re running:

  • Ubuntu: sudo apt-get install taskwarrior -y
  • RHEL: sudo dnf install task
  • OpenSUSE: zypper install taskwarrior
  • Arch Linux: pacman -S task
  • Slackware: sbopkg -i task
  • MacOS: brew install task

Once Taskwarrior is installed, you can start using it.

How to use Taskwarrior

Task warrior is easy to use. Suppose you want to add the Update Server task and restart. The command for this would be:

task add Update server and reboot

When you run your first add command, you’ll be greeted with something like this:

A configuration file could not be found in /home/jack

Would you like a sample /home/jack/.taskrc created, so Taskwarrior can proceed? (yes/no) 

Make sure you enter “yes” to allow the configuration file to be created automatically. Once this happens, the task will be added. You can then add as many tasks as you like. As you add each task, it is assigned a number. You can then view your tasks with the following command:

task list

Each task is listed in the numerical order in which it was created (Figure A).

Figure A

In my Taskwarrior example, I created three tasks.
In my Taskwarrior example, I created three tasks.

Let’s say I’m done with the first task I created, which was assigned ID 1. To delete this task, enter this command:

task 1 done

You should see something like this in the output:

Completed task 1 'Write article about Taskwarrior.'Completed 1 task.

You can then verify that the task has been deleted by reissuing the list command as follows:

task list

Final tips for using Taskwarrior

Taskwarrior is pretty basic in its features, but you wouldn’t expect much more from an open source command line task manager. Use this on any machine that either doesn’t include a GUI, or for a use case where you just need the absolute basics. In such situations, you will find that Taskwarrior serves you well.

Continue reading: The 10 Best Project Management Software and Tools (TechRepublic)

Leave a Reply

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