Signal9Signal9 — home
online
back to labs

profile.d: Export a Var, Extend PATH, Define an Alias

EasyCommand Line Essentials10-20 min
The brief

Set up a system-wide login-shell environment. Your assignment is in /root/case/assignment.env (ENV_VAR, ENV_VALUE, PATH_DIR, ALIAS_NAME, ALIAS_CMD).

Create a drop-in under /etc/profile.d/ (any *.sh) that:

1. exports ENV_VAR=ENV_VALUE,

2. adds PATH_DIR to PATH,

3. defines alias ALIAS_NAME='ALIAS_CMD'.

Login shells source every *.sh in /etc/profile.d/. Grading reads the files there. See /root/case/brief.txt.

What you'll do
  • Export an environment variable system-wide
  • Add a directory to PATH
  • Define a shell alias
  • Know that /etc/profile.d/*.sh is sourced by login shells

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