Shell config and aliases

The shell reads a startup file before it gives you a prompt. Editing that file is how you keep your aliases, your prompt and your PATH across sessions instead of retyping them every time.

4 questions 1 task Read the lesson

Questions

Each one is marked as you go, and the explanation arrives straight after, which is the part worth reading.

4 questions, marked as you go.

1 What is ~/.bashrc, and when does it run?
2 You type alias ll='ls -l' at the prompt. How long does it last?
3 What does source ~/.bashrc do?
4 What does export PATH="$HOME/bin:$PATH" change?

Tasks

These need your own device. Run the command in Termux, then paste what it printed. The marking looks at what the output means, so spacing, version numbers and ordering do not matter. If you have not installed anything yet, the lesson covers the setup.

Set an alias and show the search path

This sets a short name for a long command, lists the aliases in the shell, then prints the folders the shell searches for commands.

Run this in Termux On your own device. Nothing on this page executes it. The command runs in your terminal, and this box only reads what you paste back.

alias ll='ls -l'; alias; echo $PATH
Marking your own work Both halves of this are checked in your browser, with no server involved, so nothing stops you from pasting output you did not run. The tasks are written so that the easiest way to pass one is to actually do it and read the result, which is the whole intention.

All sets Read the lesson