Posts Tagged ‘GNU’

Tutorial Series: Linux Command Line Basics

Last week, I published a seven part series of posts introducing some of the key concepts, commands and techniques of the Linux/Unix command line. Here’s an index of the topics covered to help you find what you’re after.

 

Full Screen Terminal in Mac OS X

It seems that I’m not the only one who finds the tinsel of an operating system GUI distracting when I’m trying to concentrate on some work. While many Linux distributions allow you to fullscreen a Terminal window, Mac OS X’s Terminal.app does not provide you with such an option. Although I did (briefly) consider rebooting into single-user mode (which starts OS X with a BSD shell), it seemed like a better idea to try and find out if anybody has already had the same thought as I, which led me to a great solution over at http://www.hccp.org

In order to enact this process yourself you’ll need X11 and the Mac OS X Developer tools installed.

(more…)

Linux Command Line Basics Part IV: Useful Command Line Tools

Knowing basic *nix terminal commands is an absolute must for any computer pro. Whether you use Windows, Mac OS or Linux, you’re bound to face the command prompt at some stage, so here’s my crash course in CLI. In Part 4, I’ll introduce some command line tools which cover some of the most common and most useful functions in Unix.

Really Useful Unix Command Line Tools

Unix operating systems come as standard with a number of very helpful command-line tools which perform very common and very useful file and and administration functions quickly and easily. Here’s a list of some oft-used programs:

System Monitor – top

top provides a real-time updated list of the top processes running on your Unix system. It is similar in function to ‘Task Manager’ on Windows and ‘Activity Monitor’ on Mac OS X. To quit ‘top’, press ‘q’.

'top' running on a Linux server

(more…)

Web & Coding Tools for Mac OS X

Here’s three essential tools for anyone who uses Mac OS X for coding or remote admin.

FTP: FileZilla

If you work on a remote machine of any sort the chances are you’re going to need to send files to and from your local terminal.

FileZilla is not just the best open source FTP client I’ve ever used, it’s the best FTP client I’ve ever used period – it’s fast, free and dead easy to use, as well as being available for all three major platforms. I can’t recommend the Mac OS X version highly enough – it’s essential.

You can grab the latest version of FileZilla here, and remember, it’s donation-ware so if you love it, hit up PayPal and help out.

 

 

(more…)

Adding a Custom Error Page when Hosting Multiple Sites Using Apache

Another optional extra you might want to consider when hosting multiple sites, or just when working with subdomains, is a custom error page.

Using the more basic configurations detailed in previous tutorials, you may occasionally find odd results being returned to your clients. For example, if someone were to simply type your server’s IP into their browser, or spelled a subdomain incorrectly, Apache2 will serve them up the first site it finds in its configuration path. If you’re hosting multiple sites, this means that a totally different site might be returned, which doesn’t exactly look professional.

Here, I’ll show you how to easily counter this problem, by creating a custom error page for your server.

[If you’re not familiar with Apache configuration files, read one of the tutorials linked above for more info.]

Step One

Create your custom error page and save it as ‘index.html’. In this example, we’re going to create the ‘index.html’ file at /home/randymarsh/errorpage/index.html.

This page could just be an image or some text, or you can write a redirect to one of your hosted sites or their subdomains. As long as it’s called ‘index.html’, you can do what you want here.

(more…)

Hosting Multiple Sites on the Same Server Using Apache2

When I upgraded to my new server (Lumpy Gravy) and migrated my own site from my trusty HP DL380 to the new box, I took the opportunity to get better acquainted with one of the cornerstones on the internet, a piece of software you rarely ‘see’ but operates behind the scenes not just of this site but a full 59% of the entire internet – the Apache web server.

Apache2 comes as part of the ‘LAMP’ packages you are given the option to install when loading Ubuntu Server, and by forwarding port 80 to your machine you can start hosting web content quickly and easily.

But what if you wanted to host multiple websites from the same server? This is something I’ve had to do for the first time this week, and it’s all possible with a few simple configuration changes to Apache.

(more…)

Nano Defaults ~/.nanorc

I’ve been fiddling more with Linux on the Xbox, and one really annoying bug I was confronted with was the reversal of the backspace function in nano, turning the (very useful) backspace key into a (very annoying) delete key.

nano allows this to be reversed by starting using the “-d” option when you launch, but that’s just so very annoying.

There is, however, an alternative. Like bash and others, nano has a default/startup script file located in ~/, called nanorc. This page has a list of all the options you can set, and all you have to do is add them to the ~/.nanorc file.

Backspace, and order, is restored.

Taking SSH further with X

Over the last couple of weeks, I’ve been introduced to GNU Octave, a high-level interface to FORTRAN, with some audio functions built in. One of the major components of the work I’ve been set using Octave has been using it’s plotting functions – essentially displaying waveforms on the screen using the additional GNUplot package.

One of the problems that Octave presented pretty quickly was that it is very tricky to get working under Mac OS X (the Windows port, bizarrely, proved slightly easier for most people I spoke to get up and running). Running Octave itself is simple enough, however installing the essential additional packages required various different software packages, such as AquaTerm and GNUplot, to be loaded and configured correctly.

Under Linux, however, acquiring the software and its additional packages is done through apt-get or aptitude. Configuration is automatic.

Running Octave through SSH on my server works perfectly – it’s easy to install, and the lack of sound isn’t even a problem thanks to the ‘ausave’ command (akin to ‘bouncing’ the specified waveform), with Dropbox pushing the resulting file to the local machine for playback. The only problem I was having was with the plotting component – graphs are a step too far for the command line. The only option I had was to run Octave on my Ubuntu PowerBook.

However, I was introduced to a fantastic alternative, in the form of SSH and the ‘xeyes’ program. Using an ‘-X’ switch in the regular SSH command enables the forwarding of X-window data to the client machine. (You can run ‘xeyes’ at the server command line to check that the connection has been established). Now, commands are issued to GNUplot on the remote machine, and the data is displayed on the client (using a Macintosh, you will need X11 for this to work).

I’m excited for the potential of this technique, given the number of X compatible GUIs for command-line tools this could likely be a very useful tool.