Thursday, August 13, 2020

How to Transfer files between Linux PC’s using Terminal

By:   Last Updated: in: ,

 We have found a easy way to transfer files between two Linux PC’s using terminal and we are sharing with you.

Initial Steps:

1.Connect both the Linux Computers in Network using a Ethernet cable or Wifi  and assign a static IP address for both the systems.
For example: Set the IP address of PC I as 192.1681.1 and assign the IP address of PC II as 192.168.1.4 and set the default gateway as 192.168.1.1.

2.  Ping the IP address of PC II from PC I using ping command.
ping
For Example:
ping 192.168.1.4


3.If you get a successful ping reply you have successfully configured your network

File Transfer:

To transfer file from your PC to PC II use the command.

scp /home/yourusername/examplefile username2@ip2:/home/username2/

For Example:
I am transferring a file named wine from my home directory to the home directory of PC II by the command.

scp /home/rajamalw/wine raj@192.168.1.4:/home/raj/

For Example:
I am transferring a file named wine from my home directory to the home directory of PC II by the command

transfer files in linux via terminal

Folder Transfer:

To transfer a folder from your PC to PC II use the command.

scp -r /home/yourusername/folder/ username2@ip2:/home/username2/

For Example:
I am transferring a folder named files from my home directory to the home directory of PC II by the command.


No comments:
Write comment