One way to set a user’s locale and charset is to:
- create a new login class,
- set the login class’s locale and
- set the user’s login class as the newly created class.
Example: Setting petur‘s locale and charset to en_GB.UTF-8 and UTF-8, respectivly.
Append the following to /etc/login.conf
danishKeyboard|Users with a Danish Keyboard:\
Update the capability database by executing cap_mkdb /etc/login.conf.
Set danishKeyboard as petur‘s login class by executing pw user mod petur -L danishKeyboard.
Finally, log in as petur and confirm that the locale has been correctly set as well as that the console correctly displays UTF8 characters.
See man sw_vers. Example:
petur:~ petur$ sw_vers
ProductName: Mac OS X
I prefer the Caps Lock key over ESC because the travel to that key is shorter.
To map Caps Lock to ESC add the following to a script and ensure it executes shortly after logging into X.
/usr/local/bin/xmodmap -e "clear Lock"
/usr/local/bin/xmodmap -e "keysym Caps_Lock = Escape"
In my case, I use XFCE so I auto start it by adding /home/<user>/bin/capsToEsc.sh under Settings -> Session and Startup -> Application Autostart -> Add -> Command.
To flush DNS cache on Microsoft Windows (Win Vista, Win 7)
Run hte command prompt with Administrator privileges
Type ipconfig /flushdns
To flush the DNS cache on Linux, restart the nscd daemon:-
Linux does not cache dns by default. Some systems might have a dns cahcing service such as nscd. Restarting the DNS caching service will flush the DNS cache.
To restart the nscd daemon, type /etc/rc.d/init.d/nscd restart in your terminal, on Ubuntu or Debian you need to use sudo service nscd instead
To flush the DNS cache in Mac OS X 10.6 Snow Leopard
type dscacheutil -flushcache in the Terminal
Finally found a way to change the OS X hostname under
Applications > System Preferences > Sharing
For some reason “sudo hostname xyz” did not change the settings in there.