If I type
$ figlet absolute beginners
into my terminal, this is what I get:
_ _ _ __ _| |__ ___ ___ | |_ _| |_ ___ / _` | '_ \/ __|/ _ \| | | | | __/ _ \ | (_| | |_) \__ \ (_) | | |_| | || __/ \__,_|_.__/|___/\___/|_|\__,_|\__\___| _ _ | |__ ___ __ _(_)_ __ _ __ ___ _ __ ___ | '_ \ / _ \/ _` | | '_ \| '_ \ / _ \ '__/ __| | |_) | __/ (_| | | | | | | | | __/ | \__ \ |_.__/ \___|\__, |_|_| |_|_| |_|\___|_| |___/ |___/
Figlet has proved to be a gateway drug for extended terminal usage. Figlet is not on your computer by default though. Even though your mac comes with a lot of unix software already, not a lot of it is graphics software. To install new software you need to install what is called a package manager, as explained in I like tight pants and installing compilers. This article will continue with an introduction that tells you how to use the terminal!
In your Applications folder, choose Accessories, and open Terminal. Now you can talk with your computer. He can tell you who you are. Type:
(without the $ and the space, that’s just a convention to denote text that you enter into the terminal). And press enter. The computer outputs your username! The computer also knows where you are, at least where you are on the hard disk. Enter:
And the computer will repond with
/Users/yourusername. It would make sense if you could say
whereami but consistency is not Unix greatest strength. You are now in what is called your home folder.
You can always return to your home folder by typing:
cd is also the commando to use to go to another folder. You can use the tab button to make this go quicker.
Type, by example:
$ cd Do(tab)
You will see
Complete further to
$ cd Doc(tab)
And your line will be extended to form:
$ cd Documents/
When you push enter, you will arrive into the folder Documents. You can check this by again typing
To see what files are part of the folder you are in:
You can also check this in the finder, if you want. You can use the terminal and the finder at the same time. This can make it easier to learn what is going on. You can launch the finder from the terminal.
$ open .
. refers to the current folder.
open . will open the current folder with the associated program, which is the finder.
To make a new empty file:
$ touch my_text_file.txt
If you still have the Finder open, you will see it appear! To open with the text editor:
$ open my_text_file.txt
These are the basics of navigating around the terminal.
by tellyou - February 8, 2012 9:42 PM
By the way, those students trying this out on Windows, through Cygwin, There is nothing in your home folder initially. That is because Cygwin makes its own version of the unix file system on your hard disk, contained within the cygwin folder. So while in cygwin your home directery appears as
/home/tellyou/for example, it is not the same home as your Windows home directory. The actual location of the cygwin home folder on your hard drive will then be
c:\cygwin\home\tellyou\. So while you can do
lsin you home folder, you will see nothing (as there are no files) and you won’t be able to
cdanywhere. Also the
opencommand is unique to Mac OS X and does not exist in other Unix flavours. The
touchcommand does work as expected. So you can touch a new file, and then open through the explorer. To install new software on Cygwin, you need to rerun the Cygwin
setup.exeyou downloaded to install Cygwin initially. You can then select additional packages to install alongside. Use the searchbar to quickly find
figlet, for example.
by tellyou - April 8, 2012 8:49 PM