Get Wireless LAN IPv4 Address Of Device
Clash Royale CLAN TAG#URR8PPP
I want to know the easiest way and I would perfer a single line command that works on most or all Linux distros. I want to get the devices IPv4 address.
The reason why I want to know this is because I use XAMPP and to test my websites out on my phone I like to have my computer and phone connected to the same WiFi network and I connect to my website by my computers IP address.
ip ipv4 lan
add a comment |
I want to know the easiest way and I would perfer a single line command that works on most or all Linux distros. I want to get the devices IPv4 address.
The reason why I want to know this is because I use XAMPP and to test my websites out on my phone I like to have my computer and phone connected to the same WiFi network and I connect to my website by my computers IP address.
ip ipv4 lan
use command:ifconfig
– Tejas
Dec 11 at 1:04
add a comment |
I want to know the easiest way and I would perfer a single line command that works on most or all Linux distros. I want to get the devices IPv4 address.
The reason why I want to know this is because I use XAMPP and to test my websites out on my phone I like to have my computer and phone connected to the same WiFi network and I connect to my website by my computers IP address.
ip ipv4 lan
I want to know the easiest way and I would perfer a single line command that works on most or all Linux distros. I want to get the devices IPv4 address.
The reason why I want to know this is because I use XAMPP and to test my websites out on my phone I like to have my computer and phone connected to the same WiFi network and I connect to my website by my computers IP address.
ip ipv4 lan
ip ipv4 lan
edited Dec 11 at 3:42
Rui F Ribeiro
38.8k1479128
38.8k1479128
asked Dec 11 at 0:52
jzangog
1
1
use command:ifconfig
– Tejas
Dec 11 at 1:04
add a comment |
use command:ifconfig
– Tejas
Dec 11 at 1:04
use command:
ifconfig
– Tejas
Dec 11 at 1:04
use command:
ifconfig
– Tejas
Dec 11 at 1:04
add a comment |
1 Answer
1
active
oldest
votes
The traditional command, on Unix, is ifconfig
.
eg
% ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.0.0.137 netmask 255.255.255.0 broadcast 10.0.0.255
....
This command has been deprecated and may not always be installed by default. The modern command is ip
.
% ip -4 addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
inet 10.0.0.137/24 brd 10.0.0.255 scope global noprefixroute dynamic eth0
valid_lft 18396sec preferred_lft 18396sec
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f487244%2fget-wireless-lan-ipv4-address-of-device%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
The traditional command, on Unix, is ifconfig
.
eg
% ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.0.0.137 netmask 255.255.255.0 broadcast 10.0.0.255
....
This command has been deprecated and may not always be installed by default. The modern command is ip
.
% ip -4 addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
inet 10.0.0.137/24 brd 10.0.0.255 scope global noprefixroute dynamic eth0
valid_lft 18396sec preferred_lft 18396sec
add a comment |
The traditional command, on Unix, is ifconfig
.
eg
% ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.0.0.137 netmask 255.255.255.0 broadcast 10.0.0.255
....
This command has been deprecated and may not always be installed by default. The modern command is ip
.
% ip -4 addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
inet 10.0.0.137/24 brd 10.0.0.255 scope global noprefixroute dynamic eth0
valid_lft 18396sec preferred_lft 18396sec
add a comment |
The traditional command, on Unix, is ifconfig
.
eg
% ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.0.0.137 netmask 255.255.255.0 broadcast 10.0.0.255
....
This command has been deprecated and may not always be installed by default. The modern command is ip
.
% ip -4 addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
inet 10.0.0.137/24 brd 10.0.0.255 scope global noprefixroute dynamic eth0
valid_lft 18396sec preferred_lft 18396sec
The traditional command, on Unix, is ifconfig
.
eg
% ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.0.0.137 netmask 255.255.255.0 broadcast 10.0.0.255
....
This command has been deprecated and may not always be installed by default. The modern command is ip
.
% ip -4 addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
inet 10.0.0.137/24 brd 10.0.0.255 scope global noprefixroute dynamic eth0
valid_lft 18396sec preferred_lft 18396sec
answered Dec 11 at 1:31
Stephen Harris
24.3k24477
24.3k24477
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f487244%2fget-wireless-lan-ipv4-address-of-device%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
use command:
ifconfig
– Tejas
Dec 11 at 1:04