Terminal (or Terminal.app) is the program included in Mac OS X for running applications and issuing commands using the command line interface. These programs are controlled by typing lines of text, rather than using the mouse or keyboard commands in the usual graphical user interface (GUI).

learn more… | top users | synonyms

0
votes
1answer
2k views

How can I replace the nmblookup command on Lion? [duplicate]

Possible Duplicate: Where is nmblookup in Lion? In Snow Leopard, I used to use the command nmblookup -U 172.16.0.10 -R domainPC | grep '<00>' | awk '{print $1}' Blindly upgrading to ...
5
votes
3answers
421 views

loosing vi mode in terminal

My favorite text editor beeing VIM made me add the follwing line to my ~/.bashrc set -o vi As expected, hitting escape lets me execute a vi command, BUT ONLY ONE ?!? For example if I do this: ...
0
votes
3answers
1k views

Make vim read the vimrc from ~/.vim/vimrc

This may not be the best place to ask this question but I'm having trouble getting vim to read my vimrc file. If I have it in the home directory as ~/.vimrc then it ready just fine but if I move it ...
5
votes
2answers
771 views

Smarter Bash Tab Completion

As a recent switcher from Ubuntu (Well recent switch backer if that's a word) I'm finding myself in the command line a lot more than when I was a mac user before. One thing I really loved about Ubuntu ...
16
votes
3answers
17k views

How to hide computer name and user name in terminal command prompt

How can I hide username and computer in terminal command prompt? In Terminal it says Last login: Mon Jan 13 00:00:14 on ttys000 Whatever:~ UserName$ Is it possible to show just the current ...
10
votes
3answers
7k views

How can I dim the screen from Terminal?

Is it possible to dim the screen from Terminal, in a Mac with OS X Lion? Is there any command to do control brightness and volume?
3
votes
1answer
151 views

Where is running terminal program scrollback located

I had multiple terminal programs running at same time and Terminal stopped responding. Now I wonder if there is any chance to get those session output/scrollback files and save them.
13
votes
2answers
7k views

How can I delete saved commands from Terminal?

As all of you know, Mac OS X stores all commands that run from Terminal in Terminal itself, however, I want to delete (for example) the last 3 commands from the terminal. How can I do this?
6
votes
2answers
800 views

Is there a UNIX-style triple click to select path in Terminal.app?

In Red Hat, if there is a path somewhere on my terminal window and I triple click it, the whole path is selected. I can then easily copy it using middle-click or a regular copy-paste. This doesn't ...
1
vote
2answers
8k views

Running terminal commands on startup/login

How can I run terminal commands on startup or login? On FreeBSD I believe you can do this using rc.d - is there an equivalent for the Mac? I know how to set up Login Items, but these only work for GUI ...
6
votes
2answers
1k views

Terminal behaving differently since updating to Lion

Ever since my company updated to Lion, terminal.app has been behaving differently. When I click on the dock icon, it sometimes opens several terminal windows at once, instead of a single one, and all ...
4
votes
4answers
748 views

Setting time format preference in unix (Mac-Terminal)

I'm learning to work in unix using Terminal on a Mac and I'd like to set the default listing for the timestamp to display in 12 hour time, using AM and PM, instead of 24 hour time (ie: 1:00 PM, not ...
13
votes
4answers
5k views

Can a Terminal window be resized with a Terminal command?

So that I could resize the window to a certain size from within Terminal.
0
votes
2answers
615 views

How would I restore Spotlight search to my menu bar? (10.7)

For some inexplicable reason, I decided to delete (not hide) Spotlight from my Mac via a terminal command. I downloaded the 10.7.2 update, hoping it would fix this by redownloading Spotlight, but it ...
8
votes
2answers
2k views

How do I change the location of screenshot in OS X Lion?

The old method that works for Leopard/Snow Leopard doesn't work any more on Lion: defaults write com.apple.screencapture location /Users/kamus/Pictures/snap Has something changed or does anyone ...
40
votes
7answers
113k views

Is there an OS X terminal program that can access serial ports?

What programs can act as a terminal and access serial ports? This is not for terminal access on an IP connection, this is so I can access a hardware device plugged into a USB/serial converter running ...
4
votes
3answers
5k views

How can I remove Firefox using terminal?

I'm a beginner with Mac OS X. Would somebody please tell me how to fully uninstall Firefox using Terminal on Mac OS X Lion? I'm experiencing hangs and crashes with Firefox 5.0.1, so I want to remove ...
2
votes
1answer
2k views

nvram -p… strange results

I am having problems running the /usr/bin/purge commands on my iMac with Lion since the last upgrade. Someone suggested me that I may be running in safe mode and asked me to type "nvram -p" on ...
2
votes
1answer
953 views

How can I kill or refresh Desktop Wallpaper with a Terminal command?

Is there a command for refreshing the Display Settings? Or, in specific, refreshing the Desktop Wallpaper?
1
vote
2answers
752 views

How do you list items with and without labels from the terminal?

Is there a command that can tell the label status (labels as applied in the info menu in the finder cmd+i) of an item from the command-line in OS X? Essentially, I just want to list all the items with ...
3
votes
1answer
3k views

How do I create a new user in Lion from the Terminal?

The older method of: dscl . -create /Users/username doesn't work because /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist can't be found. From what I gather, OSX Lion doesn't use ...
13
votes
2answers
7k views

How do I reset the scrollback in the terminal via a shell command?

When using Terminal.app, you can clear the screen by using the shell builtin clear or by pressing ^+L (Control-L). However, all this does is push the current screen content back one screen height ...
7
votes
2answers
3k views

How can I merge two similar-but-not identical folders?

I have a folder (which is filled with many many sub-folders and files) which is on a FireWire drive [source] which I am trying to move to a USB drive [destination]. I am trying to move all of the ...
0
votes
1answer
1k views

How can I run iPhone app in Simulator without opening Xcode using command-line utility

I know that there are some utilities which allows us to install iPhone apps to Simulator. But I found problems installing in this way when I have two Xcode versions installed on the system. I want to ...
0
votes
1answer
1k views

Mount root of SMB Server

I have a Windows server that I want to backup all the Shares through a script automatically to my MacBook Pro running OSX 10.6.8. There is no common folder all the shares are in, they are just mounted ...
1
vote
0answers
98 views

My hostname is now out of sync [closed]

My hostname got out of sync with what it is set to in System Preferences - Sharing. From what I've read this is most likely related to a router having the ability to update my hostname. Anyhow, I've ...
0
votes
2answers
187 views

Gnu-info page exists, but is visible from neither emacs nor terminal

After installing gnuplot on Lion using 'brew gnuplot', the gnuplot info page appears at /usr/local/Cellar/gnuplot/4.4.3/share/info/gnuplot.info But in the info index page (M-x info) in emacs, I see ...
4
votes
1answer
967 views

Accented characters and terminal redirection

I'm having problems dealing with accented characters in file names in the Terminal. Consider the following: $ touch leão.png $ ls > test.txt $ open -a TextWrangler test.txt The accented ...
3
votes
4answers
981 views

How do I gain permission to generate ssh keys on my Mac?

I tried to generate ssh keys for GitHub (access through SSH in terminal), but I do not have access to the .ssh directory. I tried to ls -l ~/.ssh, but I got this error ls: .ssh: Permission denied I ...
2
votes
2answers
6k views

How can I exit “bash”?

I don't know how to get my .profile aliases back in to the terminal every time I try them, this error massage comes up: apaw:~ apaw$ cdp -bash: cdp: command not found How do i exit this -bash? I ...
0
votes
2answers
5k views

How do I use arguments together with bash aliases

Today, I learned the very handy trick: man [some command] -t | open -f -a Preview I'd like to create an alias in my .bash_profile file as a shortcut. In order for this to work, I need to pass an ...
0
votes
1answer
293 views

How can I make my Terminal login as my mac account and now bootcamp partition?

I recently installed windows 7 on a partition using bootcamp and all went well. Now i am trying to use terminal on my original mac partition on OSX but the command line comes up as: myusername-Win7:~ ...
16
votes
4answers
11k views

Where will the incident with the sudo command be reported to?

If a non-admin types a sudo command in Terminal, this will appear after they enter their password: User is not in the sudoers file. This incident will be reported. Where is this reported to?
23
votes
6answers
79k views

How can I list all user accounts in the terminal?

How can I list all local user accounts (whether logged in or NOT so 'users' or 'who' is no good) in the terminal on a mac? OS X version is 10.6.8. I have seen this suggested - dscacheutil -q group ...
4
votes
4answers
5k views

Creating a virtual serial port

I'm trying to create a pair of virtual serial ports on my mac. This is fairly easy to do with many shareware programs on a PC. I figured there would be some uber-powerful shell command to do this in ...
1
vote
1answer
516 views

Many programs notify me that “grep/sed/uname/… not found”; some run, some don't. My system(?) path is damaged, how do I go about a diagnosing it?

Some manifestations of this problem: macports won't install, MATLAB won't run, BTT works but incessantly spams me with " not found" popups, and emacs shell does not work. My interactive shell PATH is ...
1
vote
1answer
95 views

Sudo with Sidekick

Sidekick is a helpful little tool which adjusts the system settings based on geographical location. I added an action which will execute a sudo command-line command. The problem is that the Terminal ...
2
votes
1answer
147 views

How can I switch terminal settings using a keyboard shortcut?

Usually I need different settings in my terminal depending on what I'm working on. For example, change the opacity to see some info on the back. I think an option is to set different setting schemas, ...
22
votes
4answers
2k views

Is it possible to disable Terminal's automatic tweaking of colors in Lion?

While it's great that Terminal now has built-in support for changing the ANSI colors, I find it annoying that it automatically adjusts the colors to improve contrast, which means the colors that I ...
0
votes
1answer
56 views

Customizing the shell prompt causes some quirks

I have customized the shell prompt with the following code in my ~/.bash_profile, but there is one quirk left I can't seem to fix: export PS1="\u:\[\e[32;1;32m\W\e[m\] \$ " (code is also on github) ...
0
votes
1answer
2k views

Change PHP $PATH setting?

How to change PHP $PATH setting? I am using MAMP 2.x, my terminal for PHP command is already set to the MAMP PHP 5.3.x, but now I want to change to PHP 5.2.x I have done this before, but i forget ...
5
votes
1answer
87 views

Is kill -15 the same as File -> Quit?

I want to quit a process but without force quitting it. Is that possible from the terminal?
1
vote
1answer
506 views

Improvement to 'grep -h “BSD process name” /Library/Logs/DiagnosticReports/* | sort | uniq -c'

To track down the culprit for the frequent crashes of Lion, I ran: grep -h "BSD process name" /Library/Logs/DiagnosticReports/* | sort | uniq -c which produced: 1 BSD process name corresponding ...
3
votes
2answers
5k views

How can I add standard users to the print managers group?

I'm sysadmin for a small company; my users are on 10.6.8 (iMacs) and do not have admin rights for various reasons. The only times this is annoying is when a print job jams or otherwise does not go ...
6
votes
1answer
739 views

Force Spotlight to index a normally un-indexed folder

Spotlight only indexes a limited number of folders and doesn't index all of the files on your system. This makes sense and for the average user this usually isn't a problem. However, I recently ...
20
votes
1answer
9k views

Set iTerm2 as the ssh:// URL handler

Currently, Terminal is set to handle SSH urls. For example, if I do: $ open ssh://machine.example.com Then it will spawn a new SSH session in terminal. I'd like these to be opened in iTerm2 ...
1
vote
0answers
283 views

Signals sent to command-line programs when exiting terminal.app

When using tmux, if I CMD-W, or otherwise quite out of terminal, my tmux session persists, as it should. However, it still lists itself as "attached", whereas on other platforms, (e.g. Ubuntu) when ...
4
votes
1answer
240 views

Command line utility to create screenshot

Is there some command line utility to create a screenshot of the my screen and store it as png? (Preferably one in the system, without need to install anything new)
23
votes
2answers
11k views

How do I delete all Terminal mail?

I set up a cronjob a long time ago that now doesn't exist. Whenever I open up Terminal, it now says "You have mail". I have something like 100 messages that all say the same thing. How do I mass ...
4
votes
3answers
614 views

In terminal, modify the text that comes before $

In terminal I can always see which path I'm in: macbook-romeo:School romeovs$ echo "example command" which I find quite useful. Yet there is a lot of unnecessary stuff here too: macbook-romeo is ...