k

set up alias to quickly check your public ip address instead of going to whatismyipaddress.com for linux debian

By logderman | foreverhereintheEther | 14 May 2023


<vpnworkingcheck> will be the alias we want setup
nano ~/.bashrc #or whatever text editor you use

----------------------------------------------------------------------------------------------
alias vpnworkingcheck='dig +short myip.opendns.com @resolver1.opendns.com' #do this at the bottom of the file then save it

---------------------------------------------------------------------------------------------
source ~/.bashrc #activate new alias

---------------------------------------------------------------------------------------------
alias -p #check your alias list

---------------------------------------------------------------------------------------------

to use it type in terminal: vpnworkingcheck #you should see your public ip return

-----------------------------------------------------
https://linuxconfig.org/how-to-create-permanent-alias-on-linux #i used this article to help implement the dig command quicker and avoid going to a website

How do you rate this article?

3

Send a $0.01 microtip in crypto to the author, and earn yourself as you read!

20% to author / 80% to me.
We pay the tips from our rewards pool.