How to add environment variable assignments on Deepin OS 20.7 via the terminal emulator and bash shell?

I'm a passionate software developer.
Search for a command to run...

I'm a passionate software developer.
Thanks for dropping by. You can visit all my blog articles if you click on the following link: https://blog.alexandrecalaca.com/archive
Revisited and updated on October 1st, 2023 SSH keys SSH keys, short for Secure Shell keys, are a pair of cryptographic keys used in secure communication between two computers over a network, typically the internet. They are commonly used to authenti...
Components Introduction In order to truly understand props in React, we first need to be clear on what components are. A component is a reusable piece of the user interface that encapsulates structure, styling, and behavior. Instead of repeating the ...

Introduction Context By default, Codespace is using the GITHUB_TOKEN env var (the “Codespaces token”), which can’t create repos. It’s necessary to authenticate gh with a token/account that has the right scopes, or create the repo on the web first. Ob...

Solution Here it is: git commit --allow-empty-message -m "" Explanation To create a Git commit without a message, or with an empty message, you can use the --allow-empty-message flag with the git commit command. git commit --allow-empty-message -m "...

Steps Cleanup phase This phase’s goal is to removes existing containers, volumes, networks and images Stop and remove volumes docker compose down --volumes --remove-orphans The previous command stops and removes containers, networks, and default volu...

Steps Stop the service It’s not mandatory, but before uninstalling, it's a good practice to stop any running Docker services. sudo systemctl stop docker Remove docker packages It’s used to completely and forcefully remove a list of specified packag...

Environment variables are dynamic values that can affect the behavior of processes and programs running on a computer's operating system.
These variables store information such as system configuration settings, user preferences, or data that is used by various software applications.
Environment variables are used to control how programs behave and to provide them with necessary information.
CTRL + SHIFT + T
echo $SHELL
My output is
/bin/bash
Your output might be one of the following:

Use your favorite text editor to edit the shell configuration file. I'm going to use nano. You can use nano, vi, vim, gedit and even VS Code.
nano ~/.bashrc
In ~/.bashrc, add the variables at the end:
export GITHUB_TOKEN="glpat-Z2hxZY6BhDPyZwQbYuZm"
export DOCKER_TOKEN="dckr_pat_ORhj8i17IaMZ8gvLMqZgdKnkD9Z"
export PG_USER="my_user"
export PG_PASS="d9l85nbp"
if you are using nano, follow the order:
CTRL + X;
Y and press Enter;
source ~/.bashrc
echo $GITLAB_TOKEN
echo $DOCKER_TOKEN
echo $PG_USER
echo $PG_PASS
You've made it!

I hope this article has been helpful to you. Please feel free to reach out if you have any questions. Your thoughts, suggestions, and corrections are more than welcome.
By the way, don't hesitate to drop your suggestions for new blog articles.
I look forward to seeing you next time.