Linux scp Command: Transfer Files and Folders Between Linux Computers – Linux Tutorial

By | August 24, 2022

Linux scp command allows us to transfer files and folders between different linux computers. In this tutorial, we will introduce how to use it to transfer.

Suppose you plan to transfer files or folders to a remote linux computer /app/jupyter, the ip of that is: 10.12.12.12

1.Transfer a file to remote linux computer

If you want to transfer a file called test.zip

We can use command below:

scp test.zip root@10.12.12.12:/app/jupyter

Here root is the user name in 10.12.12.12. You can change it to your own user name, for example: tom

You may have to enter your password before starting to transfer file.

2.Transfer more files to remote linux computer

We can use command below:

scp f1.zip f2.zip root@10.12.12.12:/app/jupyter

Then we can transfer f1.zip and f2.zip

3.Transfer a folder to remote linux computer

Similar to transfer a file, we also can transfer a folder.

Here is an example:

scp -v -r dataset root@10.12.12.12:/app/jupyter

This command will transfer folder dataset to /app/jupyter

4. Transfer folders to remote linux computer

We also can transfer some folders once.

For example:

scp -v -r dataset dataset2 root@10.12.12.12:/app/jupyter

We will transfer dataset and dataset2 to /app/jupyter

Leave a Reply