The purpose of this page is not to replace any of the gazillion of webpages, manuals, books and FAQ related to Ubuntu linux, but mostly to be used by me as a scratchpad for all these things I have to do regularly and never quite manage to remember :)
Displaying the currently installed version
Upgrading Ubuntu from the command line
If for some reason your system crashes on startup, you can try the following:
Boot in a fail safe version of the kernel
Wait until your reach the recovery console
Select the “root access”
type “cat /var/log/syslog | less” and look at the end of the file
other useful commands:
Static mounting of drives
By default drives are automatically mounted when you plug/access them. Problem is that it gives automatic names and entries that can cause problems, like for example if you have your svn server on “drive 1”, which can happen to not be drive 1 anymore if you plugged an usb key. The solution is to edit /etc/fstab and specify the parameters saying “this disk should be mounted here, use this unique id to recognise the drive”.
If you indicate incorrect parameters in the fstab file, ubuntu will fail to boot. The easiest way to fix the problem is to accept the “manual shell editing”, and edit the file, using # to comment out the lines you added. You can edit the file by calling sudo nano /etc/fstab. If when trying to save the file you get informed that it cannot be saved because the filesystem is read only, then quit, type mount -n -o remount /, and edit again. Should work this time :)
sudo apt-get install apache2
sudo apt-get install subversion
sudo apt-get install libapache2-svn
sudo /etc/init.d/apache2 reload
sudo gedit /etc/apache2/apache2.conf
sudo gedit /etc/apache2/mods-enabled/dav_svn.conf
sudo htpasswd -m /etc/apache2/dav_svn.passwd <username>
sudo dhclient -r eth0
sudo dhclient eth0
In a .SH script, if you want to run multiple commands in parallel (like launching multiple applications) and then exit without waiting for the other commands to finish, just add a ampersand symbol at the end of the line.
# Launches JungleDisk and XChat, then exits with the applications still running
PISG is an IRC log parser, used to update http://miniserve.getmyip.com/irclogs/oric.html . To install it, sudo apt-get install pisg should do. Then you need to update the configuration file pisg.cfg which is located in /usr/share/pisg. It's also the location where I keep the runpisg file called by cron to update the html stats.
Here is what the file looks like:
echo "$(date) - Irc stats page generated for #oric" << /tmp/cron-events.log
To call this file regularly, all you need is to edit the cron tables using the command sudo crontab -e, when the editor window opens I add a line like that:
01 04 * * * /usr/share/pisg/runpisg
This will run the script at 4:01am on every day of every month.
There's a number of IRC daemon around, but I decided to give a try to InspIRCd.
Installation is easy:
sudo apt-get install inspircd
edit “/etc/inspircd” to set the correct configuration
edit “/etc/default/inspircd” to enable the server