Friday, August 19, 2011

miniDLNA - access files from your PC!

I'm using miniDLNA to connect my Ubuntu PC with my Asus Transformer. Result is I get to play movies and music from my PC directly on my tablet!!


Here's how to setup miniDLNA on Ubuntu:


1) Get source file from here.
2) Extract and unpack the archive to a designated folder called "minidlna"
3) Edit file "minidlna.cnf" (config file in folder minidlna > etc )
4) From Terminal, go to the "minidlna" folder
5) Type the following command:
     username@machine:~/minidlna$ usr/sbin/minidlna -f etc/minidlna.conf
     *This needs to be typed in everytime you start the PC


Wednesday, June 22, 2011

Ubuntu: dd Command

Note: To test this out sometime later
dd if=<source> of=<target>


Duplicate sda2 into sdb2 

dd if=/dev/sda2 of=/dev/sdb2 bs=4096 conv=notrunc,noerror

Fixing old hard drive:
Code:
dd if=/dev/sda of=/dev/sda

Ubuntu: Navigating folders and directory commands in Terminal

Initial line in Terminal. Note that ~ represents the Home Folder.
username@machinename:~

To know your current working directory:

username@machinename:~$ pwd
home/rootfolder 


To know the list of items inside the path (or can also use command dir):
username@machinename:~$ ls
Folder1  Folder2  Folder3

To change directory:
username@machinename:~$ cd Folder1 
username@machinename:~/Folder1$
To return back to Home Folder:

username@machinename:~/Folder1$ cd ~ 
username@machinename:~$


To go to root filesystem:
username@machinename:~$ cd /
username@machinename:/$ ls 
bin    dev   initrd.img  media  root     srv  usr
boot   etc   lib         mnt    sbin     sys  var
cdrom  home  lost+found  proc   selinux  tmp  vmlinuz

To go up one level (notice there is a space, unlike in DOS where it is "cd.."):
username@machinename:/media$ cd ..
username@machinename:/$


To go up one level and to a specific folder name in that directory:

username@machinename:/media$ cd ../boot
 username@machinename:/boot$

Friday, April 8, 2011

Ubuntu: The following packages have been kept back

 To force update on packages that have been "kept back":


sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade

Tuesday, March 29, 2011

Ubuntu: Remove old kernel

Removing old kernel is part of system maintenance. Basically to clear up the boot space and tidy up the grub menu. Steps as below:

  • In terminal, type: uname -r. Take note of the kernel version
  • Go to System > Administration > Synaptic Package Manager
  • Search for linux-image
  • Select the older version kernel (which is not equal to first step above) with green box, right-click and select Mark for Removal
  • Click on Apply

Sunday, March 27, 2011

Ubuntu: Update grub manually

Here's how to update grub manually. In Terminal, type command: sudo update-grub


username@desktop:~$ sudo update-grub
[sudo] password for username: 
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.35-28-generic-pae
Found initrd image: /boot/initrd.img-2.6.35-28-generic-pae
Found linux image: /boot/vmlinuz-2.6.35-24-generic-pae
Found initrd image: /boot/initrd.img-2.6.35-24-generic-pae
Found memtest86+ image: /boot/memtest86+.bin
Found Ubuntu 10.10 (10.10) on /dev/sdb7
done
username@desktop:~$ 

Saturday, March 26, 2011

Ubuntu: Write access to files and folders in Live CD session

Usually we'll access the system via Live CD in scenarios where we cannot boot the system normally. So this is where you do troubleshooting, revise config files etc or to backup important data.


You will not have write access to some of these files and folders. To do so, open up terminal and type in the following command:


sudo nautilus


A new folder will open, and you will see this folder is set as root. You now have write access to all files and folders in the Live CD session.