Install vim on an Ubuntu server and desktop

I’ve grown quite fond of vim over the past couple of weeks. After learning and re-learning the shortcut keys, I think that I’m finally on my way to knowing what the hell I am doing!

Anyway, after working on it – I’ve found gVim to be great.

To install, just run:

<code>sudo apt-get install vim-full</code>

This includes syntax highlighting and other neat stuff. If you want to gegt the syntax highlighting on the server, just run:

<code>sudo apt-get install vim</code>

Yes, that’s right – no extra bits.

Mounting a remote system with SSH

One of the cool things I’ve been doing lately is using secure shell to mount remote file systems. The great thing about this method is that you’re not dependant of explicitly creating shares as you are in Samba, and you don’t have to rely on repeated scp commands.

As long as you have the sshfs package installed, you should be able to mount the file system. Here’s an example to create a mount point on your desktop:

<code>mkdir ~/Desktop/sshmnt
sshfs user@target-pc:/home ~/Desktop/sshmnt/</code>

That’s it! Once finished you can unmount the folder with the fusermount command:

<code>fusermount -u ~/Desktop/sshmnt</code>

If you have trouble with unmounting a connection (because the target may be switched off), you can force the connection to be unmounted:

<code>fusermount -z -u ~/Desktop/sshmnt</code>