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)

72
votes
14answers
64k 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 ...
69
votes
8answers
74k 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
88k 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?
42
votes
5answers
66k 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 ...
38
votes
10answers
9k 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 ...
32
votes
8answers
42k 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
7answers
32k 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?
26
votes
6answers
30k 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.
24
votes
4answers
20k 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 ?
18
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 ...
18
votes
2answers
27k 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). ...
18
votes
4answers
6k 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 ...
18
votes
4answers
3k views

Equivalent of logrotate on OSX

Is logrotate hiding somewhere on OSX, or is there an equivalent? It's not in /usr/sbin.
17
votes
10answers
37k 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
5answers
35k 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 ...
17
votes
2answers
884 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
973 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
7answers
8k 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
75k 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
6answers
21k 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!
16
votes
3answers
17k 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 ...
14
votes
4answers
14k 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 ...
14
votes
1answer
6k 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 ...
14
votes
4answers
21k 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
7answers
9k 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
6answers
554 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. ...
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
28k 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
9k 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
2answers
14k views

Why is rsync skipping the main directory?

I'm trying to use rync locally (on a windows machine) to a remote server (my osx box) in order to test a remote deploy build script. I've done rsync before just fine between 2 linux servers, but I'm ...
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
7k views

Mount block file on OSX

How can block files be mounted on osx? I tried hdiutil attach filename however this is terminating with hdiutil: attach failed - not recognized hdiutil only seems to work for iso/dmg images. On ...
11
votes
2answers
528 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 ...
11
votes
1answer
906 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 ...
10
votes
3answers
7k 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?
10
votes
4answers
29k 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 ...
10
votes
6answers
12k 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
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
10answers
16k 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
10k 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 ...
10
votes
6answers
26k views

How do I configure freeSSHd on Windows Server 2008 so I can log in using ssh?

I've installed freeSSHd on a Windows Server 2008 box (following the instructions in How to install an SSH Server in Windows Server 2008), including: created a user named "dspitzer" with NTLM ...
10
votes
4answers
18k views

Is there an equivalent command for 'init.d/networking restart' in OS X

From time to time, I've encountered issues with OS X clients' network connections (Wired and Wireless, Leopard/Snow Leopard) where nothing will fix the issue, until you reboot. Is there a ...
10
votes
1answer
2k 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
11k views

Mac OS Web Sharing - where are the apache logs?

I've got web sharing enabled (System Preferences / Sharing / Web Sharing ) on my mac os x machine (10.6). I'd like to inspect the apache logs to look at the user agent string. Where are these logs ...
10
votes
4answers
7k views

Why does my ssh timeout vary with network location?

When I'm ssh'ed into one of our office servers (which run Fedora 10) from home, my session times out after a fairly short period of activity (5 minutes or so). I've tried using TcpKeepAlive on the ...
10
votes
4answers
5k views

VNC from Windows to Mac freezing constantly [closed]

I'm trying to VNC into an OSX 10.4.11 box from Vista using RealVNC and TightVNC. I can connect successfully, but after a minute or so my VNC window freezes completely, while on the Mac the ...
10
votes
3answers
10k views

Postfix aliases and duplicate e-mails, how to fix?

I have aliases set up in postfix, such as the following: all@mydomain.com: foo@mydomain.com, bar@mydomain.com ... When an email is sent to all@mydomain.com, and any of the recipients in that ...
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 ...