Gone are the days when we used to have one, shared 'family' PC. Also gone are the days when we used to carry USB drives to move data between devices. Now each of us works on multiple devices -- desktops, laptops, tablets, Chromebooks, smartphones, etc. And we want to be able to access data across all of these devices.\nWe can use cloud services to access such data, but there is much more data that we don't need (or want) to put in the cloud, including movies, TV-shows, music, pictures and documents. If you have guests and you want to show them recent family pictures there is no need to go grab your laptop. You can display them directly on your phone, tablet or even the TV. If you want to show them a home video of your son, you don't have to upload it to YouTube just to watch it again locally.\n[ Related:\u00a010 insanely innovative, incredibly cool Raspberry Pi projects\u00a0]\nThe answer is simple: set-up your own file server. And you don't have to spend a whole lot of money to do it. We are going to deploy the $35 Raspberry Pi 2 to do the job.\nYou should be someone who is well versed with Linux and is comfortable with command line.\nWhat we need\nWe need some hardware and software to get started. We need the latest Raspberry Pi 2, a 5V, 2mA charger, a microSD card (minimum capacity 8GB), external hard drives which will be used as storage and optional keyboard and an HDMI monitor (for initial set-up only). We will be using the Pi headless.\nConnect all the hardware and burn the Raspbian image on the microSD card.\nHow to install Raspbian\nRaspbian is a Debian based distribution optimized for Raspberry Pi that is powered by an ARMv7 processor. Download the OS from the official site (Don't download any software, even if it's open source, from unknown sources). Extract the .zip file to get an .img file.\nThen plug in the SD card to the PC and run lsblk command, which will give you the device node for your card. It should be something like \/dev\/sdX. Instead of X it would be something like a,b,c,d...in my case it was \/dev\/sdc. Once you have determined the device node, run the dd command to convert and copy the operating system files to the sdcard:\nsudo bs=4M dd if=\/path_of_raspbian.img of=\/dev\/sdX\nOne important note: While running the above command, do not use any number followed by the device node, so it should not be \/dev\/sde1, it must be \/dev\/sde.\nOnce the image is written to the SD card, plug it into the Pi, connect the device to the ethernet cable, connect the monitor, power cable and keyboard and mouse.\nOnce you boot into Pi, it will throw some instructions to optimize the OS for the device. Just follow the instructions. Step 1, 2 are important so don\u2019t skip them, the second step will allow you to create a password for your Pi. If you want to give a custom name to your Pi (the name that will show up on your local network) then also click on the step 8 [Advanced Options] and click on A2 to change the Hostname. You are all set and just click on .\nIf (and only if) you don't have a monitor and keyboard to spare, you can manage your Pi from a different PC via ssh. To do this, first find the IP address of the device from your modem settings and then ssh into the Pi. You may need to install openssh packages on your main PC:\nssh pi@IP_ADDRESS\nExample:\nssh email@example.com\nIn order to run the Raspbian configuration via ssh, just run the sudo raspi-config command and you will be greeted by the configuration window.\nUpdate the OS and install the needed software\nBy default, the system user is pi and the password is root. Now update and upgrade the OS so it's secure.\nsudo apt-get updatesudo apt-get dist-upgrade\nOnce your system is fully up-to-date, install samba server\nsudo apt-get install samba samba-common samba-common-bin\nThen add the user 'pi' to samba group:\nsudo smbpasswd -a pi\nMount the external hard drive\nNow we need to mount the external hard drive where all your data is saved. I am assuming that the drive is formatted in 'ext4' format. If the drive is NTFS (which I won't recommend) then you also need to install ntfs-3g packages.\nConnect the hard drive and find the UUID of the partition where your data is stored:\nblkid\nIt will give you an output similar to this:\npi@swapi ~ $ blkid\u00a0\n\/dev\/mmcblk0p1: SEC_TYPE="msdos" LABEL="boot" UUID="140A-14B7" TYPE="vfat"\u00a0\n\/dev\/mmcblk0p2: UUID="f24a4949-f4b2-4cad-a780-a138695079ec" TYPE="ext4"\u00a0\n\/dev\/sda1: LABEL="EFI" UUID="67E3-17ED" TYPE="vfat"\u00a0\n\/dev\/sda2: LABEL="MyBook" UUID="94240D3D240D2438" TYPE="ntfs"\u00a0\nHere \u2018sda2\u2019 is the partition on the HDD where all my files are. Now what we need from here is the UUID number. Note it down.\nNow create the mount point:\nsudo mkdir \/media\/storage\nExchange 'storage' with your desired name (it must be short and in lower-case). Change the permissions of the mount point:\nsudo chmod 770 \/media\/storage\nNow we have to mount the partition with proper permissions.\nsudo mount -t ntfs-3g -o uid=1000,gid=1000,umask=007 \/dev\/sda1 \/media\/storage\nIn the above command replace 'ntfs-3g' with the format of your partition and \u00a0and 'storage' with your mount point.\nAll we have to do now is add the mount point to fstab so the drive auto mounts between reboots. Open the fstab file:\nsudo nano \/etc\/fstab\nThen add the following lines at the end:\nUUID=0AC4D607C4D5F543 \/media\/storage ntfs-3g uid=1000,gid=1000,umask=007 0 0\nYou have to make three changes in the above code: change UUID\u2019s number to the one you found for your partition, exchange \u2018storage\u2019 with the mount point you created and if not using the NTFS partition, change it to the appropriate file system. Save and close the file then reboot the system. Your drive should auto mount now.\nConfigure Samba server\nNow edit the Samba config file to add the partitions that we want to share over the local network.\nsudo nano \/etc\/samba\/smb.conf\nAt the end of the file add a section for shared directories using the following pattern. If you have different kinds of data and you want to restrict access and keep things clean, you can create different sections for each data type. In my case I have created different sections for movies, music, pictures and documents:\n[Movies] #The name of the shared directorypath = \/media\/storage\/movies #The path of the shared directory\u00a0read only = No #Ensures that it's not read onlybrowsable = yes #Ensures that the subfolder of the directory are browsable\u00a0writeable = yes # Ensures that user can write to it from networked devicevalid users = swapnil #The system user\nNow restart the Samba server:\nsudo service samba restart\nYou are all set. Now you can access all the files on the storage drive from any of the devices connected to the same local network.\nIf you are on Android, install the E S File Manager from the Play Store, go to LAN settings and give the ip address, username and password for the samba server. You have your files on your Android. You can play videos, listen to music, see pictures and edit and read documents.\nIf you are on iOS you can grab any file manager that supports 'Samba' such as FileExplorer. Open the app click on the \u2018+\u2019 icon and then select the \u2018Linux\/UNIX\u2019, it will show you the \u2018Pi'\u00a0server in the list. Click on it and choose \u2018Registered user\u2019, and then give the samba user and password. All of your files are there on your iPad.\nIf you are on Linux (unfortunately each desktop environment deals with it differently), open the file manager and then go to the \u2018network\u2019 option. Provide the IP address, username, and password when asked. If you are on Mac OS X, then go to Finder > Go > Connect to the server option.\nYou can also use the current set-up as a media streaming server. I have earlier written two articles on how to use Samba as media server, check them out.