Show Local IP
2023-12-23
87 words
1 min read
Show local IP
You can see the local IP of the machine with the command - ip a
. However if you have to use the address in
some variable in a scrit. It becomes little tricky, something like
- Show the interfaces in one line with ‘-o’
- Show only IPv4 address’s with ‘-4’
and the command looks like
|
|
Replace eth0 with then correct interface name.
However there is one more command that you can try
|
|
Related Articles:
- 2022/11/12 Openvpn files to nmcli connection
- 2019/04/22 GREP_COLORS – change the colors in the GREP output.
- 2019/03/18 copy /proc folder
- 2018/11/19 xev – Check the X keyboard events
- 2018/11/12 Get to your ebooks quickly
Authored By Amit Agarwal
Amit Agarwal, Linux and Photography are my hobbies.Creative Commons Attribution 4.0 International License.