Tag: Linux/Ubuntu

Mounting a windows share on linux

by Craig Mayhew on Dec.24, 2010, under Linux/Ubuntu

This command will mount a windows share on Ubuntu 10.10 (and obviously other versions):

sudo mount -t cifs //1.2.3.4/ShareName/ /media/share -o username=yourUserName,password=yourPassword,allow_other

“1.2.3.4″ – The name of the server with the share
“ShareName” – The name of the shared folder
“/media/share” – The local folder the share will be mounted to
“yourUserName” – The username for the share
“yourPassword” – The password for the share

If you don’t have a password, you really should have one for security but here is the command anyway:

sudo mount -t cifs //1.2.3.4/ShareName/ /media/share -o allow_other

If you get the error:

mount: //1.2.3.4/ShareName/ is not a valid block device

Then you may need to install samba file sharing:

sudo apt-get install smbfs
Leave a Comment :, more...

Ubuntu: VMWare Runs Slow on NTFS Partition

by Craig Mayhew on Oct.03, 2009, under Guides/Fixes, Linux/Ubuntu

I found the ntfs-3g process was using 100% cpu. Apparently VMWARE can thrash the hard drive so the workaround is to set “mainMem.useNamedFile=FALSE” in the virtual machines .vmx file and VMware will perform faster.

Leave a Comment :, , , more...

Ubuntu 9.06: Load used swap space back into RAM

by Craig Mayhew on Jul.13, 2009, under Linux/Ubuntu

When I have too many applications open or one of them eats all the memory I end up with a big chunk of my swap space used. The problem is that once I’ve closed a few programs or killed the offending program my computer still uses the swap space! I’ve read that the swap space will slowly be loaded back into RAM but only when it is next accessed. This results in sluggish system performance when the applications next read the memory in the swap space. To solve this problem you can empty the swap space and load it all back into RAM with one simple command. Please make sure you have enough RAM installed to load the memory in swap back into RAM…

This switches off swap memory and forces the system to load it back into RAM:

sudo swapoff -a

This switches swap back on incase you run out of RAM in the future:

sudo swapon -a

So now I can run those two commands, have the computer busy for 10-15 seconds and then know that it won’t slow down again due to needing to access the swap (Unless it runs out of RAM again).

2 Comments :, , , , more...

Command to find the 10 largest files in linux

by Craig Mayhew on Apr.26, 2009, under Linux/Ubuntu

The following command will list the top 10 largest files in your linux file system. I’ve confirmed it works on OpenSUSE and Ubuntu 8.04. Remember to run this command as root if you want to search the entire file system.

find / 2>/dev/null -type f -ls | sort -k 7 -r -n | head -10
Leave a Comment :, , , more...

Visit our friends!

A few highly recommended friends...