Net (command)

Last updated
net
Developer(s) Microsoft, IBM, ReactOS Contributors, Greentea OS Contributors
Initial releaseApril 2, 1985;39 years ago (1985-04-02)
Operating system MS-Net, DOS, OS/2, Windows, ReactOS, eComStation, ArcaOS, Greentea OS
Platform Cross-platform
Type Command
License MS-Net, OS/2, Windows, eComStation, ArcaOS: Proprietary commercial software

ReactOS: GNU General Public License

Greentea OS: GNU Lesser General Public License
Website docs.microsoft.com/en-gb/previous-versions/windows/it-pro/windows-xp/bb490948(v%3dtechnet.10)
The Windows CE 3.0 net command Microsoft Windows CE Version 3.0 (Build 126) net command 800x574.png
The Windows CE 3.0 net command

In computing, net is a command in IBM OS/2 (including eComStation and ArcaOS), Microsoft Windows, ReactOS and Greentea OS used to manage and configure the operating system from the command-line. It is also part of the IBM PC Network Program for DOS. [1]

Contents

Overview

The command is primarily used to manage network resources. [2] It is an external command implemented as net.exe. [3] When used in a batch file, the /Y or /N switches can be used to unconditionally answer Yes or No to questions returned by the command. [2] The net command has several sub-commands that can differ from one implementation or operating system version to another.

On Windows CE .NET 4.2, [4] Windows CE 5.0 [5] and Windows Embedded CE 6.0, [6] it is available as an external command stored in \Windows\net.exe. This version only supports the use and view sub-commands.

