Skip to content

Instantly share code, notes, and snippets.

View OneNemo's full-sized avatar

Jamie Roy Robillard Sr OneNemo

View GitHub Profile
@OneNemo
OneNemo / fortune.md
Last active November 14, 2024 15:17
Creating a Fortune Cookie File

Fortune Cookie File Creation

Here is a tutorial for creating your own fortune cookie files. If you are not sure what fortune is, it is a 'nix utility to print out random quotes typically admins will use it as a MOTD (Message Of The Day) for login shells.

To create your own fortune cookie file you need to first create a file that has a % and only a % (and linefeed) between the quotes. One should end the file as well with no newline after it. I use vim though feel free to use your favorite editor. Note that I do not use extensions on filenames if they are not consumed by other applications that can make use of them as this is a 'nix thing 😉. eg.

$ vim myfortunes

@OneNemo
OneNemo / Bash Configuration.md
Last active June 16, 2025 04:24
Configuring Bash Efficiently

Bash Configuration

Bash is by far the most popular shell on Gnu/Linux today though there are certainly many options. I have tried many shells and eventually always came back to bash. It just works well for me. It could also be that I am just very familiar with bash so it is just comfortable. If you are a bash user too then this guide may help you out. I assume you know how to start a terminal and enter into a CLI session or you would not have a preference in shells 😁.

What I am discussing today is configuration files. When bash is first invoked it sources /etc/profile if it exists. Then ~/.bash_profile, ~/.bash_login, and ~/.profile in that order if they exist the first one found of these three will be sourced the rest will be ignored. If bash is invoked without a login then /etc/bashrc and ~/.bashrc are sourced. Though note that ~/bash_profile usually sources ~/.bashrc if it is present and ~/.bashrc on some distros will source /etc/bashrc if it is present.

I configure all of my