Task is a command runner and build tool that is written in the Go programming language. It is designed to automate and streamline the execution of commands and scripts, making it easier to manage complex workflows and development processes. Task is a modern alternative to traditional make
command. This tutorial explains how to install Task command runner on Ubuntu 24.04.
Install Task
Download the tar.gz
file from the releases page of the Task repository:
wget -qO task.tar.gz https://github.com/go-task/task/releases/latest/download/task_linux_amd64.tar.gz
Extract executable to /usr/local/bin
directory:
sudo tar xf task.tar.gz -C /usr/local/bin task
We can verify the Task version in the following manner:
task --version
Remove the downloaded file:
rm -rf task.tar.gz
Testing Task
To start using Task, create a taskfile.yml
file and define your commands (tasks) following its syntax. Example:
printf "version: '3'\ntasks:\n hello:\n cmds:\n - echo 'Hello world'" > taskfile.yml
Next, execute the command to run the task created earlier:
task hello
It will execute the hello
task defined in taskfile.yml
, resulting in the output "Hello world":
task: [hello] echo 'Hello world'
Hello world
Uninstall Task
To remove Task, delete the associated file:
sudo rm -rf /usr/local/bin/task
Leave a Comment
Cancel reply