Signal9Signal9 — home
online
back to labs

bash.bashrc: Label the Prompt and Tune History

EasyCommand Line Essentials10-20 min
The brief

Tune the interactive shell for everyone via /etc/bash.bashrc (interactive non-login shells source it — distinct from /etc/profile.d, read by login shells). Your assignment is in /root/case/assignment.env (PROMPT_LABEL, HISTSIZE, HISTCONTROL).

In /etc/bash.bashrc:

1. Set PS1 to include the assigned PROMPT_LABEL (so nobody forgets which box they're on).

2. Set HISTSIZE to the assigned size.

3. Set HISTCONTROL to the assigned mode (history de-duplication).

Grading reads /etc/bash.bashrc. See /root/case/brief.txt.

What you'll do
  • Put an identifying label in the shell prompt
  • Raise the shell history size
  • Set history de-duplication
  • Know /etc/bash.bashrc (interactive) vs /etc/profile.d (login)

Hands-on lab: you work on a real Linux box in your browser, graded on the machine's actual state.