Create professional Bash configuration files with our free online tool. Customize your Linux & macOS terminal experience in minutes.
β¨ Visual Prompt Builder with live preview | π§ Shell Options & Aliases | π History Management | π Debug Tools
No installation required. Generate, download, and copy your custom .bashrc instantly.
Configure your bash shell with powerful features including command history management, time-saving aliases, customizable PS1 prompts, advanced shell options (shopt), PATH customization, and debugging tools. Perfect for developers, sysadmins, and power users who want to optimize their terminal workflow.
.bashrcComplete documentation for all .bashrc settings available in this generator. Learn what each option does, see examples, and find links to the official GNU Bash manual β for in-depth information.
~/.bash_history).
When the limit is exceeded the oldest entries are pruned.
manual β
HISTFILE.
manual β
ls, cd) or to avoid accidentally recording secrets.
manual β
ignoredups β skip adjacent duplicates;
ignorespace β skip commands prefixed with a space;
ignoreboth β both of the above;
erasedups β remove all earlier duplicates of each new entry.
manual β
history prepends a timestamp (formatted via
strftime) to every entry. Must end with a space character so the
command text is separated from the timestamp.
Example: %Y-%m-%d %T
manual β
~/.bash_history. Useful if you want separate history
files per project or machine role.
manual β
HISTFILE on exit. With
histappend set, Bash appends instead, preserving history from
other open sessions.
manual β
PROMPT_COMMAND to flush (history -a), clear
(history -c), and reload (history -r) the history
list before every prompt, so commands from all open terminals are immediately
visible everywhere.
manual β
cd with pushd so every directory change is
recorded on the directory stack. Use back to return to the previous
directory. Both builtins are silenced to keep output clean.
manual β
.. (one level up), ... (two), ....
(three), ..... (four).
-i (prompt before overwrite) to mv,
cp, and ln. Uses -I (prompt once before
removing more than 3 files) and --preserve-root (refuse to operate
recursively on /) on rm.
alias sudo='sudo ' instructs Bash to
check the next word for alias expansion, so your other aliases continue to work
correctly after sudo.
manual β
-p) and
prints each directory as it is created (-v), giving you a clear
audit trail.
vi command to vim, the improved
editor, without having to retrain muscle memory.
--color=auto to grep, egrep, and
fgrep so pattern matches are highlighted in terminal output.
Only activates when output goes to a terminal (not a pipe).
colordiff is installed, replaces the plain unified diff output
with a syntax-colored version. The hash guard makes the alias a
no-op when colordiff is absent.
xclip. Requires xclip to be installed
(sudo apt install xclip).
ifconfig.co API and pretty-prints your public IP
information as JSON using Python's built-in
json.tool module.
git commit, crontab -e, and visudo.
VISUAL is intended for full-screen editors; most modern tools
check it first and fall back to EDITOR.
manual β
man,
git log). Common choices: less (feature-rich, the
default on most distros), most (colour support, multiple windows),
more (simple, always available).
write or wall. Reduces interruptions and provides
a small privacy/security benefit on multi-user systems.
LINES and COLUMNS variables accordingly. Without
this, text can wrap incorrectly after resizing the terminal window.
manual β
2 means you must press
Ctrl-D three times in a row to quit, preventing accidental logouts.
manual β
\u (username), \h
(hostname), \w (working directory), and \$ ($ for
users, # for root).
manual β
su.
\h shows the short hostname (up to the first dot);
\H shows the fully-qualified domain name. Helps you remember
which machine you're working on when managing multiple servers.
\w displays the full current working directory path with
~ shorthand for home; \W shows only the basename
(final directory component). Essential for navigation context.
strftime.
Useful for timestamping terminal sessions or correlating shell activity with logs.
\[\e[...m\] set text color/style. The
\[...\] brackets tell readline to ignore non-printing characters
so line wrapping and editing work correctly.
manual β
export PATH="/usr/local/bin:$PATH"
export PATH="$PATH:$HOME/.local/bin"
set -x or bash -x). The enhanced PS4 shows the
source file, line number, and function name for each executed command, making
script debugging much easier. Essential for understanding script flow and
identifying where errors occur.
+(source_file:line_number): function_name():
+(myscript.sh:42): main(): echo "Hello"
** glob pattern to match all files and directories
recursively. **/*.txt finds every .txt file in the current tree.
Requires Bash 4.0+.
manual β
?(pattern) (zero or one),
*(pattern) (zero or more), +(pattern) (one or more),
@(pattern) (exactly one), !(pattern) (anything except).
Powerful for complex filename filters.
manual β
*.TXT matches
readme.txt, README.TXT, etc. Useful on
case-insensitive filesystems or when dealing with inconsistent naming.
manual β
cd command) automatically
changes to that directory. /etc becomes equivalent to
cd /etc. Requires Bash 4.0+.
manual β
cd arguments: transposed
characters, missing characters, or one extra character. Helps when you type
cd /sur/local/bin instead of /usr/local/bin.
manual β
cdspell but for readline). Requires Bash 4.0+.
manual β
. (hidden files) in glob expansion.
Without this, * skips .bashrc, .config, etc.
Useful for operations on all files including hidden ones.
manual β
for loops when no files
match. Use carefullyβcan cause unexpected behavior if not handled.
manual β
cd argument isn't a directory, treat it as a variable name and
cd to that variable's value. Lets you define shortcuts:
export proj="$HOME/projects"; cd proj.
manual β