Posts Tagged ‘CLI’

DIY Linux Transmission Server

 

One of my favourite things about Linux is its ability to transform a formerly useless elderly computer into something really useful indeed. This is the first in a series of posts covering some great projects to breathe new life into old machines using Linux.

What’s the Project?

BitTorrent is a fantastically useful distribution mechanism – when downloading updated Linux distro ISOs, it regularly exceeds the speeds available through centralised (HTTP/FTP) download repositories, and the sharing of bandwidth and ease of distribution are a great fit for online communities and fan groups (Zappateers, for example). Unfortunately, BitTorrent tends to be a total disk I/O hog, constantly reading and writing tiny chunks of file all over your disk. This causes big slowdowns for all other running programs which need access to your hard disk, not to mention the stress it puts on the drive itself.

We’re going to use an old computer, GNU/Linux and the Transmission BitTorrent client to offload this resource-intensive process to a networked machine, freeing up your main machine to get on with business unfettered. Sacrificing convenience, however, is not an option. Therefore, we’re going to implement the following convenience features:

  • Administering the client through a web browser
  • Sharing content over the local network
  • Creating a zero-setup process for starting new transfers

(more…)

Mac OS X Terminal Alternative – iTerm 2

I was pointed to iTerm a couple of weeks ago by a commenter in response to a post about running Xterm in fullscreen under Mac OS X. The software is still in beta, so I’ve been road testing it to see if it could be a viable alternative to the Mac OS’ Terminal.app or Xterm.

I’m delighted to report that, although it is still in beta, iTerm 2 has proven to be very stable, and has a ton of features which I’m sure any CLI Mac user will be absolutely delighted with – in fact, I’ve made the switch from Terminal.app on all of my Macs. Here’s a quick preview of my three favourite features.

(more…)

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.

 

Website Mirror Software – HTTrack

These days we’re connected to the internet by pretty much every single device we own – with the widespread popularity of the smartphone there’s a great many people carrying access to the internet in their pocket everywhere they go. Traveling back a decade or so when the internet was a much more scarce resource and there was such a thing as ‘offline’, being able to download a website to view sans connection was a very useful thing indeed. When your internet session tied up the phone line and charged you a few pennies for every minute you were connected, it was a practical solution to a common problem.

Even though those days are past us, you might still want to download a whole website for posterity or simply to create another mirror to share some bandwidth. There’s a great open-source tool for doing just that in the form of HTTrack.

(more…)

Linux Command Line Basics Part VI: X Window System

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 the previous section of this guide we set up an SSH connection so we could operate a machine remotely. Now it’s time to extend this functionality using the X Window System to provide some remote GUI action to augment the remote CLI access we set up previously.

The X Window System

The X windowing system has been around for the best part of three decades and provides facility for displaying graphical content on a remote computer. Whilst a proficient command line user can perform advanced operations using only text input, some things are undeniably easier using a GUI. By using X, a remote user can wield the power of the command line alongside GUI programs, a formidable combo for a productive user.

One of the best parts of X is how simple it is to add this functionality to your remote session. The only change required from the SSH setup introduced in the previous section is the addition of  ‘-X’ to the beginning or end of the arguments. For example, if user ‘randymarsh’ wants to connect to the remote server ‘125.234.55.211’ with X, he would enter:

$ ssh -X randymarsh@125.234.55.211

Make sure you use a capital X! (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…)

Linux Command Line Basics Part II: Navigation

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. Part 2 covers some basic commands for navigating the file system.

Navigation

pwd

‘pwd’ stands for ‘print working directory’, also known as the ‘where the hell am I?’ command. Depending on the default shell running on your machine, you may not have any information about your whereabouts in the file system, which is where ‘pwd’ comes in. pwd will print the current (‘working’) directory on a new line.

pwd in action

(more…)

Linux Command Line Basics Part I: the Unix File Structure

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. Part 1 covers the basics of the file structure to get you familiar with the space you’ll be working in.

The Unix File Structure

Familiarity with the Unix file structure is important if you’re going to be interacting with objects within it. If you’re a Windows person, you’ll be used to operating in terms of drive letters (C:\, A:\ etc…), with each drive containing directories and subdirectories in which you can keep your files. Mac OS X is built on BSD, but the user-facing file structure is abstracted from Unix, which lies beneath.

It’s not important to be an expert on the whole file structure to start moving, creating and deleting files, but it is important to at least have an overview.

(more…)