Windows net use Z: \server\share equivalent in Linux
Mounts a Windows/Samba share into the Linux filesystem.
net use Z: \server\share
sudo mount -t cifs //server/share /mnt/share -o username=user
sudo mount -t cifs //server/share /mnt/share -o username=user
sudo mount -t cifs //server/share /mnt/share -o username=user
Overview
What this command does
On Windows, "net use Z: \server\share" is used to mount SMB share. On Linux, the closest practical mapping shown here is "sudo mount -t cifs //server/share /mnt/share -o username=user". Mounts a Windows/Samba share into the Linux filesystem. This reference is grouped under Networking → SMB.
Windows → Linux context
What changes when you use this on Linux?
Equivalent task, different tool
Windows net use Z: \server\share maps to sudo mount -t cifs //server/share /mnt/share -o username=user for this task. Treat this as a workflow mapping rather than a character-for-character syntax translation.
Portable across the compared distros
The Debian/Ubuntu, Fedora and Arch rows use the same command in this mapping. Package availability or defaults can still vary, so check the installed tool version when an option behaves differently.
Elevated privilege appears in this workflow
At least one example uses sudo. Confirm the target path, device, service or package before running the elevated form; do not add sudo simply to bypass an unexplained permission error.
For the broader concept behind this mapping, read Linux networking for Windows users.
Practical tasks
Common use cases
Mount SMB share
Mounts a Windows/Samba share into the Linux filesystem.
sudo mount -t cifs //server/share /mnt/share -o username=user
Mount SMB share
sudo --help
Show command help when supported
man sudo
Open the manual page when installed
Ready to run
Copyable Linux commands
Review paths, device names, package names and permissions before running any command.
sudo mount -t cifs //server/share /mnt/share -o username=user
Walkthrough
Examples with explanations
# Windows equivalent: net use Z: \server\share
sudo mount -t cifs //server/share /mnt/share -o username=user
Reference
Common options and variations
| Command or option | Use |
|---|---|
sudo mount -t cifs //server/share /mnt/share -o username=user | Mount SMB share |
sudo --help | Show command help when supported |
man sudo | Open the manual page when installed |
Distro differences
Debian/Ubuntu vs Fedora vs Arch
The command "sudo mount -t cifs //server/share /mnt/share -o username=user" is the same in all three rows, while package or base details differ: Debian/Ubuntu uses apt package: samba-client / cifs-utils; Fedora uses dnf package: samba-client / cifs-utils; Arch uses pacman package: smbclient / cifs-utils.
| Distribution | Package manager / base | Equivalent command | Difference to notice |
|---|---|---|---|
| Debian/Ubuntu | apt package: samba-client / cifs-utils | sudo mount -t cifs //server/share /mnt/share -o username=user |
Same command on this distribution. |
| Fedora | dnf package: samba-client / cifs-utils | sudo mount -t cifs //server/share /mnt/share -o username=user |
Same command on this distribution. |
| Arch | pacman package: smbclient / cifs-utils | sudo mount -t cifs //server/share /mnt/share -o username=user |
Same command on this distribution. |
Keep learning