Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Tuesday, August 16, 2011

Sharing files between two ubuntu systems through local router

I have a old desktop running Lubuntu 11.04 and it is connected to internet through a wireless router. While I store lot of information on this computer, I also have a laptop running Ubuntu 11.04 that I most of the times work on and it is also connected to internet through the same router. Transferring files between these two machines is important to me. There are countless ways you could do it, but I preferred ssh to have a safe and reliable connection through the local router. If you are willing to do the same then here's how you do it.

Step 1: Install ssh on both the machines. Run this command in terminals of both the linux machines.

sudo apt-get install ssh

Step 2: Learn the IP address of your desktop. This can be done by right clicking the connection icon on the panel and then on "Connection Information".

Otherwise you can just run the following command and read for "inet addr:" field.

ifconfig

In my case, it is 192.168.1.3.

Step 3: Go to your laptop. Find "Connect to Server" option.

If you are using GNOME then you find this on "Places -> Connect to Server".
If you are using UNITY then you find this option by opening Nautilus. Go to File -> Connect to Server.

You get this window -

Step 4: Fill details into the fields and click Connect.
Service type must be selected to SSH.
Server field takes the address of the computer to which you want to connect to.
Port is 22, which is a TCP standard for SSH Connections.
Folder that you want to share.
Username to access the desktop.
You can add a bookmark and give it a name for you to access it next time.

Step 5: Once you are done, click on "Connect". It prompts for password. Enter it and you are done. You have successfully established file sharing from your desktop machine to your laptop machine. You can do the vice versa by following Step 3, 4 and 5 on your other machine.

PS: I have used terms 'laptop' and 'desktop' everywhere. But this need not be the case and procedure is same for any two machines connected through same router. 

Linux then. Linux now - An Infographic

It was 25th August of 1991 when Linus Trovalds first announced that he has created an OS of his own. Ever since, Linux has gone through a lot to become a successful people OS.

I still remember the first Linux I ever installed on my computer. Ubuntu "Breezy Badger" 5.10 which i tried out of curiosity and I remember erasing all the contents on my computer. But Ubuntu of now is lot more sophisticated and easy to use.

Here is an infographic created by The Linux Foundation which compares Linux of then and Linux of now.




Monday, August 15, 2011

A bit on partitioning

Linus Trovalds created Linux, but ever since its there in the open source world, there have been countless varieties and versions and the list is exponentially growing. Unlike Windows, Linux is a playground where people can tweak around, experiment (and mess it up). Whenever there's a new version or a distribution which makes lot of fuss on the Internet, users tend to move on to the new version. Quite obvious they want to.

Being into Ubuntu evangelism for quite a long time, I often come across people who complain that they lose their home folder contents on installing a different version or a distribution. So how do we not lose home folder contents then?

Rather explaining each individual I thought I write it down. The problem lies in specifying partitions during the installation. Here's my advise. While installing any Linux, it is of best practice to have these three partitions -

swap
Without specifying this partition, you will not be allowed to install any Linux distribution. When you start an application installed on your hard disk, the application's required resources are first brought to RAM before it runs. When your RAM is overloaded, a bit of unused data from RAM is transfered to swap space making room for the application to run. And when its done, the data moved to swap space is brought back to your RAM thus acting like a secondary RAM. If you have a huge capacity of RAM, then a small hard disk partition is enough for swap. It is ideal to keep your swap partition as big as your RAM capacity.

root (/) 
root file system, represented by a forward slash (/) is the top most node of your directory tree. This contains the linux kernel, device drivers and every other files that you install. This is where your actual linux is running from. This is similar to the C drive of your windows where windows and other programs (C:\Program Files) are stored. The size of this partition depends on the size of the linux distribution you are about to install. Minimum requirement will be specified in its documentation but the partition size must have a few extra bytes for you to install extra applications. For starters, 5GB of space is more than enough, but if you have a really huge hard disk space, then you can always keep some room for more applications.

/home
This is the final partition which will hold /home directory. Every user will have his/her own directory under /home. If your username is 'john' then your home folder will be at the path '/home/john'. All the user specific files will be stored in their respective home directories. Every document you create, pictures you download or any files specific to you are stored in your home directory.
Strictly speaking, you can install Linux without specifying partition to /home but in which case, the /home will be mounted under root (/) and is erased next time you reinstall.

Now that you have the idea of these three partitions, you should remember that whatever you install (like GIMP, VLC media player, any application) is stored in your root directory while whatever you download or create (like documents, pictures, music, webpages) is stored in your home directory.

Once you install linux with these three partitions, you can save as much content as you want in your home directory and next time while installing Linux, it is enough to specify your root and swap partitions. This way, your /home partition remains untouched and you don't lose any data.