


[Recommended] Common methods to configure Linux environment variables!
In Linux systems, environment variables are an important mechanism for storing information about the system's running environment. When we customize the installation of software, we usually need to configure environment variables. The following are several common methods for configuring Linux environment variables. I hope they will be helpful to you.
1. export PATH
Use the export command to directly modify the value of PATH and configure the method for MySQL to enter environment variables:
Export PATH=/home/uusama/mysql/bin:PATH# Or put PATH in front export
PATH=PATH:/home/uusama/mysql/bin
Precautions:
Effective time: Effective immediately
Validity period: Valid for the current terminal, invalid after the window is closed
Effective scope: only valid for the current user
Don’t forget to add the original configuration, that is, the $PATH part, to the configured environment variables to avoid overwriting the original configuration
2.vim~/.bashrc
Configure by modifying the ~/.bashrc file in the user directory:
vim~/.bashrc# Add export PATH=$PATH to the last line:/home/uusama/mysql/bin
Precautions:
Effective time: It will take effect when opening a new terminal with the same user, or manually source ~/.bashrc to take effect
Validity period: Valid forever
Effective scope: only valid for the current user
If there are subsequent environment variable loading files that overwrite the PATH definition, it may not take effect
3. vim ~/.bash_profile
Similar to modifying the ~/.bashrc file, you also need to add a new path at the end of the file:
vim ~/.bash_profile# Add export PATH=$PATH in the last line:/home/uusama/mysql/bin
Precautions:
Effective time: It will take effect when opening a new terminal with the same user, or manually source ~/.bash_profile
Validity period: Valid forever
Effective scope: only valid for the current user
The above is the detailed content of [Recommended] Common methods to configure Linux environment variables!. For more information, please follow other related articles on the PHP Chinese website!
![[Resolved] Error Code 0x8004deea – OneDrive Can't Sync Issue - MiniTool](https://img.php.cn/upload/article/001/242/473/174629101087593.png?x-oss-process=image/resize,p_40)
Have you ever encountered the OneDrive can’t sync issue? This issue is often accompanied by some error codes for different reasons. This article on php.cn Website will develop around the error code 0x8004deea and give you some useful methods to get r

What is Wireshark? Is Wireshark safe? How to download Wireshark and install this packet analyzer? To know some details of this tool, refer to this post from php.cn that focuses on Wireshark and Wireshark download for Windows, macOS, and Linux.

Do you want to download ChatGPT Android to use it on your mobile phone or tablet? Where to download ChatGPT APK? In this post, we will introduce a safe and reliable source for downloading and installing ChatGPT Android.

If you want to transfer bookmarks from one Google account to another, you need to first export your Chrome bookmarks and then import them to another Google account. It is very easy to do this. php.cn Software will show you a complete guide in this po

Do you know how to manage updates like pausing the updates for a period or scheduling a restart to finish the installation in Windows 11 or Windows 10? In this post, php.cn Software will show the answers you want to know.

Word proofing tools makes your sentences more professional without grammatical errors. However, sometimes you may encounter missing proofing tools in Word. If you are bothered by this issue, do not worry. This article on php.cn shows you some feasibl

Want to download Dell Optimizer? This post from php.cn tells you how to download and install Dell Optimizer on Windows 11/10. Besides, you can know what it is and how to use it. Now, keep on your reading.

Do you encounter Microsoft Word, Excel, or PowerPoint stopping autosaving your files on Windows 10/11? Don’t panic! Every problem has a fix. In this post on php.cn Website, you will find some effective solutions.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Dreamweaver CS6
Visual web development tools

Notepad++7.3.1
Easy-to-use and free code editor

Zend Studio 13.0.1
Powerful PHP integrated development environment

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.
