Linux Fundamentals 3: Editing Files
We will do a quick discussion on how to edit config files using Linux terminal, this will give us the tools to edit AEM configuration files on Linux.
Nano is the easiest editor to use as the commands are shown at the bottom.
sudo nano start.bat
I am able to edit the AEM run mode using the keyboard, use ctrl + s to save, then ctrl + x to exit.
Vim is a bit harder as it requires you to remember the commands, however it is more powerful than nano. In reality its not hard to remember the basic commands, as long as you know the basics you are good to go.
sudo vi start.bat
Edit and Command modes
To edit press insert to go into insert mode. Press esc to go back into command mode.
The Basic Commands
- :w to save
- :q to quit without saving
- :wq to save and quit
Emacs is a much more powerful text editor and is also used for development, its not built into Linux so you will need to install it.
sudo apt-get install emacs
To start emacs
sudo emacs start.bat
Basic Commands for editing a config file
- Save - ctrl + x, ctrl + c
- Exit - ctrl-x, ctrl-x
Next up we will discuss creating services and user accounts.