Monday, December 24, 2007

Suggestions Welcome

G'day everyone, I've been really busy the past couple of weeks so I haven't had a chance to write a post. I've been busy doing an online course, and setting up a lab environment.

I'm really enjoying doing the course, I only have the write up left to finish. I already knew the practical side to the work, it was mostly the theory I needed to learn. I'll finish the write-up over the holidays.

I've set-up an awesome lab environment, in which I'm going to test numerous networking, server and workstation environments. I'm really excited about having a better lab. It should make testing quick and simple.

If anyone has a suggestion for an environment, or you would like to know how to set-up a certain type of server and or operating system, let me know.
It can be hard to know what information people are after, so any suggestions will be greatly appreciated. You can either leave a comment here or email me.
Thank You, Have a Wonderful Holidays!!!
Cheers Kris

Wednesday, December 12, 2007

Changing Environmental Variables

It's really handy to be able to change the way your shell works for you. Being able to add aliases, and other options makes the shell a much more powerful tool. Changing or setting environmental variables is done differently for each shell.

To change an environment variable in csh or tcsh use:$ setenv NAME "value"where NAME is the name of the variable and "value" its new value.

To change an environment variable in /bin/sh use:
$ VARIABLE="value"
$ export VARIABLE

You can permanently set environment variables for your shell by putting them in a startup file for the shell. The name of the startup file varies depending on the shell;
csh and tcsh uses .login,
bash, sh, ksh and zsh use .profile.
When using bash, sh, ksh or zsh, don't forget to export the variable.

.login and .profile are to set conditions which apply to the whole session and to perform actions that are relevant only at login.

.cshrc and .shrc are used to set conditions and perform actions specific to the shell and to each invocation of it.
The guidelines are to set ENVIRONMENT variables in the .login, .profile file and SHELL variables in the .cshrc, .shrc files.

Saturday, December 08, 2007

7 Tips For Answering Your Tech Questions

We all come across problems in our computer ventures at some time or another. I have a number of tips that may help you find answers to your problems:

  1. Search: Searching google, or any other search engine, will often yield results, and it's always a good place to start.
  2. Search using your Error: If your problem is in relation to an error, and you have an error displayed on your screen try a search for that exact error. If someone has asked about it in a forum, or talked about it on there blog, then you will likely find your answer much more quickly.
  3. Documentation: Search the Handbook/Documentation relating to your operating system.
  4. Read the Manual: Read the manual pages relating to your problem.
  5. Mailing Lists: Search through the mailing list archives relating to your topic. You can also sign up for a number of list, and often you find solutions to problems that you haven't had yet ;-)
  6. Forums: Search the forums, relating to your distribution to see if someone else has answered your question.
  7. Ask: After exhausting all other options ask your question on a forum. Make sure that no one has asked your question before, and that you have searched every where else first. Also make sure that you place your question in an appropriate forum, in an appropriate place.
Have Fun!!!

Friday, December 07, 2007

7 Must Read OpenBSD man pages

In OpenBSD the manual pages are very important, well written documents. They comprise most of the written documentation for OpenBSD. Countless hours of work has gone into making them easy to read, and follow.

If you are new OpenBSD there a number of man pages which are a must read. These man pages can can explain much of the way that OpenBSD works, and many things that you can achieve using the system. Giving you a clearer perspective on your system.

  1. man(1): To view the manual pages you will need to use: man(1). The man(1) program displays a manual page in your terminal for you to read. For more information see: man(1).
  2. apropos(1): When your new to a system it can be difficult to know what manual page you need to read to achieve a task, enter: apropos(1). The apropos(1) program will locate and display all the commands containing a user specified keyword.
  3. hier(7): If your new to OpenBSD, or *nix systems make sure to check out the hier(7) manual page. This page details how the filesystem works, and gives you a good understanding of how the system is laid out.
  4. afterboot(8): When you first install an OpenBSD system you should check out the afterboot(8) man page. This well written man page, will tell you all the things that you should check/do after installing your system.
  5. packages(7): Once you have your system installed and configured you may want to add some software. If you would like to install binary packages check out the packages(7) man page.
  6. ports(7): If you would prefer to install software from source here is an overview of the ports(7) system.
  7. intro: If you would like to know what the numbers after the commands are, there is an explanation in the man(1) manual page, also you can read an introduction to each section here: intro(1), (2), (3), (4), (5), (6), (7), (8), (9).
Have fun Using OpenBSD :-)

Monday, December 03, 2007

Protecting Your Terminal

BSD Quick Tip
When ssh across my systems I often need to step away from the keyboard for a few minutes. This can pose a massive security threat to the system, therefore I think it's important to lock the terminal, this way I don't need to log in/out, nor leave the system insecure.

In all of the BSD's you can use a built-in utility called
lock(8). When you use:$ lockwithout any options you will be asked to enter a key twice. Then your terminal will be locked for 15 mins, after that time it will become available again.

To keep your terminal locked until you return, (no 15 minute timeout), use:$ lock -n
To use your normal user password instead of a key you enter use:$ lock -p
Personally I like to use these options all of the time, therefore I add an alias so I only have to type lock.

To Alias `lock -np` to `lock` in csh or tcsh:$ edit ~/.cshrcadd:alias lock lock -np
To Alias lock -np to lock in sh:$ edit ~/.shrcadd:alias lock='lock -np'

Sunday, December 02, 2007

Changing the Color Scheme in Gedit

Ubuntu Quick Tip
I find looking at a white background and black text a little daunting in Gedit, however in Ubuntu 7.10 (Gutsy Gibbon), you can easily change colour schemes and save your eyes. To change schemes:
In Gedit Go to Edit --> Preferences.
In the Preferences dialogue click on the Font & Colours Tab.
Then choose a scheme to suit you.

Humanise the output of OpenBSD's root mail

OpenBSD Quick Tip
I've discussed how to humanise the output of FreeBSD's root mail, and the same can be achieved in OpenBSD by running the following commands:# vi /etc/daily
change:df -klto:df -hikl

Humanise the output of FreeBSD's root mail

FreeBSD Quick Tip
The output of the root mail, daily run: disk status is in bytes, which is not quick and easy to read. To humanise this output and to show you the inodes being used do the following:
# vi /etc/periodic/daily/400.status-disks
change:df $daily_status_disks_df_flags && rc=1 || rc=3todf -hi $daily_status_disks_df_flags && rc=1 || rc=3