net sub-commands
NameDescriptionDOS supportOS/2 supportWindows supportReactOS supportRemarks
accessManage accessNo IBM OS/2 LAN Server, OS/2 Warp 4.5 [7] NoNo
accountsChange Netlogon service role and manage maximum user logon time, password expiration time and other account settingsNo IBM OS/2 LAN Server, OS/2 Warp 4.5 [7] Windows NT, Windows 2000, Windows XP, Windows Vista, Windows 7, Windows 8, Windows 10 [8] [3] [9] ReactOS 0.4.8 [10]
adminRun administrative command on a remote serverNo IBM OS/2 LAN Server, OS/2 Warp 4.5 [7] NoNo
aliasManage aliases currently defined in the domainNo IBM OS/2 LAN Server, OS/2 Warp 4.5 [7] NoNo
appManage information about application definitionsNo IBM OS/2 LAN Server, OS/2 Warp 4.5 [7] NoNo
appparmNoOS/2 Warp 4.5 [7] NoNoOS/2 Warp 4.5 and later only
auditList and clear contents of the network audit log of the serverNo IBM OS/2 LAN Server, OS/2 Warp 4.5 [7] NoNo
commList information about queues for shared serial devicesNo IBM OS/2 LAN Server, OS/2 Warp 4.5 [7] NoNo
computerAdd or delete computer from domain databaseNoNo Windows Server 2000, Windows Server 2003, Windows Server 2003 with SP1, Windows Server 2003 R2, Windows Server 2008, Windows Server 2012, Windows NT, Windows 2000, Windows XP, Windows Vista, Windows 7, Windows 8, Windows 10 [8] [3] [9] [11] [12] ReactOS 0.4.8 [13]
configDisplay NetBIOS configuration informationNo IBM OS/2 LAN Server, OS/2 Warp 4.5 [7] Windows 95, Windows 98, Windows NT, Windows 2000, Windows XP, Windows Vista, Windows 7, Windows 8, Windows 10 [8] [3] [9] ReactOS 0.4.8 [14]
continueContinue paused servicesIBM PC Network Program [1] IBM OS/2 LAN Server, OS/2 Warp 4.5 [7] Windows NT, Windows 2000, Windows XP, Windows Vista, Windows 7, Windows 8, Windows 10 [8] [3] [9] ReactOS 0.4.8 [15]
copyCopy and append files locally and remotelyNo IBM OS/2 LAN Server, OS/2 Warp 4.5 [7] NoNo
dasdManage and display directory limitsNo IBM OS/2 LAN Server, OS/2 Warp 4.5 [7] NoNo
deviceList statuses of shared serial devices and stop current use of a deviceNo IBM OS/2 LAN Server, OS/2 Warp 4.5 [7] NoNo
diagRun the Microsoft Network Diagnostic programNoNoWindows 95, Windows 98 [8] No
errorList and clear network error logIBM PC Network Program [1] IBM OS/2 LAN Server, OS/2 Warp 4.5 [7] NoNo
fileList files opened by remote computersIBM PC Network Program [1] IBM OS/2 LAN Server, OS/2 Warp 4.5 [7] Windows NT, Windows 2000, Windows XP, Windows Vista, Windows 7, Windows 8, Windows 10 [8] [3] [9] Unimplemented [16]
forwardRoute incoming messages and cancel forwardingIBM PC Network Program [1] IBM OS/2 LAN Server, OS/2 Warp 4.5 [7] NoNo
groupAdd, display, or modify global groups in domainsNo IBM OS/2 LAN Server, OS/2 Warp 4.5 [7] Windows Server 2000, Windows Server 2003, Windows Server 2003 with SP1, Windows Server 2003 R2, Windows Server 2008, Windows Server 2012, Windows NT, Windows 2000, Windows XP, Windows Vista, Windows 7, Windows 8, Windows 10 [8] [3] [9] [17] [18] ReactOS 0.4.8 [19]
helpDisplay syntaxNo IBM OS/2 LAN Server, OS/2 Warp 4.5 [7] Windows 95, Windows 98, Windows NT, Windows 2000, Windows XP, Windows Vista, Windows 7, Windows 8, Windows 10 [8] [3] [9] ReactOS 0.4.8 [20]
helpmsgDisplay information on error messagesNoNoWindows NT, Windows 2000, Windows XP, Windows Vista, Windows 7, Windows 8, Windows 10 [8] [3] [9] ReactOS 0.4.8 [21]
initNoNoWindows 95, Windows 98 [8] No
localgroupAdd, display, or modify local groupsNoNoWindows Server 2008, Windows Server 2012, Windows NT, Windows 2000, Windows XP, Windows Vista, Windows 7, Windows 8, Windows 10 [8] [3] [9] [22] [23] ReactOS 0.4.8 [24]
logStart/stop saving messages to a file/printer and display information about forwarding the current message logIBM PC Network Program [1] IBM OS/2 LAN Server, OS/2 Warp 4.5 [7] NoNo
logoffNoNoWindows 95, Windows 98 [8] No
logonNoNoWindows 95, Windows 98 [8] No
moveMove files locally and remotelyNo IBM OS/2 LAN Server, OS/2 Warp 4.5 [7] NoNo
nameList or manage NetBIOS namesIBM PC Network Program [1] IBM OS/2 LAN Server, OS/2 Warp 4.5 [7] Windows NT, Windows 2000, Windows XP [8] [9] Unimplemented [16]
passwordChange passwords on a server or in a domainNo IBM OS/2 LAN Server, OS/2 Warp 4.5 [7] Windows 95, Windows 98 [8] No
pausePause servicesIBM PC Network Program [1] IBM OS/2 LAN Server, OS/2 Warp 4.5 [7] Windows NT, Windows 2000, Windows XP, Windows Vista, Windows 7, Windows 8, Windows 10 [8] [3] [9] ReactOS 0.4.8 [25]
printDisplay printer queue information or print job information, or control print jobsIBM PC Network Program [1] IBM OS/2 LAN Server, OS/2 Warp 4.5 [7] Windows Server 2008, Windows Server 2012, Windows Server 2012 R2, Windows Server 2016, Windows Server (Semi-Annual Channel), Windows 95, Windows 98, Windows NT, Windows 2000, Windows XP, Windows Vista, Windows 8 [8] [9] [26] [27] [28] Unimplemented [16] Deprecated in Windows 7 and Windows Server 2008 R2
riplmachNoOS/2 Warp 4.5 [7] NoNoOS/2 Warp 4.5 and later only
riplmclasNoOS/2 Warp 4.5 [7] NoNoOS/2 Warp 4.5 and later only
runNo IBM OS/2 LAN Server, OS/2 Warp 4.5 [7] NoNo
sendSend messages to other users or computersIBM PC Network Program [1] IBM OS/2 LAN Server, OS/2 Warp 4.5 [7] Windows NT, Windows 2000, Windows XP [8] [9] Unimplemented [16]
separatorControl whether or not a separator page is printed at the beginning of a print fileIBM PC Network Program [1] NoNoNo
sessionManage server computer connectionsNo IBM OS/2 LAN Server, OS/2 Warp 4.5 [7] Windows Server 2003, Windows Server 2003 with SP1, Windows Server 2003 with SP2, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Server 2008 R2 with SP1, Windows Server 2012, Windows NT, Windows 2000, Windows XP, Windows Vista, Windows 7, Windows 7 with SP1, Windows 8, Windows 10 [8] [9] [3] [29] [30] Unimplemented [16]
shareManage shared resourcesIBM PC Network Program [1] IBM OS/2 LAN Server, OS/2 Warp 4.5 [7] Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows NT, Windows 2000, Windows XP, Windows Vista, Windows 7, Windows 8, Windows 10 [8] [3] [9] [31] [32] ReactOS 0.4.8 [33]
startStart servicesIBM PC Network Program [1] IBM OS/2 LAN Server, OS/2 Warp 4.5 [7] Windows 95, Windows 98, Windows NT, Windows 2000, Windows XP, Windows Vista, Windows 7, Windows 8, Windows 10 [8] [3] [9] ReactOS 0.4.8 [34]
statisticsDisplay and clear list of usage statistics for a workstation No IBM OS/2 LAN Server, OS/2 Warp 4.5 [7] Windows NT, Windows 2000, Windows XP, Windows Vista, Windows 7, Windows 8, Windows 10 [8] [3] [9] ReactOS 0.4.8 [35]
statusList information about current network shares and server definition settingsNo IBM OS/2 LAN Server, OS/2 Warp 4.5 [7] NoNo
stopStop servicesNo IBM OS/2 LAN Server, OS/2 Warp 4.5 [7] Windows 95, Windows 98, Windows NT, Windows 2000, Windows XP, Windows Vista, Windows 7, Windows 8, Windows 10 [8] [3] [9] ReactOS 0.4.8 [36]
timeDisplay remote computer's current time or sync time with remote computerNo IBM OS/2 LAN Server, OS/2 Warp 4.5 [7] Windows 95, Windows 98, Windows NT, Windows 2000, Windows XP, Windows Vista, Windows 7, Windows 8, Windows 10 [8] [3] [9] Unimplemented [16]
useConnect/disconnect computer to/from shared resources, or display information about computer connectionsIBM PC Network Program [1] IBM OS/2 LAN Server, OS/2 Warp 4.5 [7] Windows Server 2000, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows 95, Windows 98, Windows NT, Windows 2000, Windows XP, Windows Vista, Windows 7, Windows 8, Windows 10, Windows CE .NET 4.2, Windows CE 5.0, Windows Embedded CE 6.0 [8] [3] [9] [37] [38] [4] [5] [6] ReactOS 0.4.8 [39]
userAdd or modify user accounts, or display user account informationNo IBM OS/2 LAN Server, OS/2 Warp 4.5 [7] Windows Server 2000, Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2008, Windows Server 2012, Windows NT, Windows 2000, Windows XP, Windows Vista, Windows 7, Windows 8, Windows 10 [8] [3] [9] [40] [41] ReactOS 0.4.8 [42]
verDisplay information about workgroup redirectorNoNoWindows 95, Windows 98 [8] No
viewDisplay list of domains, computers, or resources shared by specified computersNo IBM OS/2 LAN Server, OS/2 Warp 4.5 [7] Windows Server 2000, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows 95, Windows 98, Windows NT, Windows 2000, Windows XP, Windows Vista, Windows 7, Windows 8, Windows 10, Windows CE .NET 4.2, Windows CE 5.0, Windows Embedded CE 6.0 [8] [3] [9] [43] [44] [4] [5] [6] Unimplemented [16]
whoList uses who are logged on current or remote domains, display user logon information, and list users with sessions to a specific serverNo IBM OS/2 LAN Server, OS/2 Warp 4.5 [7] NoNo

Example

The net use command has several network-related functions.

Connecting network drive and printer

net use can control mounting ("mapping" in Microsoft terminology) drive shares and connecting shared printers in a network environment. This command makes use of the SMB (server message block) and the NetBIOS protocol on port 139 or 445. The basic Windows XP configuration enables this functionality by default. Thus users can connect to and disconnect from shared resources such as computers, printers and drives.

net use can display a list of network-connection information on shared resources.

Null session connections

net use also connects to the IPC$ (interprocess communication share). This is the so-called null session connection, which allows unauthenticated users. The basic syntax for connecting anonymously is:

net use \\IP address\IPC$ "" /u:""

For example, typing at the command prompt:

net use \\192.168.1.101\IPC$ "" /u:""

attempts to connect to the share IPC$ of the network 192.168.1.101 as an anonymous user with blank password. If successfully connected to the target machine, a lot of information can be gathered such as shares, users, groups, registry keys and more. This would provide a hacker with a lot of information about a remote user. This has changed in Windows NT 4.0 SP6 already. In Windows 2000 "null session connections" could have been enabled after changes of the system-configuration.

Similar commands in other OSes

See also

Related Research Articles

cd (command) Computer command in various operating systems

The cd command, also known as chdir, is a command-line shell command used to change the current working directory in various operating systems. It can be used in shell scripts and batch files.

