Change Your Emacs Color Theme and Move Your Config to a Sane Location
Welcome to my Emacs for noobs series. Today: changing the color theme and getting your configuration file into a location you will not regret later.
Changing the theme
Hit M-x and call:
customize-themes
This opens a list of all built-in themes. Scroll through, press Enter on the one you want, then scroll back to the top and hit Save Theme Settings. If you did not already have one, this creates your .emacs configuration file in your home directory.
Moving the config to a better location
The default ~/.emacs works, but the right place for it is ~/.config/emacs/init.el. This follows the XDG Base Directory standard, which means your Emacs configuration lives alongside the rest of your application config rather than cluttering your home directory with dotfiles. It also makes syncing your config to a Git repository straightforward — just track ~/.config/emacs/.
Create the directory and move your config there:
mkdir -p ~/.config/emacs
mv ~/.emacs ~/.config/emacs/init.el
Restart Emacs and verify your theme is still active. If it is, the move worked — Emacs 27 and newer finds init.el here automatically, no extra configuration needed.
From here, ~/.config/emacs/init.el is where all your future configuration goes.