This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
# Bash Shell Profile
|
||||
|
||||
## Installation
|
||||
|
||||
The shell profile is installed for root:
|
||||
|
||||
```text
|
||||
/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:
|
||||
|
||||
```bash
|
||||
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.
|
||||
Reference in New Issue
Block a user