简体   繁体   中英

Hide lines in .bash_profile

is there any way to hide lines in .bash_profile , so if someone opens the file, cannot see the line? The reason is I need to set a password for database as a variable, and just putting the plain password does not work for me. By the way, someone recommended base64 encoding, which is useless in this case

To answer your question, no there is no way to hide lines of a text file like .bash_profile .

However, there might be other solutions, such as using ssh-agent if your use case involves ssh .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM