LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   How to Transfer files between Linux machine and Window Machine (https://www.linuxquestions.org/questions/linux-networking-3/how-to-transfer-files-between-linux-machine-and-window-machine-424369/)

rktech83 03-13-2006 07:17 AM

How to Transfer files between Linux machine and Window Machine
 
If There are two machine ( PC ).
One has Red Hat Linux as OS.
and another has windows XP Professional as OS.

Both PCs are in common network.

Now if I wanna trasfer files between this two pc ( Linux PC to Windows PC or vice versa ) than how can i do that???

Note:

From that two machine no one is Server.

joking 03-13-2006 07:51 AM

You need to turn on samba at the RH machine. You said both are on a common network but not whether they are on the same workgroup, so if your workgroup name is not "workgroup" or you don't know what it is, then look at My Computer Properties on the WinXP machine and it will show you what it's set to. On the RH Box you will need to login as root to edit the system files. Then in /etc/samba/smb.conf you will find the line for workgroup= and edit the name in, by doing a vi smb.conf, cursoring down to the line with this on it, then moving out to where the first letter of the WORKGROUP is and pressing SHIFT-R and type in the workgroup name. Press the ESC key twice to stop the edit and then SHIFT-ZZ to save the file.

You will need a user for the WinXP box to logon to the RH box. Since your already logged in as root you can create a user: useradd -g (nown workgroup) -d /home/username -s /bin/sh username. Now type passwd username and follow the prompts. You can also do this in the gui. Then you will need to set up the samba user: smbadduser username:username follow the prompts.

Now restart samba by either "service smb restart" or /etc/rc.d/init.d/smb restart.

Give the network about 10 minutes or less and you should be able to go to Networking on WinXP and see the shares on the RH box. Double click on the share and it will ask for the username and passwd you entered earlier on the linux box. You should get a directory afterwards. Oh! by the way you may have to put in the RH BOX NAME\username in the Login dialog. With a successful login you will see what ever files are in the directory you click on. Now Open My Computer and Map a Networked Drive. Say G: and tell it to always connect. Then from then on when you boot up windows it will connect to the samba share on the RH Box.

This was a short tutuorial based on you knowing a little about all three: WinXP, Linux, and Samba.

Oh forgot: "how to transfer files" Once samba is up and running then you can cut and past or command line copy files from one to the other, as in copy C:\My Documents\very_important_file.doc G:\very_important_file.doc

kilgoretrout 03-13-2006 07:52 AM

With samba.

prasanta 03-13-2006 12:15 PM

You can also use WinSCP, which is a SFTP and SCP client for Windows using SSH.

danish5041 03-13-2006 12:49 PM

Dear,

IF you only want to transfer files between windows and linux machine so follow these steps

1 - create a user on windows machine named test with password test
2 - Share a folder on windows machine with name myfolder
3 - Now login with root on linux machine
4 - run following command
5 - mount -t smbfs -o username=test //192.168.0.2/myfolder /mnt
6 - when system ask password type test and press enter

Above steps mount your windows machine's share into /mnt please not i am assuming the windows machine ip 192.168.0.2 you should use your windows ip now you can easily copy files from/to your windows folder which is currently mapped into /mnt
and when done then use umount /mnt

Regards,
Danish Usman
danish5041@gmail.com

rktech83 03-14-2006 12:55 AM

Thanks joking for reply...
I'll try out it..

Singist 03-14-2006 03:01 AM

Hi rktech,
You could also use ssh client downloadable from www.ssh.org. allows a graphical view of file transfer windows or terminal windows. you place it on your windows system, type in the Ip address of your linux when u click on quick connect, then type in your username, hit return and you get asked for your password to your rh machine. excellent program for newbies as you get a view of each file system side by side. Give it a go.
Singist

spooon 03-14-2006 03:10 AM

if you're going to do that then might as well use the open-source WinSCP SFTP/SCP client


All times are GMT -5. The time now is 06:45 AM.