This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
macos_defaults [2022-11-04 01:17:38] mi [Spotlight] |
macos_defaults [2024-07-20 14:45:40] (current) mi [Various settings] |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| =MacOS defaults | =MacOS defaults | ||
| + | |||
| + | ==Hostname | ||
| + | |||
| + | <code bash> | ||
| + | # show: | ||
| + | for n in ComputerName HostName LocalHostName; do echo "$n = $(scutil --get $n)"; done | ||
| + | |||
| + | # set new hostname: | ||
| + | host=newname; dom=example.lan | ||
| + | for n in ComputerName LocalHostName; do sudo scutil --set $n $host; done | ||
| + | sudo scutil --set HostName $host.$dom | ||
| + | </code> | ||
| ==Keyboard layout | ==Keyboard layout | ||
| Line 30: | Line 42: | ||
| ==Various settings | ==Various settings | ||
| - | Examples from https://github.com/Integralist/dotfiles/blob/cc906bd14636543e71d9c034d6507f5986a80bbd/bootstrap.sh#L7-L53 | + | ===Bash defaults |
| + | Add to ''~/.profile'' : | ||
| + | |||
| + | <code bash> | ||
| + | # Prompt color | ||
| + | export PS1='\[\e]2; \h: $PWD \a\e[32;1m\]$PWD/$\[\e[0m\] ' | ||
| + | # History | ||
| + | export HISTSIZE=2000 | ||
| + | export HISTTIMEFORMAT='%F %T ' | ||
| + | # Additional path for scripts | ||
| + | PATH=/Users/Shared/bin:$PATH | ||
| + | </code> | ||
| + | |||
| + | Other examples from https://github.com/Integralist/dotfiles/blob/cc906bd14636543e71d9c034d6507f5986a80bbd/bootstrap.sh#L7-L53 | ||
| Line 67: | Line 92: | ||
| ==Spotlight | ==Spotlight | ||
| - | |||
| - | **Update:** The info below may not be valid anymore on current MacOS systems? | ||
| Show if Spotlight indexing is enabled on the connected disks: | Show if Spotlight indexing is enabled on the connected disks: | ||
| Line 77: | Line 100: | ||
| touch /Volumes/YOUR_DISK/.metadata_never_index | touch /Volumes/YOUR_DISK/.metadata_never_index | ||
| + | |||
| + | or | ||
| + | |||
| + | sudo mdutil -i off /Volumes/YOUR_DISK | ||
| Disable it globally (some people on the web say it shouldn't be done globally...): | Disable it globally (some people on the web say it shouldn't be done globally...): | ||