How to hide specific keys of the command to enter in the terminal?
For example, if you use:
stty echo
I have to enter the entire team blindly.
Also, I considered the variant of aliases, but you never know, maybe there is something more improvised?
Use alias In the file ~ / .bashrc add a line, like
alias update='sudo apt update'
where update is a custom string that you invent yourself.
But try not to block other names, for example: 'apt' or 'exit' and others
And in quotes prescribe your string.
If you need a command call with arguments, just write them after your command. To make it work, you need to instruct the system to load the file with a new one:
source ~/.bashrc
Source: https://ru.stackoverflow.com/questions/949707/
All Articles
alias
If you "hide something when you type" after typing, press Ctrl + U - Hellsehergit
) + Some options can be stored in files, for example, the password from the database is in.my.cnf
. And what is the purpose of concealment? If the passwords, then ... try to get to the muscle throughmysql -u... -p...
with an explicit password, then look atcat /proc/{пид-процесса}/cmdline
- the password will be hidden:mysql-uroot-pxxxxx
. Maybe other teams can do that too - Total Pusher