Question Locked

how do I network my laptop to my pc?

0 helpful
10 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Ok, so I wasn't exactly sure how to word this question to do a decent search on google. I kept getting related, but non-specific answers.

My situation is:
I have a laptop, running ubuntu and desktop running the same version of ubuntu.

my desktop is connected, via ethernet, to a netgear router(wireless), which is connected to my internet modem. and that lets my laptop get on the net.

I want to share a folder on my desktop with my laptop. so it's kind of a wired-to-wireless thing. how do I set that up? I've never been good with networking aside from using crossover cables, so I'm not sure how to proceed with this..

thanks :-)

10 replies

by oh smeg

And bridge the Wired and Wireless Networks. Quite often these devices separate the Wired and Wireless LAN's from each other by default so you need to [b]Bridge[/b] them together so that you can see the Wired LAN from the Wireless LAN.

The directions on how to do this will appear in your Instruction Manual that came with the WiFi Access Point. ;)

Col

by oldbaritone

One NIC on each shouldn't need to be bridged - the Netgear should take care of that, assuming the two computers are getting DHCP from the same source, probably the Netgear router - it doesn't matter whether they're on wired or wireless, as long as they're all in the same subnet.

by dldorrance

If all suggestions fail, consider trying Mint Linux, which is Ubuntu under the hood with some wireless drivers that work out of the box.

by r_widell

Unfortunately, Tech Republic won't permit me to answer the question.

I get a "Permission Denied" response

[edited]-- apparently I have to login twice.

by oh smeg

This seems to be cured now/for the time being.

But like all things on a new site which is what this effectively is now anything can happen. ;)

Col

by r_widell

If your Netgear Wireless router has a mostly default configuration it should be providing both DNS and DHCP services to your LAN (wired and wireless). You can confirm this by right-clicking the Network Manager applet (near the clock and your username) on each machine and selecting "connection information". There should be a number of fields (Broadcast Address, Netmask, Default Route, Primary DNS, Secondary DNS) that are identical on both machines, while the IP address is only different for the least significant (right-most) byte of the dotted-decimal value. You will probably see something like 192.168.yyy.xxx. The .yyy field should be identical while the .xxx field must be different. If all of the above is true, you're ready to move on.

In all instances that follow, a string shown in double quotes (") represents a command that should be entered verbatim (with variable substitution) into a command line (terminal) window. Do not include the quotes in the command. Single quotes (') signify the anticipated response to a command.

On each machine, open a terminal window (Applications->Accessories->Terminal) and enter the following command: "ping -c 5 " where is the IP address of the other machine. The response should look like 'PING () 56(84) bytes of data.' followed by 5 lines that look something like '64 bytes from : icmp_seq=1 ttl=64 time=1.46 ms' and a couple of lines that show overall statistics.

If that works, then ping the other machine using the hostname, "ping -c 5 " where is the hostname of the other machine. If you don't know the hostname, type "hostname" in the terminal window. The string returned must be non-null and unique for each machine. If the response to this ping looks similar to the response when pinging by IP you're good to go. In my experience, most Linux distros assume that you're connecting to a managed DHCP environment, where the DHCP server tells the client what it's hostname is for that session. Unfortunately, that doesn't work with the typical residential gateway (like your Netgear), so I wouldn't be surprised if this ping fails due to an inability to resolve the hostname. Check out the Ubuntu wiki and forums to fix this.

If both ping commands work, you can use either Samba or NFS. If you can only ping via IP, NFS is by far the easiest approach. It's also the approach I'd recommend for the homogenous (2 linux machines) environment you describe.

On each machine enter "aptitude search nfs" in the terminal window. I expect you'll find that nfs-common is already installed on both machines. If it is, you're ready to add a line in /etc/fstab on the laptop to define where and how to mount the folder that will be shared by the desktop machine. The man pages for fstab, mount and nfs will provide the necessary info to enable you to configure this how you wish.

On the desktop you'll need to add the nfs-server package. This is actually a virtual package, so I recommend using the kernel-space service. In the terminal window, issue the command "sudo apt-get install nfs-kernel-server". The nfsd service won't actually start until there's a valid /etc/exports file, so read the man pages for exports(5) and exportfs(8) for information on the syntax for that file (make it work for you). The nfsd service will then automatically start upon the next reboot. You can start it manually without rebooting by issuing the terminal command "sudo service nfs-kernel-server start".

by jasonjb1222

Modify your samba.conf (file) and create your shares.

/etc/fstab (file)

Make your modifications in this file. It's pretty self explanatory. Just MOUNT your shares into an existing folder. If you do not have one, you will have to create it for the prupose of the mount.
** It will allow you to create a mount point permanently on the system, so whenever you reboot, etc. It will be back.
If it gets disconnected for whatever reason:
mount -a will remount it.

by cvaughan02

hey guys,

I tried samba, and I tried your sugesstions widell(very thorough), but I was just having too many issues. things wouldn't work right, or the hostname wouldnt ping, or whatever. So, I ended up going with the tried and true way I'm used to.. ftp (lol)

I didn't necessarily need an "always-on" type of situation, and with ubuntu I can save the server connections, so I just setup vsftpd and saved the server info. it allows me to open up my pc from my laptop, just like any other directory that needs to be mounted, and then transfer files, like i do when I'm working on web servers. took forever to transfer what I needed, but I also didnt have to watch it, so it was all good :-)

Thanks for all the feedback!

[edit] The tutorial I used was http://www.cyberciti.biz/faq/ubuntu-vsftpd-ftp-service-server/

This discussion is closed to new replies.