Top 5 things to do with the Terminal

Attention: Cet article/tutorial est ‰gé de plus de 45 jours. Ainsi les informations qu’il contient peuvent être, maintenant, dépassé. Merci de lire toutes les informations qu’il contient pour vous assurez que cet article fonctionnera bien sur votre système

I have compiled a list of the top 5 things you as a user can do with the terminal in OS X.

Please Note: These commands have been tested and work under OS X 10.1.

5. Who am I?

At number 5 is the who am i function. This is a nice function incase you forget who you are… it’s surprising how many times it really happens.

[localhost:~] jamesnp% who am i
jamesnp ttyp1 Oct 19 18:21


4. Instant Calendar

One of my personal favourites of the terminal is the ability to get an acurate calender of any month/year you choose with the cal function.

[localhost:~] jamesnp% cal
October 2001
S M Tu W Th F S
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31


3. Word Count

Opening a simple text file in Appleworks or Word is time consuming. Insted you can simply open up your terminal, type wc filename. It returns the number of lines, words and characters in the file.

For example take the following extract from a poem:

I shall be telling this with a sigh
Somewhere ages and ages hence:
Two roads diverged in a yellow wood, and I –
I took the one less travelled by,
And that has made all the difference.

Save the file as poem.

[localhost:~] jamesnp% wc poem
5 37 184 poem

5 lines, 37 words, and 184 characters.

2. Wall

Wouldn’t it be great to send everyone logged on to your computer a little message saying whatever you want? Well… Yes, you guessed it; with UNIX you can!

Assume root access. This can be done with su

Type wall then type your message. Pres Cntrl-D and everyone logged into you will get the message!

[localhost:/Users/jamesnp] root# wall

this is a wall message

And everyone logged on gets:

Broadcast Message from jamesnp@localhost

(/dev/ttyp1) at 18:46 …

this is a wall message


1. kill

Any application ever stopped working in OS X? Not showing up in the Force Quit dialogue, but you know it’s running?

With kill you can kill any application running on the entire system!

First find out what you want to kill, type ps aux. Choose what you want to kill and take note of its PID.

Now type sudo kill 000 where 000 is your PID.

If it still doesn’t quit add -9, ie. sudo kill -9 000 where 000 is the PID

Leave a comment

Your email address will not be published. Required fields are marked *