Check for installed Linux package

0 comments

Posted on 25th March 2010 by Brian Coleman in Linux

, ,

This probably changes with different distro – I used Ubuntu, so check for package specifics if it doesn’t work.
To check for installed software that has been installed using apt-get or similar command use this

user@computer:$ dpkg -l | grep packagename

Symbolic Links

0 comments

Posted on 20th March 2010 by Brian Coleman in Linux

, , ,

Symbolic Links are used in Linux (and UNIX I guess) to point to a file or directory from within another directory. Like a shortcut in Windows.
When developing on my new Linux box, especially when SSH’d in, I need symbolic links, for example to restart apache quickly or point to put a pointer in my public_html directory pointing to my drupal install that’s somewhere else.

Although my setup doesn’t involve multiple filesystems yet, these links can even go across filesystems to run programs on other mounts.

Before making a link, to restart apache I’d have to run this

user@computer:$ /etc/init.d/apache2 restart

After making a new link called apache in my bin dir like this

user@computer:$ ln -s /etc/init.d/apache2 /bin/apache

I can now restart apache using this

user@computer:$ apache restart

Ooooo so many keystrokes saved, eh? Ok I admit it, I just wanted to play with the terminal plugin for http://wordpress.org/extend/plugins/wp-syntax/
Amazing indeed