Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

display ip address linux

#private ip
hostname -I
or
ifconfig
or
ip addr show

#public ip
curl ifconfig.me
Comment

show ip address linux

$ hostname -I 
Comment

Grab IP address only (Linux)

# IP address
hostname -I | awk '{print $1}'
ip route get 1 | awk '{print $NF;exit}'
ifconfig | grep -m1 'inet' | awk '{print $2}'

# Public IP
curl ifconfig.me

# View RX & TX
ip -s -h a show eth0 | grep -A3 RX
Comment

PREVIOUS NEXT
Code Example
Shell :: powershell create service 
Shell :: linux get folder size 
Shell :: macos install ruby 
Shell :: remove soup tag 
Shell :: pip upgrade package 
Shell :: bash split and get last 
Shell :: cuda install in ubuntu 
Shell :: command to lock a user 
Shell :: download sublime notepad ubuntu 
Shell :: windows execute powershell script define user 
Shell :: brew install xcode 
Shell :: main git commands 
Shell :: linux extract tar.gz 
Shell :: homebrew redis install 
Shell :: new branch not showing in visual studio 
Shell :: linux create executable 
Shell :: command line remove directory and contents 
Shell :: mongodb install ubuntu 20.04 
Shell :: react native ubuntu 20.04 
Shell :: "GH001: Large files detected. You may want to try Git Large File Storage" error fix 
Shell :: linux no internet connection 
Shell :: Octave Install Packages Commands 
Shell :: display/search for a commit hash name in a git log 
Shell :: laravel install by composer 
Shell :: install redis windows 10 
Shell :: facebook for linux 
Shell :: hide desktop icons macos 
Shell :: change flutter package name 
Shell :: linux read text file command line 
Shell :: redis remove key 
ADD CONTENT
Topic
Content
Source link
Name
6+2 =