nmblookup -A <ip>

Display network pc "name" and "workgroup"

Checks for PC samba name and workgroup. Works fine for Windows hosts and Linux/UNIX PCs running Samba.
Sample Output
$ nmblookup -A
Looking up status of
        TIGER           <00> -         B <ACTIVE> 
        TIGER           <03> -         B <ACTIVE> 
        TIGER           <20> -         B <ACTIVE> 
        ..__MSBROWSE__. <01> - <GROUP> B <ACTIVE> 
        MYGROUP         <1d> -         B <ACTIVE> 
        MYGROUP         <1e> - <GROUP> B <ACTIVE> 
        MYGROUP         <00> - <GROUP> B <ACTIVE> 

By: ivanatora
2010-02-26 11:08:46

These Might Interest You

  • This command will display only the hosts that are active in the network. Show Sample Output

    nmap -sP your network/submask | awk "/^Host/"'{ print $2 }'
    rauhmaru · 2009-04-02 12:41:54 3
  • From the man page. lft ? display the route packets take to a network host/socket using one of several layer-4 protocols and methods; optionally show heuristic network information in transitu -A Enable lookup and display of of AS (autonomous system) numbers (e.g., [1]). This option queries one of several whois servers (see options 'C' and 'r') in order to ascertain the origin ASN of the IP address in question. By default, LFT uses the pWhoIs service whose ASN data tends to be more accurate and more timely than using the RADB as it is derived from the Internet's global routing table. -N Enable lookup and display of network or AS names (e.g., [GNTY-NETBLK-4]). This option queries Prefix WhoIs, RIPE NCC, or the RADB (as requested). In the case of Prefix WhoIs or RADB, the network name is displayed. In the case of RIPE NCC, the AS name is displayed. Show Sample Output

    lft -NAS google.com
    tulio · 2011-04-04 03:07:00 0
  • Nload is part of nload package, tested under Debian. Nload display network bandwidth statistics, -u m options stands for MBit unit measure.

    nload -u m eth0
    servermanaged · 2009-07-03 17:47:38 3
  • Prevents the need for the grep & awk statements. Sort is optional if you don't care about the output order. The network range can also be specified as in the original post. -A Display targets by address rather than DNS name. (Probably unnecessary...) -a Show systems that are alive. S fping -r1 -ag 192.168.nnn.0/24 2>/dev/null Without sorting... Show Sample Output

    fping -r1 -Aag <network>/<cidr_mask> 2>/dev/null | sort -gt. -k4
    SuperJC · 2011-12-21 22:38:51 0
  • ethstatus part of ethstatus package, is a consolle based monitor for network interfaces. Nicely display on screen a real time summary about bandwidth, speed and packets.

    ethstatus -i eth0
    servermanaged · 2009-05-09 19:33:39 0
  • That's the easiest way to do it. -I (or capital i) display all network addresses of a host

    hostname -I
    bashfan · 2012-07-18 19:43:48 0

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands

Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: