LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-13-2006, 07:17 AM   #1
rktech83
LQ Newbie
 
Registered: Mar 2006
Posts: 11

Rep: Reputation: 0
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.
 
Old 03-13-2006, 07:51 AM   #2
joking
LQ Newbie
 
Registered: Feb 2004
Location: Western NC
Distribution: RH 5.2, 7.3, Fedora, Gentoo
Posts: 15

Rep: Reputation: 0
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

Last edited by joking; 03-13-2006 at 07:57 AM.
 
Old 03-13-2006, 07:52 AM   #3
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,987

Rep: Reputation: 388Reputation: 388Reputation: 388Reputation: 388
With samba.
 
Old 03-13-2006, 12:15 PM   #4
prasanta
Member
 
Registered: Mar 2005
Location: India
Distribution: Debian
Posts: 368

Rep: Reputation: 37
You can also use WinSCP, which is a SFTP and SCP client for Windows using SSH.
 
Old 03-13-2006, 12:49 PM   #5
danish5041
LQ Newbie
 
Registered: May 2004
Location: Pakistan
Distribution: RHEL 4.0
Posts: 8

Rep: Reputation: 0
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
 
Old 03-14-2006, 12:55 AM   #6
rktech83
LQ Newbie
 
Registered: Mar 2006
Posts: 11

Original Poster
Rep: Reputation: 0
Thanks joking for reply...
I'll try out it..
 
Old 03-14-2006, 03:01 AM   #7
Singist
LQ Newbie
 
Registered: Mar 2006
Location: England
Distribution: RedHat 9
Posts: 16

Rep: Reputation: 0
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
 
Old 03-14-2006, 03:10 AM   #8
spooon
Senior Member
 
Registered: Aug 2005
Posts: 1,755

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


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
trying to copy files from another machine to the local machine using telnet,..how? shrike_912 Programming 6 03-14-2006 04:45 PM
sharing internet from a windows 98 machine to a Red Hat Linux machine ritwiksolutions Linux - Newbie 7 03-14-2006 10:20 AM
I can’t transfer files from my Windows machine to my Linux box. kingkongadp64 SUSE / openSUSE 10 11-04-2005 12:16 PM
Data transfer from one Linux machine to another with FTP or scp faucon Linux - Newbie 6 09-10-2003 01:37 PM
Using SMB to copy files from one linux machine to second linux machine. coppersky Linux - Networking 9 06-24-2003 12:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration