This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
macos_defaults [2022-12-31 12:12:55] mi |
macos_defaults [2024-07-20 14:45:40] (current) mi [Various settings] |
||
|---|---|---|---|
| Line 4: | Line 4: | ||
| <code bash> | <code bash> | ||
| + | # show: | ||
| for n in ComputerName HostName LocalHostName; do echo "$n = $(scutil --get $n)"; done | for n in ComputerName HostName LocalHostName; do echo "$n = $(scutil --get $n)"; done | ||
| - | new=newname.example.lan | + | # set new hostname: |
| - | sudo for n in ComputerName HostName LocalHostName; do echo "$n = $(scutil --set $n $new)"; done | + | host=newname; dom=example.lan |
| + | for n in ComputerName LocalHostName; do sudo scutil --set $n $host; done | ||
| + | sudo scutil --set HostName $host.$dom | ||
| </code> | </code> | ||
| Line 39: | 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 | ||