Recommended Free Tools
~/.bashrc is your per-user Bash startup file. Edit it to define aliases, reusable functions, prompt customizations, and user-level PATH entries. The safe workflow is: make a backup, edit as your normal user, run bash -n ~/.bashrc to check syntax, then apply the changes with source ~/.bashrc (or open a new terminal).
Antihost offers Linux VPS plans with full root access, unlimited traffic on a 1 Gbps port and a 14-day free trial.
What ~/.bashrc does
The file named .bashrc is a hidden file in your home directory. The tilde in ~/.bashrc means “the current user’s home directory,” so each Linux account normally has its own copy. It stores Bash settings that you want available in your interactive shell sessions rather than system-wide for every user.
As an Amazon Associate I earn from qualifying purchases.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Typical settings include:
- Aliases that replace a short name with a longer command, such as
alias ll='ls -la'. - Functions that bundle several commands into a reusable command.
- Prompt customization, including the information shown before each command.
- User-specific environment variables, including a personal addition to
PATH.
A line such as export PATH="$HOME/bin:$PATH" puts your personal bin directory at the front of the command search path. That lets commands in ~/bin be found before commands with the same name elsewhere in the existing path.
.bashrc is a plain-text configuration file, not a program that you compile. Bash reads its commands when the file is loaded. A typo can therefore affect every new interactive shell, which is why backing up and checking syntax before reloading matters.
#1 Best Overall
- BLUE LIGHT BLOCKING GLASSES: Our blue light glasses for women boast UV400 protection, blocking harmful blue rays from computer screens. With these bluelight glasses women, you can enjoy gaming, reading, or watching TV with no worries of eye strain.
- EYE RELIEF: Our blue light glasses are engineered to reduce blurry vision or strain caused by prolonged screen time. These womens blue light glasses aid in better sleep by preventing blue light from disrupting your natural sleep cycle, helping you fall asleep faster and enjoy a more restful night's sleep, making them the perfect christmas present.
- COMFORTABLE: Crafted from durable material, our trendy blue light glasses for woman or blue light glasses men ensure long-lasting comfort. The high-transmittance lenses accessories, gamer gifts for men, help keep your eyes relaxed. Perfect stocking stuffers, gifts for gamers men, christmas gifts for men, halloween costumes.
- LIGHTWEIGHT: These clear blue light glasses feature a lightweight frame, meaning they’ll stay comfy for long-term wear. Perfect as blue blockers glasses for women or mens blue light glasses, these non-prescription fake glasses for men can be worn throughout the day. The blue light blocking glasses women feature polycarbonate HD lenses, which are anti-reflective and restore true color.
- WORRY-FREE PURCHASE: If you experience any issues, our support team is ready to assist you quickly. These are the perfect costume glasses for cosplay dressing up.
Find and inspect the file
Confirm which shell you are using
The file applies to Bash. If you are unsure which shell your terminal starts, print the shell recorded for your account:
echo $SHELL
This reports the configured shell path. It does not by itself prove that the current process is Bash, but it is a useful first check when a .bashrc change appears to do nothing.
Check whether .bashrc exists
ls -la ~/.bashrc
The -a option includes hidden files, which is necessary because the name begins with a dot. If the command reports that the file does not exist, you can create it by opening it in an editor and saving it. A newly created file starts empty unless you add configuration yourself.
Read the current contents before changing anything
sed -n '1,240p' ~/.bashrc
For a shorter file, cat ~/.bashrc is enough. Reading the existing contents first helps you avoid duplicate aliases, conflicting function names, or a second PATH assignment that changes the order you intended.
Back up .bashrc before editing
Create a copy in the same home directory before making changes:
cp ~/.bashrc ~/.bashrc.backup
The backup preserves the previous version under a separate name. If a later edit causes errors, restore it with:
cp ~/.bashrc.backup ~/.bashrc
Make the copy as your normal user. You do not need sudo for a file in your own home directory. Using sudo can also be confusing because the current shell expands ~ before the elevated command runs, and elevated privileges are unnecessary for this file.
Edit the file safely
Using Nano
- Open the file:
nano ~/.bashrc. - Move to the bottom and add your new lines. Keeping personal additions together makes them easier to find later.
- Press
Ctrl+Oto write the file, pressEnterto confirm the filename, then pressCtrl+Xto exit.
If the file was missing, Nano normally creates it when you save.
Using Vim
- Open the file:
vim ~/.bashrc. - Press
ito enter insert mode and add your lines, preferably at the bottom. - Press
Esc, type:wq, and pressEnterto save and quit.
Vim also creates a missing file when you write it. If you want to leave without saving, use :q! after pressing Esc.
Rank #2
- WINDEX GAMING WIPES: effortlessly clean all your gaming gear and gaming electronics in one easy step with our new Windex Gaming Wipes
- AMMONIA FREE: our ammonia-free formula is safe to use on all of your favorite gaming equipment like consoles, headsets, controllers, screens, keyboards, and more
- PRE-MOISTENED WIPES: each wipe instantly removes dust, dirt, and stubborn smudges and fingerprints leaving a streak-free shine
- ANTI-STATIC: great for cleaning and wiping down your gaming gear and electronics leaving behind no visible residue
- COMPACT RESEALABLE PACKAGE: store your pack of Windex Gaming Wipes anywhere in your home for whenever a quick and easy wipedown is needed
Use an editor you already understand
You can substitute another terminal editor if it is installed. The important details are the path (~/.bashrc), saving the file as plain text, and preserving the leading dot in the filename. Do not edit /etc/bash.bashrc when you intend to change only your account; that is a different, system-level file and may affect other users.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Add common Bash settings
Create an alias
An alias gives a short command name to a longer command. Add this line:
alias ll='ls -la'
After reloading the file, typing ll runs ls -la. Use quotes around the replacement command when it contains spaces or shell characters. An alias is textual command substitution; it is not a separate executable file.
Choose names that do not hide commands you still need to run directly. To see whether a name is already an alias, function, or executable, use:
type ll
Add a personal directory to PATH
To search your personal bin directory first, add:
export PATH="$HOME/bin:$PATH"
The existing value is retained after the colon, so programs already available through your system path remain available. Putting $HOME/bin first gives it precedence when two commands have the same name. Create the directory separately if you need it:
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →mkdir -p "$HOME/bin"
Only add directories you control. A writable directory placed early in PATH can cause an unintended script to run instead of the command you expected.
Define a function for repeated work
Functions can accept arguments and run multiple commands. This example creates a directory and then enters it:
mkcd() {
mkdir -p -- "$1" && cd -- "$1"
}
After reloading, mkcd projects/demo creates the directory if needed and changes the current shell into it. The && means the directory change happens only if creation succeeds. Quoting the argument prevents spaces and shell metacharacters from being split unexpectedly.
Customize the prompt carefully
The prompt is commonly controlled by the PS1 variable. A simple prompt that shows the current user, host, and working directory is:
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problemsRank #3
- Ergonomic & Adjustable Design: Fight "text neck" and improve your posture. Designed for comfort, it offers an adjustable height (7.1in-8.5in) (1.4in adjustable range) and angle (5°-85°) Please note: cell phone stand is only 9 inches tall—the length of a standard pencil
- Without blocking subtitles Perfect for office desk Tiktok Face Time Zoom video—this is the ultimate kitchen desk essential for phones! Perfect viewing experience while reducing neck back strain, A must-have for gamers streamers desk, and anyone who values both style and support!
- Sleek & Stable Design fits Otterbox Case: Say goodbye to bent cables, tangles, and tip-overs! LISEN’s stylish adjustable desk phone holder features a built-in charging hole and smart cable management, keeping your phone secure and your workspace clutter-free cool gadgets for men
- ANTI-SLIP DESIGN free hands: The under 10.00 items easy gadgets back and the bottom of this kitchen essentials for women are fully covered by anti-skid silicone, which LISEN stand up desk decor can provide maximum protection device from any scratches and slides
- Your Perfect Viewing Companion:If your product arrives damaged or breaks within 365 days, reach out to LISEN for a quick and hassle-free solution. Struggling with assembly, like tightening the screw? We’ve got your back! Your experience matters to us. (Product including: phone Holder stand*1, screw*1, hexagon screwdriver*1, specification*1)
PS1='u@h:w$ '
In this value, u represents the user name, h the host name, w the working directory, and $ a prompt character that differs for a regular user and the superuser. Keep prompt escapes inside the quoted value so Bash expands them when it displays the prompt.
Check syntax before loading changes
Run Bash’s no-execution syntax check against the file:
bash -n ~/.bashrc
This reads the file and checks its syntax without executing the commands in it. If the command prints nothing and returns successfully, Bash did not find a syntax error. If it reports a line number, reopen the file and inspect that line and the lines immediately before it. An unclosed quote, brace, parenthesis, or function body often makes the reported line appear later than the original mistake.
A syntax check does not prove that every command will succeed. A command can be syntactically valid but still fail because a directory is missing, a program is not installed, or a variable has an unexpected value. Check syntax first, then reload and test each new alias or function.
Apply the edited configuration
Reload the current shell
To read the file into the terminal you are currently using, run:
source ~/.bashrc
The equivalent shorthand is:
. ~/.bashrc
Reloading changes the current shell process without closing the terminal. Test the result immediately, for example:
type ll
printf '%sn' "$PATH"
Start a fresh Bash process
If the current shell has accumulated confusing state, replace it with a fresh Bash process:
exec bash
exec replaces the current shell process rather than opening an additional nested terminal. This is useful after a complicated session or when you want to test the startup configuration from a clean Bash process. You can also close and reopen the terminal; on some shared or cluster systems, changes may not take effect until you sign in again.
Verify each type of change
Alias verification
type ll
ll
The first command should identify ll as an alias and show its replacement. The second should produce the expected long directory listing. If type says the name is not found, the file was not loaded in that shell or the alias line was not saved.
Rank #4
- Easy Installation: Our gaming lights have been designed to enhance your entertainment experience. Simply position the led light bar next to your TV or game console to create a game room environment with ease. They come with USB power and a 60 inch cord for direct mounting and mobility
- Audio Syncing & Extensive Mode: The built-in high-sensitivity music sensor allows you to sync the TV led lights to your favorite music. Lights react and move to the beat of music, film and game audio, creating an incredible immersive sound and light experience – and all without the need for an additional hub. You can choose from 64+ patterns, including strobe, illusion, jump, energy, gradient, running, chasing, fluttering mode etc. Each mode can be applied to different scenes
- 64+ Chasing IC+RGB & W Effect: The independent control design of IC+RGB and white all-in-one multifunctional rgbw led bar lights monitor backlight allows you to easily switch the led lights for desk between IC+RGB and white to enjoy a variety of lighting effects, you can choose white lighting mode with high brightness for better illumination when working, etc. Choose IC+RGB lighting mode when you need to create an entertaining atmosphere for the light show, 16 million colours of Color changing rgb light bar let you dance to the beat and create a dynamic party atmosphere
- Dynamic and Dimmable Lights: 1%-full brightness free brightness adjustment gives you the flexibility to adjust dimmable led light bar for room decorations or a variety of occasions
- USB Powered: USB light bars for room can be powered by powernank, usb charger, TV, Monitor, laptop PC mainframe, making behind TV led lighting bar easy to install in any location.TV led lights are powered by the TV usb interface / PC mainframe, can be turned on/off synchronously with TV / PC
Function verification
type mkcd
mkcd /tmp/bashrc-test
pwd
type should identify the name as a function. The final command confirms that the function changed the working directory of the current shell; a function that launches a separate process would not change the parent shell’s directory.
PATH verification
printf '%sn' "$PATH"
command -v my-command
Inspect the colon-separated value to confirm that the intended directory appears where you expect it. Replace my-command with an actual executable in your personal directory. If Bash still finds another copy, check the directory order and whether the file is executable.
Troubleshoot changes that do not work
The file has a syntax error
Run bash -n ~/.bashrc again and use the reported line number as a starting point. Look for:
Free tools Windows power users keep installed
One-click scans. No signup required.
- A single or double quote that was opened but not closed.
- A function with a missing closing brace.
- An unmatched parenthesis or command substitution.
- A line copied with unusual quotation marks instead of ordinary ASCII quotes.
Restore the backup if the shell becomes difficult to use, then reapply one change at a time:
cp ~/.bashrc.backup ~/.bashrc
bash -n ~/.bashrc
source ~/.bashrc
The change was saved but is not active
Saving a file does not alter the shell process that is already running. Run source ~/.bashrc or . ~/.bashrc, then test the command. If a new terminal also lacks the setting, confirm that the terminal is using Bash with echo $SHELL and inspect the file again with sed -n '1,240p' ~/.bashrc.
Do not assume every type of shell session loads this file automatically. Startup behavior depends on how the session is launched and which shell is running. When in doubt, load the file explicitly for the current Bash session and treat a new-login test separately.
An alias works in one command but not in a script
Aliases are intended for interactive command entry and may not be available in a non-interactive script. Put reusable logic in a function or, for scripts, in an executable script file instead of relying on an interactive alias. This keeps automation independent of a user’s prompt configuration.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minutePC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11A PATH change creates unexpected command selection
Print the path and inspect the selected executable:
printf '%sn' "$PATH"
command -v command-name
Replace command-name with the command in question. If the personal directory appears first, that is expected to take precedence. Remove or reorder the export if that behavior is not wanted, then reload the file.
Best Value
- Compatible with Wide Screens - To ensure compatibility with the dual monitor mount, your each monitor must meet three conditions at the same time: First, computer screens size range: 13 to 32 inches. Second, screen weight range: 4.4 to 19.8 lbs. Third, the back of the monitor screen must have VESA mounting holes with a pitch of 75x75mm or 100x100mm.
- Regarding the compatibility with desks - Your desk must meet three conditions at the same time: First, desk material: Only wooden desks are recommended, plastic or glass desks cannot be used. Second, desk thickness range: 0.59" - 3.54". Third, the bottom of the desk should not have any cross beams or panels, as this will interfere with installation. We recommend carefully checking that your desk and monitors meets all above conditions before purchasing.
- Dual C-Clamp Hold - Worried your dual monitors might wobble or slip? Our upgraded base uses a larger platform plus a dual C-clamp structure to lock the dual monitor arm firmly to your desk. Each arm safely keeps your screens steady while you type, click and game—no shaking, no sliding, just a clean and secure setup you can trust every day. It also provides Grommet Mounting installation choice, both options ensure stable and secure fixation for your 0.59" - 3.54" desk.
- Full-Motion Adjustment For Comfortable View - Pull the screen closer when you’re deep in a spreadsheet, push it back to watch videos, or rotate to portrait for coding — moving everything smoothly with just one hand. The monitor stand offers +85°/-50° tilt, ±90° swivel and 360° rotation. Raise your monitor up to 15.75″ to support a healthy sitting posture. Whether you’re working from home, gaming through the night, or switching between video calls and documents, getting the screens to your natural line of sight helps relieve neck, shoulder and back strain so you can stay focused longer with less fatigue.
- Keep Your Desk Organized: By lifting both screens off the desktop, this dual monitor stand opens up valuable space for your keyboard, notebook, docking station or a simple, clutter-free work area. Built-in cable management guides wires along the arms, keeping cords out of sight and out of the way. Enjoy a tidy, modern workstation that looks as good as it feels to use.
Changes disappear after signing in again
On some university, enterprise, or cluster systems, the environment is assembled by centrally managed login configuration. Documentation for such systems may require you to sign out and sign back in before a change is visible, and an administrator may restrict which startup files are used. Test after a fresh sign-in and follow the system’s own shell policy rather than copying settings into a system-wide file.
Organize a maintainable .bashrc
Keep personal additions together
Place your aliases, functions, and exports in a clearly marked section near the bottom:
# Personal aliases
alias ll='ls -la'
# Personal commands
export PATH="$HOME/bin:$PATH"
# Personal functions
mkcd() {
mkdir -p -- "$1" && cd -- "$1"
}
Comments begin with # outside a quoted value. They do not execute, but they explain why a setting exists and make future troubleshooting faster.
Avoid duplicate exports and aliases
Appending the same PATH export repeatedly can add the same directory every time a file is loaded. Keep one authoritative line. Likewise, define an alias or function once and remove obsolete versions instead of leaving several definitions that depend on their order.
Use explicit paths when safety matters
For destructive commands, avoid aliases that silently add options unless you understand the consequences. Test a new function with harmless sample directories first. A readable, explicit function is safer than a compact line whose quoting and argument handling are unclear.
Common questions
Where is .bashrc on Linux?
For your account, it is normally ~/.bashrc, which expands to a hidden file named .bashrc in your home directory. Use ls -la ~ to display hidden files.
Free tools Windows power users keep installed
One-click scans. No signup required.
Can I edit it with a graphical text editor?
Yes, provided the editor opens the file in your home directory and saves it as plain text. The terminal commands in this guide are useful because they work on local, remote, and minimal Linux installations where a graphical editor may not be available.
Should I run sudo nano ~/.bashrc?
No. Your own ~/.bashrc should be edited as your normal user. Administrative privileges are unnecessary and can make ownership or path expansion harder to reason about.
What if I break the file and every new terminal shows errors?
Open a terminal, restore ~/.bashrc.backup, run bash -n ~/.bashrc, and then load the restored file with source ~/.bashrc. If the backup is unavailable, remove the last setting you added and check syntax after each correction.
Do I need to reboot Linux after editing?
No. Use source ~/.bashrc for the current shell, exec bash for a fresh Bash process, or open a new terminal. A shared or cluster environment may instead require signing out and signing in again before its managed session setup is applied.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
A repeatable editing checklist
- Confirm that the terminal is using Bash or that you are intentionally editing a Bash configuration file.
- Inspect the existing file with
ls -la ~/.bashrcand a reader such assed. - Create a backup with
cp ~/.bashrc ~/.bashrc.backup. - Edit
~/.bashrcas your normal user; do not usesudofor your own file. - Add one logically grouped alias, function, prompt setting, or export at a time.
- Run
bash -n ~/.bashrcbefore loading it. - Apply it with
source ~/.bashrcor. ~/.bashrc. - Test the exact command, function, prompt, or path you changed.
- If something fails, restore the backup and reintroduce changes individually.
With that workflow, .bashrc becomes a controlled place for personal Bash customization rather than a fragile collection of untested commands.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




