Bash

Bash Scripts

Simple Bash scripts to improve the CLI experience. Primarily developed for Ubuntu 22.04 but likely compatible with other Debian distros.

You should never trust scripts you aren’t familiar with. Piping straight to bash is unsafe.

tl;dr: You probably shouldn’t use these scripts unless you wrote them yourself.

disable-motd

Disable the most verbose parts of Ubuntu’s default the Message of the Day (MOTD) displayed on login.

# Run
curl -fsS https://bash.studiole.uk/disable-motd | sudo bash

# Check MOTD
run-parts /etc/update-motd.d

motd-hostname

Add a stylised ANSI artwork of the hostname to the Message of the Day (MOTD) displayed on login.

# Install figlet
curl -fsS https://install.studiole.uk/figlet | sudo bash

# Install motd-hostname
curl -fsS https://install.studiole.uk/motd-hostname | sudo bash

# Check MOTD
run-parts /etc/update-motd.d

motd-system

Add a simple compact snapshot of system resource use to the Message of the Day (MOTD) displayed on login. Showing CPU, Memory, Disk, Swap

# Install
curl -fsS https://install.studiole.uk/motd-system | sudo bash

# Check MOTD
run-parts /etc/update-motd.d

network-test

A simple script to test network connectivity.

# Run once
curl -fsS https://bash.studiole.uk/network-test | sudo bash
# Install
curl -fsS https://install.studiole.uk/network-test | sudo bash

# Run
network-test

remote-archive

Create a timestamped archive of the remote-backup-files and remote-backup-sqlite backups.

# Install
curl -fsS https://install.studiole.uk/remote-archive | sudo bash

# Run
remote-archive [SSH_HOST]

remote-backup-files

Backup files from a remote server to a local /backups directory using rsync. Sqlite files with extensions .db, .sqlite, or sqlite3 are excluded as they could become corrupted. Use remote-backup-sqlite for them.

# Install
curl -fsS https://install.studiole.uk/remote-backup-files | sudo bash

# Run
remote-backup-files [SSH_HOST] [REMOTE_DIRECTORY]

remote-backup-sqlite

Backup sqlite3 files from a remote server to a local /backups directory.

# Install
curl -fsS https://install.studiole.uk/remote-backup-sqlite | sudo bash

# Run
remote-backup-sqlite [SSH_HOST] [REMOTE_DIRECTORY]

remote-restore

Restore files backed up with remote-backup-files and remote-backup-sqlite.

# Install
curl -fsS https://install.studiole.uk/remote-restore | sudo bash

# Run
remote-restore [SSH_HOST] [REMOTE_DIRECTORY]

swatches

Print swatches of the basic terminal foreground and background pairs.

# Run once
curl -fsS https://bash.studiole.uk/swatches| sudo bash
# Install
curl -fsS https://install.studiole.uk/swatches | sudo bash

# Run
swatches

upgrade-packages

A basic script to quietly and non-interactively update and upgrade packages via apt.

# Run once
curl -fsS https://bash.studiole.uk/upgrade-packages | sudo bash
# Install
curl -fsS https://install.studiole.uk/upgrade-packages | sudo bash

# Run
upgrade-packages