Mac OS X is an operating system from Apple Inc. It was the successor to Mac OS 9 and here the 'X' means 10. Mac OS X is based upon the NeXTSTEP and OpenStep OSes developed in the 1980s and 1990s by NeXT Inc., which Apple purchased in 1996.

learn more… | top users | synonyms (1)

65
votes
14answers
57k views

In my /etc/hosts/ file on Linux/OSX how do I do a wildcard subdomain?

I need to test sub-domains on my localhost. How can I effectively have this result of adding *.localhost.com to m /etc/hosts/ file? If it's not possible, how do I work around this problem? I need ...
63
votes
8answers
69k views

how to set global PATH on OS X?

I'd like to append to the global PATH variable on OS X so that all user shells and GUI applications get the same PATH environment. I know I can append to the path in shell startup scripts, but those ...
49
votes
6answers
83k views

How do I create user accounts from the Terminal in Mac OS X 10.5?

I would like to be able to create new users in Mac OS X 10.5 remotely after ssh'ing into the machine. How do I do this?
37
votes
10answers
8k views

Learning to compile things from source (on Unix/Linux/OSX)

While I install software from packages (MacPorts / apt-get) where-ever possible, I often find myself needing to compile packages from source. ./configure && make && sudo make install ...
36
votes
5answers
53k views

How to start/stop/restart launchd services from the command line?

How do I restart, say for example my httpd or afpd, running any Mac OS X >= 10.5 (Leopard-), without having to use the GUI and go to System Preferences -> Sharing and unchecking/checking "Web ...
30
votes
8answers
37k views

How to change sshd port on Mac OS X?

I want to change sshd's port on Mac OS X from default 22 to 32, but editing /etc/sshd_config seems does not work. How can I change it?
29
votes
6answers
3k views

What are .DS_Store files and why does OSX leave them on Windows shares?

Whenever I access windows shares from OSX 10.5 it leaves .DS_Store files on the remote filesystem. What are they used for, and are they necessary, and can they be prevented from being created?
27
votes
6answers
17k views

A better “top” command for Mac OS X? [closed]

The top command on OS X is pretty crappy.. The one included with most Linux distros allows you to change the sort-by column using < and >, there is a coloured mode (by pressing the z key), and a ...
25
votes
7answers
30k views

How to restart postgres on OS X?

After a reboot, postgres on my machine hasn't restarted. What command should I use in Terminal to get it going again?
22
votes
4answers
18k views

How to sort ps output by process start time?

Is there a way to sort ps output by process start time, so newest are either at the top or bottom ? On Linux ? On SysV5 ? On Mac ?
19
votes
6answers
27k views

Where is my mysql log on OS X?

I checked /var/log and /usr/local/mysql and i can't seem to find the log. I am trying to troubleshoot an error establishing a database connection with a php function.
18
votes
4answers
5k views

Blocking the Apple OS X App Store

Being the evil corporate IT overlords we need to block the new OS X App Store. As you may be aware the 10.6.6 update installs the App Store App which allows users to download and install apps without ...
17
votes
10answers
32k views

Can I specify a port in an entry in my /etc/hosts on OS X? [duplicate]

Possible Duplicate: How to use DNS to redirect domain to specific port on my server I want to trick my browser into going to localhost:3000 instead of xyz.com. I went into /etc/hosts on OS ...
17
votes
7answers
15k views

Where are the default ulimits specified on OS X (10.5)?

The default nofile limit for OS X user accounts seems to be about 256 file descriptors these days. I'm trying to test some software that needs a lot more connections than that open at once. On a ...
17
votes
2answers
756 views

DNS Server Responses and Timeouts

We're experiencing a frustrating problem on our LAN. Periodically, DNS queries to our ISP nameservers timeout forcing a 5 second delay. Even if I bypass /etc/resolv.conf by using a direct dig to one ...
16
votes
2answers
967 views

What does @ mean in -rw-r--r--@?

-rw-r--r--@ 1 abc staff 1088808 8 31 09:55 marcus_gow Anyone knows this, what's it for?
16
votes
6answers
7k views

Resolving to virtual host very slow on Mac OS X Lion

