Got a real finger killer of a shell command you find yourself running a lot when developing or fixing something? Seems pretty obvious in retrospect but it took me a while to remember - use the alias command. Alias run = “docker build -t container name . && docker run —rm -it -p 8080:8080 container name”. Then just typing run executes those. #ShellTips #SoIRememberNextTime
#shelltips #soiremembernexttime
Here's a little something I do when rebooting a server, because I'm impatient. To reboot it, first I ssh in with:
ssh example.com
Then, after I've run `reboot` on the server and I've been kicked off, I run:
while ! !!; do sleep 3; done
The shell (bash/zsh probably others) will expand the `!!` to the last command I typed, and it will keep retrying it with a 3 second gap between attempts, until it succeeds or I hit Ctrl-C. After it logs in fine and I check everything's OK I log out as normal, which causes `ssh` to exit 0 which stops the loop.
#shelltips #linux #bash #zsh #ssh #shellscripting
Independently, MySQL is an ideal open-source database management software. Dependently, it completes the LEMP stack by linking up with Linux, Nginx, and PHP/Python/Pearl.
How to Install and Secure MySQL on Rocky Linux
Node.js is a JavaScript runtime that is free and open-source to the Linux community. As for its development, it’s built on Chrome’s V8 JavaScript engine.
How to Install Node.js on Rocky Linux
When addressing apt remove vs apt purge commands, there is always some confusion in their applicability
What is the Difference Between ‘apt remove’ and ‘apt purge’?
We will look at the concept behind how to back up and restore Linux terminal history.
How to Backup and Restore Linux Terminal History
https://www.linuxshelltips.com/backup-linux-command-history/