Functions

This lesson discusses the four types of a ‘command’ that exist in bash: functions, aliases, programs, and built-ins.

From one angle, bash can be viewed as a programming language, albeit a quite slow and primitive one.

One of the language features it has is the capability to create and call functions.

This leads us onto the topic of what a ‘command’ can be in bash, and we cover all four of them: functions, aliases, programs, and builtins.

By the end you will have a more nuanced understanding of commands in bash.

How Important is this Lesson?

It’s possible to get by without knowing much about functions in bash, but any serious bash user will know what they do and how they work.

Basic Functions

Start by creating a simple function:

Get hands-on with 1400+ tech skills courses.