How to transfer files to Linux on Ubuntu?

There are several ways to transfer files to a Linux machine on Ubuntu16.04. Here, we will cover two common methods:

Using scp command: scp stands for secure copy and encrypts the data during transfer. To use scp, open a terminal and type the following command:

1
scp /path/to/local/file.zip root@192.168.1.10:/data/file.zip

Replace /path/to/local/file with the path to the file you want to transfer, username with the username of the remote machine, remote with the IP address of the remote machine, and /path/to/destination with the path to the destination directory.

You may also specify the port number to use using the -P option:

1
scp -P 22  /path/to/local/file.zip  root@192.168.1.10:/data/file.zip

Or you can use tool like FileZilla to connect to your Linux machine via SSH/SFTP and transfer files. (Windows)