What is the Linux equivalent of the 'net view' command?

Click For Summary

Discussion Overview

The discussion revolves around finding a Linux equivalent to the Windows command 'net view', which lists computers on a network. Participants explore the context of using this command within Microsoft networks versus TCP/IP networks, touching on concepts related to SMB (Server Message Block) and Samba.

Discussion Character

  • Debate/contested
  • Technical explanation
  • Conceptual clarification

Main Points Raised

  • Some participants inquire whether 'net view' is intended for Microsoft networks or TCP/IP networks, highlighting the proprietary nature of Microsoft's networking technology.
  • There is a suggestion that 'net view' primarily lists SMB hosts, which would include non-Windows machines only if they are running Samba.
  • One participant expresses uncertainty about whether 'net view' probes for SMB hosts or network hosts in general.
  • Clarifications are made regarding the distinction between an MS network (Windows machines sharing files) and a TCP/IP network (computers connected via Ethernet). Some participants note that there is no direct equivalent in Linux for listing all computers on a LAN.
  • It is mentioned that to see SMB hosts on a Linux machine, one would need to use Samba and its associated utilities.
  • Some participants discuss the technical aspects of how 'net view' functions, including its reliance on the master browser and the limitations of broadcasting in NetBIOS.
  • There is a mention of the need to configure routers to handle broadcasts for SMB over networks, with questions about how to achieve this using a Linux-based router.

Areas of Agreement / Disagreement

Participants express differing views on the capabilities of 'net view' and its equivalents in Linux. There is no consensus on whether a direct equivalent exists, and the discussion remains unresolved regarding the best approach to list networked computers across different operating systems.

Contextual Notes

Limitations include the unclear definitions of network types and the specific functionalities of commands like 'net view' and their Linux counterparts. The discussion also reflects varying levels of familiarity with networking concepts among participants.

Tony11235
Messages
254
Reaction score
0
What is the equivalent of dos prompt's 'net view' in linux?
 
Computer science news on Phys.org
Do you mean for seeing computers on an MS network? Or for seeing computers on a TCP/IP network?

Keep in mind, MS's "network technology" is not. Its closed proprietary stuff. That said, samba supplies the ability to access MS network shares from a linux machine (as well as sharing files or printers with MS machines).
 
So there's not an equivalent? Like with net view you get a list of computer names regardless the os. I'm talking about over a tcp/ip network, atleast I think I am.
 
Tony11235 said:
So there's not an equivalent? Like with net view you get a list of computer names regardless the os. I'm talking about over a tcp/ip network, atleast I think I am.

