0
0
Linux CLIscripting~15 mins

Aliases for shortcuts in Linux CLI - Mini Project: Build & Apply

Choose your learning style9 modes available
Aliases for shortcuts
📖 Scenario: You often type long commands in the Linux terminal. To save time, you want to create shortcuts called aliases. Aliases let you type a short word instead of the full command.For example, instead of typing ls -la every time, you can create an alias ll that runs ls -la.
🎯 Goal: Create aliases in the Linux shell to make common commands shorter and easier to use.
📋 What You'll Learn
Create an alias named ll for the command ls -la
Create an alias named gs for the command git status
Create an alias named .. for the command cd ..
Display the list of all current aliases
💡 Why This Matters
🌍 Real World
Aliases help Linux users work faster by reducing repetitive typing of long commands.
💼 Career
Many IT, DevOps, and developer roles use shell aliases daily to improve productivity and efficiency.
Progress0 / 4 steps
1
Create the first alias
Create an alias named ll for the command ls -la using the syntax alias ll='ls -la'.
Linux CLI
Need a hint?

Use the alias command followed by the alias name, an equals sign, and the command in single quotes.

2
Add more aliases
Add two more aliases: gs for git status and .. for cd ... Use the syntax alias gs='git status' and alias ..='cd ..'.
Linux CLI
Need a hint?

Each alias uses the same alias name='command' format on its own line.

3
Use the aliases
Use the alias ll to list all files with details by typing ll in the terminal.
Linux CLI
Need a hint?

Just type the alias name ll and press Enter to run the shortcut command.

4
Show all aliases
Display all current aliases by typing the command alias.
Linux CLI
Need a hint?

Just type alias and press Enter to see all aliases.