Tech-Wonders.com

Menu
  • Apps
  • How To
  • Gadgets
    • Mobile
  • Software
  • Technology
  • Sitemap
  • Contact Us

Tech-Wonders.com » How-to Topics

Source .bashrc File Not Found. How to Open and Edit bashrc?

If you are a Linux user, you might be aware that, unlike Windows operating systems, most of the work here is done using the commands. This system of commands seems a bit tricky initially, but once you have been using Linux servers or Linux operating systems for a long time, you easily get familiar with the system of commands you use in Linux.

Speaking of Linux, one of the systems here is Bash which comes with many other shells inside it like korn, csh, dash, and more. When you are doing anything related to this shell in Linux, there are some commands, out of which some are used to access the .bashrc files.

A brief introduction to Source .bashrc file

Before jumping right into the Source .bashrc file, you must know a little about the background. Speaking of the backgrounds here, the important thing is the shell.

What is Linux BASHRC and how to use it?

What is a shell in Linux?

So, a shell is an interpreter. It takes the commands from the users and runs those commands. Those commands from the users are run to perform all the actions and operations like navigating around some file system, using the devices, or running several programs.

As Bash is a shell that you use in Linux, several files and other shells come under its name. One of the files is the .bashrc file, and in most cases, there could be more than one of these. So, you can open the terminal in Linux and type the following command:

“find / -name .bashrc”

When you run the .bashrc command in the terminal window on Linux, you will be copying the .bashrc file on the home folder. Interestingly if there is more than one user, then the file will be copied for all of those. One thing that this command will return is home/user1/.bashrc.

It is the file that will be used whenever user1 opens a shell. Similarly, the root file will be used whenever the root opens the shell.

What is the Source .bashrc file?

It is a shell script that runs whenever any user opens a new shell on the system. You can run the following command “Source ~/.bashrc.” The interesting part is that sometimes it provides some display and sometimes not, but it runs most of the time automatically.

It is usually triggered by some event happening in the system, like running the shell or opening the terminal, or even reloading the .bashrc file manually.

Source .bashrc file location

Speaking of the location of the Source .bashrc file, it is a good place in the Linux system. So, when you need to run the .bashrc command, you open a shell every time. There are several ways to run the .bashrc command, and some of them are mentioned below:

Open the Source .bashrc file as nano

You can use the following command to run the .bashrc file using nano: “nano `/.bashrc.” When you run this command, you will see some files. At the end of that file, you can enter the following command: “echo HELLO $USER.” Once you do this, you need to save and then exit from here. You can also use it by pressing the “Ctrl + O” and “Ctrl + X” combinations on your keyboard.

Once you are done saving and exiting the file, you need to go to the terminal window on your system and type in the following command: “source ~/.bashrc.” Run this command, and you will see “HELLO” printed on the screen. Not only this, but there will be the username of the current user printed along with hello.

Source .bashrc file debug

The .bashrc file is vital and very powerful in the Linux operating system, and you can do anything in the system you want to do. Let us take an example of doing anything that you do with the Source .bashrc file in Linux.

Checking the system information

One of the most common examples here is neofetch. It displays the whole important system information, and people usually use it as a terminal login message.

So, if you are looking to try using the Source .bashrc file here, you need to follow the steps we show here.

  1. The first step will be installing the neofetch on your Linux system. You can easily do it by running the following command in your terminals: “sudo apt install neofetch”. Once you are done with the installation of neofetch you can add it to a line in your Source .bashrc file. Here you can call it Neofetch, and doing it only requires you to run the following command: “neofetch.”
  2. The next thing you need to do here is to reload Bash, and you will be done. For doing so, you need to run the following command: “source ~/.bashrc.”

As soon as you run the last command in the terminal, you will see all the special information about the system, and some type of image printed with characters will also be printed on the screen.

Using Aliases

Another amazing thing that you can do using the Source .bashrc file and the bashrc script command is to set the aliases for the longer commands. It is usually used for the commands that are hard to remember, and those are often used. So, the bashrc script can be used for setting and using aliases on your system with ease.

If you are looking to make an alias for the command that provides the list of files and directories present on your system, then you can run the command: “alias listcols=`ls -A -CF`.” Here “-A” will be the alias, and the “-CF`” will be the classification of the list, and in this way, you can create aliases for any commands in Linux.

Final Words

Although the Linux operating system is not as easy to use because of the commands, you can use several commands to control the system. Commands like bashrc script are very powerful as they allow you to do a lot of cool things and customizations.

You might also like
  • Great Solution to Ensure Protection for Your Linux
Tweet
Share
Linkedin
Whatsapp
Reddit
Email
Prev Article
Next Article
Tags:How to Edit Bashrc How to Open BASHRC File Linux Linux bashrc Source .bashrc File Not Found

Leave a Reply Cancel Reply

Ezoic | Increase your site revenue | AI for your ads

Recent Posts

  • Relax and Enjoy Online Puzzle Games on These Beautiful Sites
    Relax and Enjoy Online Puzzle Games on These Beautiful Sites
  • How to Convert Apple HEIC to PDF File (5 Best Ways)
    How to Convert Apple HEIC to PDF File (5 Best Ways)
  • Sales Compensation Software: The Key to a Successful Sales Team
    Sales Compensation Software: The Key to a Successful Sales Team
  • Top Objective-C Interview Questions (2023)
    Top Objective-C Interview Questions (2023)
  • Proven Ways to Promote Your Podcast Show & Gain More Listeners
    Proven Ways to Promote Your Podcast Show & Gain More Listeners

Categories

  • Apps
  • Big Data
  • Blog
  • Books and Reviews
  • C Programming Language
  • Cars
  • Certifications
  • Chemistry
  • Computers
  • Data Warehousing
  • Ecommerce
  • Electrical
  • Electronics
  • Engineering
  • Entrepreneurs
  • Facebook
  • Featured
  • FinTech
  • Fuzzy Logic
  • Gadgets
  • Games
  • Gmail
  • Google
  • Google Plus
  • Health Tech
  • How-to Topics
  • Infographics
  • Instagram
  • Internet
  • JavaScript
  • Jobs
  • LinkedIn
  • Marketing
  • Mathematics
  • Microsoft
  • Mobile
  • Numismatics
  • Online Earning
  • Pinterest
  • Plagiarism
  • Programming Languages
  • Python Programming Language
  • Real Estate
  • Road Transport
  • Salesforce
  • Science and Technology
  • Security
  • SEO
  • Social Media
  • Social Networking
  • Software
  • SQL
  • Swift Programming Language
  • TikTok
  • Travel
  • Troubleshooting Tips
  • Twitter
  • Web Designing and Development
  • Websites
  • Windows
  • WordPress
  • YouTube Tips and Tricks

Tech-Wonders.com

Technology Blog

About the Admin

RamaRao Bobby Hi there! I am RamaRao Bobby, Founder and Editor-in-Chief of
Tech-Wonders.com, Kakinada’s Top Technology Blog.

I am an avid Dog Lover and Tech Enthusiast. Read More

  • Archives
  • Disclaimer
  • Privacy Policy
  • Featured Comments

Recent Comments

  • Bharat Watane on Best Top 10 Marathi Websites and Blogs
  • Shree Dnyanopasana on Best Top 10 Marathi Websites and Blogs
  • Angela Bordio on 6 Online Resources for Improving Your Job Search
  • Deekshitha on Here’s All You Need To Know About Machine Learning And Why AI Is The Future
  • Akshay Sharma on Scaling Your Cloud Services When Employees Work From Home

Always Remain in Touch

Subscribe

Copyright © 2023 Tech-Wonders.com