Files
portfolio/labs/linux/setup/docs/bash-shell.md
T
Mateusz Suski 4e739c5c99
lint / shell-yaml-ansible (push) Failing after 16s
Add Linux fresh setup toolkit
2026-06-06 00:23:11 +00:00

1.5 KiB

Bash Shell Profile

Installation

The shell profile is installed for root:

/root/.bashrc.d/ailab.sh

The installer maintains one exact source line in /root/.bashrc and backs up changed files. Start a new Bash session or run:

source /root/.bashrc

Aliases

Alias Purpose
ll, la Detailed and hidden-file directory listings
ports Listening TCP/UDP sockets and processes
dus, dufh Directory and filesystem usage
failed, jerr, timers systemd failure, journal error, and timer views
dps, ddf, dcu Docker containers, disk use, and Compose startup
vms All libvirt guests
gpu, gpuloop NVIDIA status once or refreshed every two seconds
now Current timestamp and timezone

dcu runs docker compose up -d in the current directory and therefore may create or start resources. Review the Compose project before using it.

Functions

  • svc_status SERVICE
  • svc_logs SERVICE [LINES]
  • docker_logs CONTAINER [LINES]
  • docker_restart CONTAINER
  • vm_autostart VM
  • vm_no_autostart VM
  • path_backup PATH
  • extract ARCHIVE

Functions validate argument counts, and Docker, libvirt, and NVIDIA helpers report missing commands clearly. path_backup creates a timestamped adjacent copy and can consume substantial space for large paths.

Rollback

Review timestamped backups under /root, restore the desired .bashrc or profile copy, and start a new shell. Avoid restoring a backup without checking for unrelated shell changes made after bootstrap.