Last active
September 21, 2022 05:04
-
-
Save shenoy-anurag/c531fef4831a0784a9a40ab2079a50e9 to your computer and use it in GitHub Desktop.
Useful Bash commands
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
alias ip="dig +short myip.opendns.com @resolver1.opendns.com" # returns public IP address. | |
alias localip="ipconfig getifaddr en0" # returns private/local network DHCP IP address. change to en1 if using ethernet. | |
service_name="mongod" | |
sudo service $service_name status # shows status of service_name. eg: sudo service mongod status |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment