Chapter 10: Connecting to File Shares
๐ Mounting Network File Shares with net use
In professional network environments, shared directories are hosted on central file servers. You can map (mount) these paths to a virtual drive letter on your PC using the net use command:
>_Command Prompt
โโโ
net use Z: \\central-server\shared-docs
Interactive Console
This mounts the shared shared-docs directory from central-server onto the Z: drive letter, making it instantly accessible in ๐ช Windows File Explorer.
Shorthand & Custom Arguments:
- View Active Connections: Running
net usewithout arguments lists all active network mappings, connection status, and drive letters. - Persistent Connections: By default, mapped drives disconnect when you log out. To make them permanent (survive reboots), add
/persistent:yes:>_Command Promptโโโnet use Z: \\central-server\shared-docs /persistent:yesInteractive Console - Authenticating with Credentials: If the share requires security authentication, supply credentials inline:
>_Command Promptโโโ
net use Z: \\central-server\shared-docs secretPassword /user:StudentInteractive Console - Disconnecting a Mapped Share:
>_Command Promptโโโ
net use Z: /deleteInteractive Console