To edit the .bashrc file, you can use a text editor of your choice. Here’s how to do it using nano, a common command-line text editor:
-
Open a terminal.
-
Type the following command to open
.bashrcinnano:nano ~/.bashrc -
Make your changes by adding or modifying environment variables or other configurations.
-
After making your changes, save the file by pressing
CTRL + O, then pressEnter. -
Exit
nanoby pressingCTRL + X. -
To apply the changes, you can either restart your terminal or run:
source ~/.bashrc
This will reload the .bashrc file and apply your changes.
