← All commands
Topic hub Networking
Windows Linux Networking

Windows scp equivalent in Linux

Transfers files or directories securely between local and remote systems.

Windows scp
Linux equivalents
Debian/Ubuntu same command
scp file user@host:/path/
Fedora same command
scp file user@host:/path/
Arch same command
scp file user@host:/path/

Overview

What this command does

Transfers files or directories securely between local and remote systems.

Migration tip: scp uses SSH authentication. For resumable synchronization or large directory trees, rsync -e ssh is often better.

Practical tasks

Common use cases

Copy files over SSH

Transfers files or directories securely between local and remote systems.

scp file.txt user@example.com:/tmp/

Upload one file

scp user@example.com:/var/log/app.log .

Download one file

scp -r folder/ user@example.com:/srv/

Upload a directory recursively

Ready to run

Copyable Linux commands

Review paths, device names, package names and permissions before running any command.

scp file.txt user@example.com:/tmp/
scp user@example.com:/var/log/app.log .
scp -r folder/ user@example.com:/srv/

Walkthrough

Examples with explanations

scp file.txt user@example.com:/tmp/ # upload a file
scp user@example.com:/var/log/app.log . # download a file
scp -r folder/ user@example.com:/srv/ # copy a directory

Reference

Common options and variations

Command or optionUse
scp file.txt user@example.com:/tmp/Upload one file
scp user@example.com:/var/log/app.log .Download one file
scp -r folder/ user@example.com:/srv/Upload a directory recursively

Distro differences

Debian/Ubuntu vs Fedora vs Arch

This command is the same on Debian/Ubuntu, Fedora and Arch Linux when the relevant tool is installed.

DistributionPackage manager / baseEquivalent commandDifference to notice
Debian/Ubuntu same command scp file user@host:/path/ Same command on this distribution.
Fedora same command scp file user@host:/path/ Same command on this distribution.
Arch same command scp file user@host:/path/ Same command on this distribution.

Keep learning

Related Networking commands