84 Comments
- OneManArmy, on 10/12/2007, -7/+49Quicksilver
- drlha, on 10/12/2007, -0/+33This is what is great about Mac OS X. Its crunchy UNIX core appeals to the hardcore UNIX geek in me, and I use it all the time, and yet my almost computer-illiterate wife can use her Mac for everything she needs without constantly bugging me about how things work.
- aeproberts, on 10/12/2007, -11/+36just to piss you off.
- ParanoidSardine, on 10/12/2007, -0/+22Here's the article. I had it in my RSS reader a few days ago:
Mac OS X isn’t just known for it’s fancy GUI. It’s known for it’s powerful underlying core OS, UNIX, and the Terminal is the way that you can access the UNIX base. For you new switchers, the Terminal is equivalent to the Command Prompt in Windows, or the Command Line/Shell/Terminal in Linux. Many Mac users never even open Terminal, however these users are missing out on some of the most powerful features.
To open Terminal, navigate to your Applications folder, open Utilities, and double click on Terminal. You will be greeted with a message similar to this:
Last login: Tue Mar 6 17:21:36 on console
Welcome to Darwin!
ibook:~ Alex$
The last line you see is called the prompt. This will appear after every command you enter and this is where you type your commands. It consists of your computer name, your current directory, and your short username. When you first start Terminal, your current directory will be “~”, which is short for your home directory (/Users/Your username).
One of commands you will use most is ls. The ls command will show you the files and directories that are contained in your current directory. Here’s an example:
ibook:~/Desktop/mammoth Alex$ ls
final1.jpg final3.jpg final5.jpg final6.jpg final7.jpg
By typing ls and hitting enter, the terminal shows me all the files that are in my “mammoth” directory. If you want to see the contents of a directory besides the one you are in, just type ls followed by the directory.
You are probably wondering how to change your current directory. This is done with the cd (change directory) command. Just type cd followed by the directory you want to change to. Example:
ibook:~/Desktop/mammoth Alex$ cd /Users/Alex/Desktop
ibook:~/Desktop Alex$
If you want to get to a directory that is inside of your current directory, just type cd followed by the directory name, as there is no need for a full path. To save time, the terminal has an autocomplete feature (most command lines have this). To use it, press tab when typing a file or directory and Terminal will guess what you are trying to type. Don’t forget about ~. Entering cd ~ will get you back to your home directory. A final, and very useful cd tip is that cd .., will navigate you to the directory above the one that you were in.
If you are experimenting with UNIX commands and need help with a certain command, it is always available. Either type:
command --help (quick help) or man command (full manual) Typing q will get you out of a command’s man page.
Although cd and ls don’t do much, they are a good foundation for further command line adventures - dongiaconia, on 10/12/2007, -1/+19BSD, but yea, you are 99% right.
- shmatt, on 10/12/2007, -1/+17Listen, dick, if you don't like macs, good for you, but your sweeping generalizations about Mac users are ***** stupid, moron. This article is for us who have OS X, not you, who for some reason can't deal with reality. So piss off.
You mean to tell me that all those windows users out there are tech-savvy? Give me a ***** break. I could rewrite your idiotic comment and substitute Windows and it would be more true than waht you're trying to say.
Sorry, but I hate anti-mac trolls. - griz, on 10/12/2007, -0/+16Automator
- Boondoggle, on 10/12/2007, -1/+16And then there are those of us who have spent around $1700 and get both the fancy GUI (OS X), lots of great apps, (iLife) Windows (XP and Vista), LInux (any flavor) AND the UNIX shell, all on the same 13" laptop. But maybe Macs are more expensive in your world.
So by you're definition I'm not a Mac user. Right. - inactive, on 10/12/2007, -0/+15Is that a hair question in disguise?
- TannerLD, on 10/12/2007, -7/+21then why link to it?
- leprix, on 10/12/2007, -2/+15annnnnd its down.
- BlackCow, on 10/12/2007, -3/+15Erm, I have never used apples OS' before but if im not mistaken isn't the terminal the same as a Linux terminal because its unix based?
- blueigloo, on 10/12/2007, -1/+11Basically.
- SteveMax, on 10/12/2007, -6/+15"Mac OS X terminal for noobs
Is there any other kind of Mac OS X?"
Yes, there is OS X besides the terminal. There are plenty of GUI applications also, some of them are regarded as the best in their areas. Just because Apple added the *nix functionality it doesn't mean we lost the great GUI.
Unless this was a poor attempt at making fun of Mac users, then you should really start by learning English. - hiroki40, on 10/12/2007, -0/+9cat thatcomment > /dev/null
- cmiz, on 10/12/2007, -2/+9Although we can certainly light aszekely up on the symantics of Terminal just being one of many fronts to the shell (I use iTerm), I would agree with his overall point that the bash shell is a feature of OSX that is incredibly powerful and yet never used. Then again, I bought a mac for the BSD userspace applications... my girlfriend bought a mac for the ease of use and cute looks... CLI is good for some but not for others.
- kiantech, on 10/12/2007, -0/+6okay seriously sorry for comment bombing, but did anyone read the ***** article?
all it teaches you is "ls", "cd" and a help commands.
seriously I think people just dugg it because it's about OSX, this article is stupid! - Tu13erhead, on 10/12/2007, -9/+14http://iterm.sourceforge.net/
Much better than Apple's Terminal. - dbr_onix, on 10/12/2007, -0/+5"what possible advantage could you have from running KDE inside osx?"
Having all the applications ported - KDE on OS X isn't so much about the Window Manager (I'm not sure if it's even being ported), it's more about things like K3B, Amarok and a bunch of other decent KDE applications being avalible cross-platform - ilgaz, on 10/12/2007, -0/+5Apple has a very nice, hardware accelerated and even stereo3d capable X11 coming with every OS X DVD.
- maskott, on 10/12/2007, -3/+8For EXTREME noobs. If you don't know the "ls" or "cd" commands, you need more than this article to get you up to speed. The fact that this was dug 300+ times pretty much proves that Wired Magazine's recent theories about digg.com.
- shmatt, on 10/12/2007, -0/+4KaserPro, that's messed up.. what an ass you are
Folks, don't use "sudo" unless you know what you're doing. - merr, on 10/12/2007, -1/+5iTerm + Growl = win
- stukdog, on 10/12/2007, -0/+4just start in reverse order on FreeMacUnix and it will take you step by stem to learn the terminal.
http://www.freemacunix.com/ - arbulus, on 10/12/2007, -0/+4Ok, wait just a second here: you can run a *nix desktop environment in OS X?
- astrosmash, on 10/12/2007, -1/+5- Perl, Python, and Bash scripting
- Installing, configuring, and developing for Unix servers, like Tomcat and PostgreSQL
- Installing the GNU development chain for 68HC11 microcontroller development and debugging
- General purpose C, C++, and Java development
- Analyzing and refactoring source code using Emacs and XRefactory
- Compiling custom builds of Firefox
- Remote access to my Mac, via SSH
- Remote access from Mac to my school's Unix servers
- Tunneling TCP/IP connections over SSH to remote servers
- Running remote X11 applications.
- Copying files to and from remote machines over SSH/SCP.
Other than that, Unix environments aren't used for anything. - lukee, on 10/12/2007, -0/+4@arbulus:
Yep. Both GNOME and KDE (and others) can be obtained through a repository like Fink or MacPorts, and run in X11.app. - arbulus, on 10/12/2007, -0/+3I really hope no one runs that command that KaserPro suggested.
Please, since this article is geared to the n00bs, please oh please do not run random commands you find in forums without knowing what it is you're running. In my early Linux days, I ran a few commands that I found in how to forums that I was unfamiliar with and had to reinstall my OS, since I was naive and didn't know what I was doing. The commands I ran weren't malicious, but this one is.
Don't do it kids. - dbr_onix, on 10/12/2007, -0/+3grep "blah" somefile | awk -d=, '{print $1}'
Will print the first word from any lines in "somefile" containing "blah".
There are some things that are far faster using bash, even if it's just for cat, grep, sed and awk for doing stuff with log files. Also, I find navigating files using tab completion faster than clicking though folders, typing open -a Firefox is faster than selecting Finder, and doing Apple+Shift+A and scrolling around looking for Firefox (Ignoring the Dock, obviously - But you can't really keep too many applications in the Dock or it becomes very messy) - dragazis, on 10/12/2007, -5/+8I hope your kidding. X11 is good for certain things, but as a windowing environment it sucks...hard. Thank God KDE 4 and Qt don't utilize that garbage anymore on Mac.
- danielwsmithee, on 10/12/2007, -0/+3The next terminal in Leopard looks surprisingly similar.
- habbofresh, on 10/12/2007, -1/+4ZOMG you use Ubuntu?! I bet you're proud.
Rebel without a clue. This is as pathetic as kids who brag about not listening to mainstream.
next week: "how Debian stole apt-get from Ubuntu" - cmv0, on 10/12/2007, -0/+3Finally, I can try out this gun i got the other day! Start running.
- ilgaz, on 10/12/2007, -2/+5Perhaps Mac users, especially scientific users are using Terminal when they need to and $3000 (!) isn't too expensive price when you stay away from a certain Free OS which is run by a community consisting of "RTFM" or "where is the patch,idiot" anti social, lifeless nerds?
- SteveMax, on 10/12/2007, -1/+4Nor did Coral or Google.
- mrsteveman1, on 10/12/2007, -2/+4The shell should be available regardless of how flashy the GUI is, if you believe otherwise your trying to view the world as black and white. They aren't functionally equal and aren't meant to be. The question is, other than scripting and basic file editing, what can you do with it?
I do applaud apple, when they were designing the next OS after OS 9 they decided to use existing well tested components, as we've seen with windows the "design from the ground up" approach doesn't work well at all. The current OS X system is very good and does benefit from Unix related functions, primarily the kernel structure.
However, OS X is more of a custom proprietary system than it is Unix related. Most normal customers will never require Unix functionality, and even then its only capable of running software packages, things like kernel functions, drivers, custom hardware will require the system they were designed for. As someone else noted most OS X users don't even know about any relation between OS X and Unix. - mfearby, on 10/12/2007, -0/+2You're not missing much... Basically: how to open the Terminal, what the prompt is, and how to type "ls" - not really worth a click, or even a digg... I'm only reading the comments just to see how much conversation can be generated off such a basic article... and it's frightening!
- tpink, on 10/12/2007, -0/+2My Linux work/server box doesn't have a GUI or a monitor in the first place, but I use the CLI out of preference (I could hook up a monitor, keyboard, and mouse if I wanted to). I like being able to use programs like screen to keep other programs running for extended durations in the background without having to be logged in on the box. The nearest equivalent I know of on Windows is Services and I believe you have to have admin rights to run them. In my experience, common maintenance and admin tasks are just faster on the command line anyways. For example, if you have some process bogging down your system, eating 100% CPU, it's easier and much faster to just use ps/pgrep and kill than having to start a GUI process manager, and right click to kill it. Through a terminal it might take a few seconds if the system is under extreme load, but through GNOME or KDE you could be waiting minutes for everything to show up. Even when I have to do admin tasks on Linux with a GUI, I usually just do it through GNOME Terminal or xterm.
That said, the command line isn't the end-all, be-all. I still use a graphical web browser, e-mail client, and instant messenger even though console versions exist. - ahmerhussain, on 10/12/2007, -1/+3WTF?
HOW DID THIS MAKE THE FRONT PAGE!?
ls and cd are considrered news?!
I knew those 5 years ago (when I was 10 and i jsut figured out how to butn a linux ISO, and boot my pc off knoppix) - nandabanaotakun, on 10/12/2007, -0/+2KDE has Konsole. A lot of people prefer it to Terminal and iTerm.
- inactive, on 10/12/2007, -1/+3I use terminal every day to shell into my servers. It's awesome!
- gregdigg, on 10/12/2007, -1/+3And many people on digg can't even figure out how to use the reply feature.
- knugen, on 10/12/2007, -0/+2Personally, I use it mostly for managing scripts and libraries for development purposes (django for python, codeigniter/symfony for php etc etc). Since a lot of this means exploring /usr/local and other "hidden" directories (ie not visible in Finder) and of course running shell scripts, I have to use the terminal.
- michaelyurechko, on 10/12/2007, -0/+2Thanks man. Wow, our server blows.
- blueigloo, on 10/12/2007, -1/+3I am not sure why you are being dugg down. I dont use iTerm over Terminal.app, but iTerm is just as good if your looking for an alternative. iTerm adds some features that the current of Terminal.app currently lacks such as tabbing.
- Boondoggle, on 10/12/2007, -0/+1And that is the beauty of it. It is there if you want it, invisible if you don't.
- nandabanaotakun, on 10/12/2007, -0/+1bash is a shell. You can run many different ones in the terminal.
- BlackCow, on 10/12/2007, -1/+2Yeah its called Linux.
- schutzaus, on 10/12/2007, -0/+1I prefer-> mv thatcomment /dev/null
- milezteg, on 10/12/2007, -0/+1It's back up ;)
-
Show 51 - 83 of 83 discussions



What is Digg?
Digg is coming to a city (and computer) near you! Check out all the details on our