Skip to main content

Change The Message Of The Day In Ubuntu/Debian

Are you getting tired of looking at the same old information when you login to your system? It usually goes along something like this:

Linux localhost 2.6.27-9-generic #1 SMP Thu Nov 20 21:57:00 UTC 2008 i686

The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.[...]

What if you wanted to change it to something like:

Watch Your Log Files "Live"

If you love to watch your log files religiously, you typically have to open your log file and see if there have been any new entries. What if there was a way to keep the file open and glance over at it when ever something new got written to it? Using the tail command, we are able to "tail" the file. When another log message gets added, tail "sees" it and updates your view of the file. All without opening and reopening it!

Dual Boot Windows XP/Vista and Linux

Have you ever wanted to run Windows and Linux on the same machine? This tutorial will show you some general do's and dont's to installing Windows and Linux on the same machine.

Note: This tutorial assumes you are starting a fresh install. This means that you will be installing both operating systems for the first time or you are willing to backup your data and erase your hard drive.

Why Dual Boot?

People typically dual boot for a few reasons:

Quick Tip:Create A Custom Shell Prompt ($PS1)

Do you hate looking at your shell prompt? Is it something boring like: [localhost]$ or username: $? Wouldn't you like to have something along the lines of "HEY! Enter A Command!: $" or maybe the amazing "username say's All Your Base Are Belong To Us!?: $"

PHP: Understanding Whitespace

If you are familiar with HTML, you know that creating easily readable HTML files makes the process of debugging and reading your source files much easier. This is where whitespace comes in. Whitespace is all the blank spaces and lines that are not visible, but spaces out your text., Using the spacebar, TAB key, the Enter/Return key, etc... helps you space out your text so it is not bunched up in one line or a continuous string of text with no breaks.

PHP: Send Text To The Browser

So we are now up and running. Now we can start getting into the actual coding. This guide page will walk you through some of the methods for sending text, via PHP, to the web browser. You may be wondering why you would want to send text to the browser using PHP when you can just type it in (X)HTML? Easy, (X) HTML isn't dynamic. By using PHP to output text to the screen you are allowing for multiple strings of text to potentially be seen by the user.

PHP: Testing Your Environment

Now that you have installed all the required software (or your using a web host), we need to test your environment to see if it can actually run PHP code. We do this by creating a test file, add some code and navigate to that file via a web browser.

First thing we have to do is create a file named index.php. Once that is done add the following code:

PHP: Basic Syntax

Now that you have installed all the software needed as well as followed their instuctions on configuring it correctly, we can begin with the ubiquitous "Hello World" PHP example.

Open a text editor and copy and paste the below starter text into it:

PHP: Required Software

In order for you to create PHP scripts, you will require a few pieces of software:

This guide, in the later chapters will be talking about databases, so in order to follow, you will want to download MySQL.

How PHP Works

Since PHP is a server-side language, all code is stored on the web (or file) server and when a user accesses the web page, PHP will interpret it and send it to the users web browser.

A typical setup would be:

Premium Drupal Themes by Adaptivethemes