Get Wireless LAN IPv4 Address Of Device

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












-2














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.










share|improve this question























  • use command: ifconfig
    – Tejas
    Dec 11 at 1:04















-2














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.










share|improve this question























  • use command: ifconfig
    – Tejas
    Dec 11 at 1:04













-2












-2








-2







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.










share|improve this question















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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
















  • 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










1 Answer
1






active

oldest

votes


















0














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





share|improve this answer




















    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
    );



    );













    draft saved

    draft discarded


















    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









    0














    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





    share|improve this answer

























      0














      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





      share|improve this answer























        0












        0








        0






        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





        share|improve this answer












        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






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Dec 11 at 1:31









        Stephen Harris

        24.3k24477




        24.3k24477



























            draft saved

            draft discarded
















































            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.




            draft saved


            draft discarded














            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





















































            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






            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay