Site TIPS PAGE🔎 SEARCH  Ξ INDEX  MAIN MENU  UP ONE LEVEL
 OJB's Web Site. Version 2.1. Mac Tip.You are here: tip tips mac owen2 
Tip

Up to OJB's Mac Tips List

Unix Terminal Intro

Many people think its very "un-Mac" to have a Unix command line in your Mac, but I think of it as having the most powerful utility program available anywhere as a backup if the GUI (graphical user interface) utilities and tools can't do the job. You definitely don't have to use Unix to use Mac OS X (or OS X or macOS), but if you know a bit of Unix its really useful, especially if you do support, programming, etc.

I should have mentioned that Unix is the operating system that Mac OS X is built on top of. Traditionally Unix has been used for large multi-user machines, servers, super-computers and high-end workstations. An OS similar to Unix, called Linux, is also quite popular for servers and as a workstation OS, but Apple is the first company to make the power of Unix available to everyone. I used Unix for years many years ago so I have transferred those skills to my Macs.

Basic Terminal Stuff

To access the Unix command line you need to run the Terminal utility. For those of you who have never used a command line - its a way of controlling a computer by typing commands instead of pointing and clicking - quaint idea, isn't it? Anyway, let's try it.

Run the terminal program and type "ls" (without the quotes, note: that's lower case L, not I, also note that Unix is often case sensitive, so use the same upper and lower case as I do here), then press return. The "ls" command lists the items in the current working directory. If you don't know what this is try typing "pwd", then return. Getting the idea? The working directory should be "/Users/yourname" (that means a folder called yourname which is inside a folder called Users, where yourname is the name of your home directory/folder). Now we will look in another directory. Type "cd Documents", then press return. Now type "ls" and return. You will see the contents of your Documents folder.

Let's find out what programs are running on our machine. Type "ps -ax" and return. You will see about 50 complicated looking lines. Each line is a different program - many run in the background without the user even knowing. Some are Unix programs, for example "httpd". Some are Mac programs, for example "Finder.app". The "-ax" after the "ps" command is a list of options which modify the basic process status command. The "a" means show all users' processes (programs) and the "x" means show system processes that would otherwise be hidden. There are many options available for the ps command. Type "man ps" for a list. After each page press space to see the next page or type "q" to quit. The man command shows the manual for a command.



I usually write a blog post about once a week. The latest post can be viewed here: Unity Through Division: Sometimes hard decisions need to be made to make genuine progress. (posted 2024-11-18 at 19:13:00). I do podcasts too!. You can listen to my latest podcast, here: OJB's Podcast 2024-08-22 Stirring Up Trouble: Let's just get every view out there and fairly debate them..
 Site ©2024 by OJBRSS FeedMicrosoft Free ZoneMade & Served on Mac 
Site Features: Blog RSS Feeds Podcasts Feedback Log07 Jun 2024. Hits: 162,687,177
Description: Mac TipKeywords: Macintosh,Computers,Fixing Problems,TipsLoad Timer: 11ms