Well for one I am not familiar with MS-DOS commands(I don't use any MS software on my own computers), however from what I find via google my impression was it only lists SMB hosts on a network, which would only include non-windows machines if they were running samba. Unless my impression is wrong, however looking at the sample outputs given on the net that seems to be right.

So, let me try not to be confusing (someone correct me if I make a mistake here).

When I said MS network vs TCP/IP network I wasn't very clear. by MS Network I meant specifically a network of windows machines potentially sharing files and printers. What you would see if you went into 'Network Places' in Explorer. These do communicate over TCP/IP with the SMB protocol. By TCP/IP network, I meant more simply just computers connected via ethernet and communicating via TCP/IP, independent of the SMB protocol. Hopefully that made sense.

Now if you just want to see all computers connected on a LAN to yours, there is no equivalent (that I know of). If you want to see the machines that are SMB hosts, which as I understand is what 'net view' does, then you would have to look into samba, and its bash utilities.
 
Since you're not familiar dos commands, net view works like this

C:\>net view
Server Name Remark

-------------------------------------------------------------------------------
\\BLAIR Blair's Computer
\\QUANTUM-3FB626F
The command completed successfully.

This is after connecting to someone's wireless network in my apartment building. There are currently two computers connected. Mine and the owners.
 
Tony11235 said:
Since you're not familiar dos commands, net view works like this
C:\>net view
Server Name Remark
-------------------------------------------------------------------------------
\\BLAIR Blair's Computer
\\QUANTUM-3FB626F
The command completed successfully.
This is after connecting to someone's wireless network in my apartment building. There are currently two computers connected. Mine and the owners.


Yeah, that's like the sample output. That part I knew. However, what I'm not familiar with is what the command actually does, whether it probes for SMB hostss, or if it actually probes for network hosts. It looks like it probes for SMB hosts. Again, you have to realize that MS does not like to follow the rest of the world in how basic things are done. Like ASCII.
 
Keep in mind, MS's "network technology" is not. Its closed proprietary stuff. That said, samba supplies the ability to access MS network shares from a linux machine (as well as sharing files or printers with MS machines).

So TCP/IP and netbios are closed ?

When I said MS network vs TCP/IP network I wasn't very clear. by MS Network I meant specifically a network of windows machines potentially sharing files and printers. What you would see if you went into 'Network Places' in Explorer. These do communicate over TCP/IP with the SMB protocol. By TCP/IP network, I meant more simply just computers connected via ethernet and communicating via TCP/IP, independent of the SMB protocol. Hopefully that made sense.

you choice of terminology is confusing at the least. There is no such thing as a M$ network v TCP/IP. it would be more correct to say somthing like IPX V IP or OSI v IPX.

What is the equivalent of dos prompt's 'net view' in linux?

net view polls the master browser and gives you a list of computer names (SMB names).

SMB works at the session layer of the IP protocol suit.

In linux all you need to do is query your SMB master browser, and you will get the same result as net view. This will only work on a local subnet unless you have configured a WINS server or an equivalent, as netbios/smb is a broadcast technology and won't be forwarded by a router, (unless you have configured your router to be a bridge also)
 
Last edited:
'net view' is part of the samba package but I'm not sure what the equivalent command it.

'netstat' shows you all the network connections, but won't show you the samba shares.
 
Anttech said:
So TCP/IP and netbios are closed ?

I was under the impression that Netbios was. Obviously TCP/IP is not.


you choice of terminology is confusing at the least. There is no such thing as a M$ network v TCP/IP. it would be more correct to say somthing like IPX V IP or OSI v IPX.

I've always been poor at communicating. I'm referring to SMB shares, which are presented to windows users as a network vs. just a LAN, no smb shares.

My problem is I'm trying to make what I say make sense both to me, to you, and to those people who only know windows and don't know squat about how networks work. And unfortunately, my communication skills seem to be coming up short on that count.

net view polls the master browser and gives you a list of computer names (SMB names).

Which is what I thought. It will not tell you anything about *nix computers not running Samba then, which is the point I was trying to make. If you want to get a list of SMB names, then there is prolly a command in the Samba package. If you want to get a list of just hosts on a LAN, whether or not they're running Samba, net view does not do that.


SMB works at the session layer of the IP protocol suit.

Yeah, I know.

In linux all you need to do is query your SMB master browser, and you will get the same result as net view. This will only work on a local subnet unless you have configured a WINS server or an equivalent, as netbios/smb is a broadcast technology and won't be forwarded by a router, (unless you have configured your router to be a bridge also)

Speaking of which, how can I configure my router(a linux box with an iptables script) to do that?
 
  • #10
I was under the impression that Netbios was. Obviously TCP/IP is not.

nope

http://www.faqs.org/rfcs/rfc1001.html

perhaps you ment netbieu which is a M$ development of Netbios

Speaking of which, how can I configure my router(a linux box with an iptables script) to do that?

Forward port 138 and 138 to your relay agent where ever it is.. I doubt you can do this correct with a *nix box.. Basically you need to tunnel a broadcast inside a unicast packet and send it to a relay agent/wins server..
 
Last edited:

Similar threads

  • · Replies 3 ·
Replies
3
Views
1K
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
4
Views
3K
  • · Replies 18 ·
Replies
18
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 24 ·
Replies
24
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
9
Views
3K