dir (command) Directory information command on various operating systems

In computing, dir (directory) is a command in various computer operating systems used for computer file and directory listing. It is one of the basic commands to help navigate the file system. The command is usually implemented as an internal command in the command-line interpreter (shell). On some systems, a more graphical representation of the directory structure can be displayed using the tree command.

mkdir Directory creation command on various operating systems

The mkdir command in the Unix, DOS, DR FlexOS, IBM OS/2, Microsoft Windows, and ReactOS operating systems is used to make a new directory. It is also available in the EFI shell and in the PHP scripting language. In DOS, OS/2, Windows and ReactOS, the command is often abbreviated to md.

cmd.exe Command prompt program

Command Prompt, also known as cmd.exe or cmd, is the default command-line interpreter for the OS/2, eComStation, ArcaOS, Microsoft Windows, and ReactOS operating systems. On Windows CE .NET 4.2, Windows CE 5.0 and Windows Embedded CE 6.0 it is referred to as the Command Processor Shell. Its implementations differ between operating systems, but the behavior and basic set of commands are consistent. cmd.exe is the counterpart of COMMAND.COM in DOS and Windows 9x systems, and analogous to the Unix shells used on Unix-like systems. The initial version of cmd.exe for Windows NT was developed by Therese Stowell. Windows CE 2.11 was the first embedded Windows release to support a console and a Windows CE version of cmd.exe. The ReactOS implementation of cmd.exe is derived from FreeCOM, the FreeDOS command line interpreter.

<span class="mw-page-title-main">XCOPY</span> Computing command

In computing, XCOPY is a command used on IBM PC DOS, MS-DOS, IBM OS/2, Microsoft Windows, FreeDOS, ReactOS, and related operating systems for copying multiple files or entire directory trees from one directory to another and for copying files across a network.

more (command) Terminal pager available on various operating systems

In computing, more is a command to view the contents of a text file one screen at a time. It is available on Unix and Unix-like systems, DOS, Digital Research FlexOS, IBM/Toshiba 4690 OS, IBM OS/2, Microsoft Windows and ReactOS. Programs of this sort are called pagers. more is a very basic pager, originally allowing only forward navigation through a file, though newer implementations do allow for limited backward movement.

In computing, SUBST is a command on the DOS, IBM OS/2, Microsoft Windows and ReactOS operating systems used for substituting paths on physical and logical drives as virtual drives.

<span class="mw-page-title-main">ATTRIB</span>

In computing, ATTRIB is a command in Intel ISIS-II, DOS, IBM OS/2, Microsoft Windows and ReactOS that allows the user to change various characteristics, or "attributes" of a computer file or directory. The command is also available in the EFI shell.

move (command)

In computing, move is a command in various command-line interpreters (shells) such as COMMAND.COM, cmd.exe, 4DOS/4NT, and PowerShell. It is used to move one or more files or directories from one place to another. The original file is deleted, and the new file may have the same or a different name. The command is analogous to the Unix mv command and to the OpenVOS move_file and move_dircommands.

ren (command) Computer command

In computing, ren is a command in various command-line interpreters (shells) such as COMMAND.COM, cmd.exe, 4DOS, 4NT and Windows PowerShell. It is used to rename computer files and in some implementations also directories. It is analogous to the Unix mv command. However, unlike mv, ren cannot be used to move files, as a new directory for the destination file may not be used. Alternatively, move may be used if available. On versions of MS-DOS that do not support the move command, the user would simply copy the file to a new destination, and then delete the original file. A notable exception to this rule is DOSBox, in which ren may be used to move a file, since move is not supported.

<span class="mw-page-title-main">TYPE (DOS command)</span>

In computing, type is a command in various command-line interpreters (shells) such as COMMAND.COM, cmd.exe, 4DOS/4NT and Windows PowerShell used to display the contents of specified files on the computer terminal. The analogous Unix command is cat.

