Answer the question
In order to leave comments, you need to log in
How to create your own command in linux? for example writing helper + tab shows commands and these commands execute bash commands?
I simply don’t remember many commands, and I have to look all over again on the Internet, for example, I use this command very often, docker stop $(docker ps -a -q)
I can’t and don’t want to remember it, I just want to helper docker stop all like this. And all commonly used commands want to do so. How can this be done?
Answer the question
In order to leave comments, you need to log in
You can learn the basics of bash and write your own scripts with commands and options.
You can use aliases.
Write :
alias docker_stop_all="docker stop $(docker ps -a -q)"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question