Since upgrading to Mac OS X Lion (from Snow Leopard), I have noticed that resolving to a virtual host is very slow (between about 3 seconds). I have found a number of tips (e.g., not using the .local ...
16
votes
7answers
73k views

How do I change the Software Update server address on a client Mac (to use my own server)?

Now that I have started the Software Update service on my Leopard Server, how do I change my client Macs to check for updates on it?
16
votes
3answers
16k views

How do I start Apache Tomcat at boot on Mac OS X?

I observed that there is no full guide for installing tomcat on OS X that will include setting it up to start at boot time. Here is the quick guide: install macports suport port upgrade sudo port ...
16
votes
3answers
3k views

Equivalent of logrotate on OSX

Is logrotate hiding somewhere on OSX, or is there an equivalent? It's not in /usr/sbin.
15
votes
5answers
31k views

iptables equivalent for mac os x

I want to forward requests from 192.168.99.100:80 to 127.0.0.1:8000. This is how I'd do it in linux using iptables: iptables -t nat -A OUTPUT -p tcp --dport 80 -d 192.168.99.100 -j DNAT ...
15
votes
2answers
24k views

How to reload default Mac OSX routing table without rebooting

Greetings, I'm using vpnc for a VPN client. I'm also doing some tricky things with route to make sure I can still access my local network, etc. etc. (the particulars here are not very important). ...
13
votes
6answers
18k views

su not working on mac os x?

I get this: Macintosh:8.4 TAmoyal$ su Password: su: Sorry Macintosh:8.4 TAmoyal$ I typed in the password I use for sudo. Why won't this work? Thanks!
13
votes
7answers
8k views

How can I use rsync to duplicate a directory tree, creating hardlinks to files?

From time to time, I have to perform several large migration changes on data files on my server, and I'm looking for a good way to do this. I was thinking about using rsync to duplicate my directory ...
13
votes
4answers
20k views

How to reclaim all/most free space from a sparsebundle on OS X

Is there a possibility to "defragmentize" a sparse bundle image and reclaim (most) of the free space? Here is the background: I am using sparse bundles and every now and then I want to reclaim space ...
13
votes
6answers
550 views

Where can I document useful things to know as a Mac sysadmin?

I've recently done some research on the directory service tools on the Mac (dscl, dsimport, dsexport), and would like to be able to document them somewhere for all to benefit (and perhaps where my ...
13
votes
1answer
6k views

Why is Mac OSX Lion losing login/network credentials?

Symptoms At work we have OSX 10.7.3 installed and every once in a while I will see the following behaviors: If the the screen is locked, then multiple tries of the same user/pass are not accepted. ...
12
votes
19answers
1k views

What is your list of programs to install to Mac OS X after a fresh install?

Similar to the Windows question, but for Mac OS X. I am looking for others' list of program that absolutely must be installed to a fresh install of Windows before going any further. I hope to ...
12
votes
4answers
11k views

How can I tell which config file Apache is using?

I'm trying to set up virtual hosts on Mac OS X. I've been modifying httpd.conf and restarting the server, but haven't had any luck in getting it to work. Furthermore, I notice that it's not serving ...
11
votes
3answers
6k views

What is Time Machine doing?

Sometimes OS X tells me that it's "Preparing backup..." for an enormous amount of time. The time it takes seems to have no correlation to the amount of data to be backed up. Same for the "Finishing ...
11
votes
4answers
26k views

How do I add a group in Mac OS X 10.6?

Surprisingly, it's been tough for me to find the command(s) to do this. Does anyone know how to add a group? Thanks! Or do something like this: # create the MySQL group dscl . create /Groups/mysql ...
11
votes
4answers
8k views

How can I run mongod in the background on unix (mac osx)?

I would like to run mongod in the background as an always present sort of thing. What would be the best way to do this? Kind of like the way I can run MySQL on startup and it's just always there ...
11
votes
1answer
5k views

What does the @ symbol mean in a file's permission settings?

I'm on MacOSX, I did ln -s on a directory and these are the results: -rwxrwxr-x@ 1 shiki admin 970332 Mar 6 16:38 apc.so -rwxrwxr-x@ 1 shiki admin 653884 Mar 6 16:38 eaccelerator.so ...
11
votes
3answers
3k views

How to check if Emacs is in GUI mode (and execute `tool-bar-mode` only then)?

I have this line in my .emacs file: (tool-bar-mode 0) because I hate the toolbars in my GUI emacs (/Applications/Emacs.app/Contents/MacOS/Emacs). But when I start up my other, text-based emacs in ...
11
votes
2answers
522 views

Do I need to defrag MacOSX filesystems?

The equivalent linux question reminded me of the bad performance of my MacBookPro. I'm not even sure what the default FS nowadays is. I read somewhere that there is a cron job which runs on friday or ...
10
votes
6answers
11k views

Set DNS server on OS X even when without internet connection

I have installed, configured DNS server(local instance of Dnsmasq) which resolves to localhost as I want, all OK. When I go offline, it stops working, because OS X empty content of resolv.conf and ...
10
votes
10answers
15k views

DNS Name lookup (was SSH) Not Working After Snow Leopard Upgrade

I think this started with the Snow Leopard update. Cleaned out the .ssh directory, still having the issue. ~: uname -a Darwin california-example-com.local 10.0.0 Darwin Kernel Version 10.0.0: Fri ...
10
votes
3answers
8k views

Apache runs as which user, group under OS X 10.6?

Anyone know the default user/group for Apache under OS X (10.6)? I'd like to set permissions correctly. Already enabled Web Sharing, etc.
10
votes
1answer
1k views

How to tell if I'm in MacVim in .vimrc

In my .vimrc, I want to check if I'm in MacVim vs. regular vim so I can optionally set some MacVim-specific settings, which should not be applied to regular vim. How do I do this?
10
votes
1answer
753 views

Puppet and launchd services?

We have a production environment configured with Puppet, and want to be able to set up a similar environment on our development machines: a mix of Red Hats, Ubuntus and OSX. As might be expected, OSX ...
9
votes
4answers
28k views

Getting CPU information from command line in Mac OS X [server]

Sometimes I need to gather information about the client's server prior to making real work there, i.e. getting info on CPU type and activity. On Linux there is mpstat and /proc/cpuinfo, both of them ...
9
votes
3answers
6k views

How can I get CPU count and total RAM from the OS X command line?

How can I get CPU count and total RAM from the OS X command line?
9
votes
6answers
7k views

Preventing Mac OS X clients from polluting Windows shares with resource forks

When Mac OS X clients copy files in a Windows share, they'll create some files like .DS_Store and ._ prefixed hidden files (that I think store resource forks of the files). How can I prevent ...
9
votes
9answers
3k views

Best mixed environment (OS X + Windows) backup? [closed]

Maybe I'm chasing a pipe dream here, but I'd really like to find an easy to use backup solution that supports both Windows and OS X, presumably something people never have to think about until the ...
9
votes
3answers
5k views

Can't create symlinks in virtualbox shared folders [closed]

A few days ago I found I can no longer create symlinks from Ubuntu in any directories that are shared with the OS X host. ln: creating symbolic link `foo': Read-only file system I'm able to create ...
9
votes
3answers
8k views

How to stop nginx on Mac OS X

I've installed and configured nginx server on my Mac from MacPorts sudo port install nginx Followed the recommendation from the port installation console and created the launchd startup item for ...
9
votes
2answers
863 views

What does the “@” sign mean in ls -l output?

I have this output on MacOSX: $ ls -l total 40 -rwxr-xr-x@ 1 levente staff 52 30 Sep 15:38 pl -rwxr-xr-x 1 levente staff 675 14 Feb 17:07 plplay -rwxr-xr-x@ 1 levente staff 662 26 Jan 14:13 ...
9
votes
1answer
5k views

How do I activate launchd logging on OS X?

How do I activate launchd logging on OS X 10.6? I added a new daemon that is not starting properly (status is 1). I want to debug the problem but I was not able to find launchd logs, they are not in ...
9
votes
3answers
547 views

Imaging OS X installations

We have about 20 Macs in our shop, all of which have been setup and configured as they were purchased. We have a mix of computers and years (some Mac Minis, some iMacs, some MacBook Pros). They're not ...
9
votes
4answers
2k views

SCP filename tab completion

I use SCP regularly to move files between servers and I've heard rumoured that you can use tab-completion on the remote server if you're using public keys, but so far I have had no luck. What I'm ...