Hi, happy to join your community. This is my first post, so I start from the simple one, but useful. Maybe you don't know about it yet. When you work with the Linux server, sometimes you export some environment variables. Some envs can be neutral like or something else, but sometimes it must be safe like or . NODE_ENV=production GITHUB_API_KEY MYSQL_PASSWORD The problem is if anyone accesses the server bash and enters the command it will see the secrets: history ... 1989 MYSQL_PASSWORD=my_secret_mysql_password ... 2000 export history To be safe, before working with the bash, export Linux history control environment variable which is called . HISTCONTROL $ HISTCONTROL=ignorespace export means that if you leave the space before any bash command, it will be ignored in history. ignorespace So while exporting the secret environment variable, enter the space before export $ HISTCONTROL=ignorespace $ MYSQL_PASSWORD=my_secret_mysql_password $ export # keep in mind space before export export history So now, the Mysql password will be ignored in history ... 1999 HISTCONTROL=ignorespace 2000 export history This method is not only for environment variables, but it can also hide any bash command, even itself. export HISTCONTROL=ignorespace Follow on , , and let’s connect on Twitter GitHub LinkedIn Good luck and be safe! :) Previously published at https://dev.to/epranka/hide-the-exported-env-variables-from-the-history-49ni