Net View Equivalent in Linux: Exploring the Commands

In summary, a command in linux that lists all computers on a LAN that are currently connected to the system, regardless of whether or not they are running smb.
  • #1
Tony11235
255
0
What is the equivalent of dos prompt's 'net view' in linux?
 
Computer science news on Phys.org
  • #2
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).
 
  • #3
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.
 
  • #4
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, independant 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.
 
  • #5
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.
 
  • #6
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.
 
  • #7
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, independant 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:
  • #8
'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.
 
  • #9
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:

1. What is the Linux equivalent of Net View in Windows?

The Linux equivalent of Net View in Windows is the "smbclient" command. It can be used to view the list of available resources on a network, similar to Net View.

2. How do I use the smbclient command in Linux?

To use the smbclient command, open the terminal and type "smbclient -L [IP address]" where [IP address] is the IP address of the computer or server you want to connect to. This will display a list of available resources on that network.

3. Can I view the status of a specific resource using smbclient?

Yes, you can use the "smbclient -L [IP address] -U [username]" command to view the status of a specific resource. This will prompt you to enter the password for the specified username.

4. Is there a graphical user interface (GUI) alternative to smbclient in Linux?

Yes, there are several GUI alternatives to smbclient in Linux, such as "Samba GUI" and "Gnome Network Browser". These can be installed through the package manager in most Linux distributions.

5. Can I use smbclient to access resources on a Windows computer?

Yes, smbclient can be used to access resources on a Windows computer. However, you may need to specify the workgroup/domain, username, and password of the Windows computer when prompted. You can also use the "smbclient //[IP address]/[resource name] -U [username]" command to directly access a specific resource on a Windows computer.

Similar threads

  • Computing and Technology
Replies
3
Views
1K
  • Computing and Technology
Replies
1
Views
2K
Replies
4
Views
2K
  • Computing and Technology
Replies
18
Views
1K
Replies
9
Views
2K
  • Computing and Technology
Replies
24
Views
3K
  • Computing and Technology
Replies
3
Views
1K
  • Computing and Technology
Replies
4
Views
1K
  • Computing and Technology
Replies
4
Views
1K
  • Programming and Computer Science
Replies
1
Views
468
Back
Top