del (command) Command in various operating systems

In computing, del is a command in command-line interpreters (shells) such as COMMAND.COM, cmd.exe, 4DOS, NDOS, 4OS2, 4NT and Windows PowerShell. It is used to delete one or more files or directories from a file system.

ver (command) Command in many command-line interpreters

In computing, ver is a command in various command-line interpreters (shells) such as COMMAND.COM, cmd.exe and 4DOS/4NT. It prints the name and version of the operating system, the command shell, or in some implementations the version of other commands. It is roughly equivalent to the Unix command uname.

In some operating systems, vol is a command within the command-line interpreters (shells) such as COMMAND.COM and cmd.exe. It is used to display the volume label and volume serial number of a logical drive, such as a hard disk partition or a floppy disk, if they exist.

help (command) Command in various command line shells

In computing, help is a command in various command line shells such as COMMAND.COM, cmd.exe, Bash, qshell, 4DOS/4NT, Windows PowerShell, Singularity shell, Python, MATLAB and GNU Octave. It provides online information about available commands and the shell environment.

copy (command)

In computing, copy is a command in various operating systems. The command copies computer files from one directory to another.

<span class="mw-page-title-main">TIME (command)</span>

In computing, TIME is a command in DEC RT-11, DOS, IBM OS/2, Microsoft Windows and a number of other operating systems that is used to display and set the current system time. It is included in command-line interpreters (shells) such as COMMAND.COM, cmd.exe, 4DOS, 4OS2 and 4NT.

title (command) Command of command line interpreters

In computing, title is a command in various command-line interpreters (shells) on Microsoft Windows and ReactOS that changes the title for the graphical terminal emulator window. The command is also used within DFS and ADFS to change the title of the disc in the current drive.

In computing, findstr is a command in the command-line interpreters (shells) of Microsoft Windows and ReactOS. It is used to search for a specific text string in computer files.

replace (command)

In computing, replace is a command that is used to replace one or more existing computer files or add new files to a target directory. Files with a hidden or system attribute set cannot be replaced using replace. The command lists all files that are replaced.

References

  1. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 IBM PC Network Program 1.0 Users Guide
  2. 1 2 Net - Services, File/Print shares, Permissions - Windows CMD - SS64.com
  3. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 MS-DOS and Windows command line net command
  4. 1 2 3 "net (Windows CE .NET 4.2)". docs.microsoft.com.
  5. 1 2 3 "net (Windows CE 5.0)". docs.microsoft.com.
  6. 1 2 3 "net (Windows Embedded CE 6.0)". docs.microsoft.com.
  7. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 Batch files - The NET command
  8. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 net commands in The Network Encyclopedia
  9. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 "Net services commands".
  10. "Reactos/Reactos". GitHub . 3 November 2021.
  11. "Net computer".
  12. "Net computer".
  13. "Reactos/Reactos". GitHub . 3 November 2021.
  14. "Reactos/Reactos". GitHub . 3 November 2021.
  15. "Reactos/Reactos". GitHub . 3 November 2021.
  16. 1 2 3 4 5 6 7 "Reactos/Reactos". GitHub . 3 November 2021.
  17. "Net group".
  18. "Net group".
  19. "Reactos/Reactos". GitHub . 3 November 2021.
  20. "Reactos/Reactos". GitHub . 3 November 2021.
  21. "Reactos/Reactos". GitHub . 3 November 2021.
  22. "Net localgroup".
  23. "Net localgroup".
  24. "Reactos/Reactos". GitHub . 3 November 2021.
  25. "Reactos/Reactos". GitHub . 3 November 2021.
  26. "Net print".
  27. "Net print".
  28. "Net print". 3 February 2023.
  29. "Net session".
  30. "Net session".
  31. "Net share".
  32. "Net share".
  33. "Reactos/Reactos". GitHub . 3 November 2021.
  34. "Reactos/Reactos". GitHub . 3 November 2021.
  35. "Reactos/Reactos". GitHub . 3 November 2021.
  36. "Reactos/Reactos". GitHub . 3 November 2021.
  37. "Net use".
  38. "Net use".
  39. "Reactos/Reactos". GitHub . 3 November 2021.
  40. "Net user".
  41. "Net user".
  42. "Reactos/Reactos". GitHub . 3 November 2021.
  43. "Net view".
  44. "Net view".

Further reading