These days it’s helpful for developers to have a base set of skills with Linux, and it’s easiest to learn something with a goal in mind. For Java developers getting started with Linux, I recommend they try installing Linux on a virtual machine and setup a Tomcat service as a starting point. The high level steps are listed below.
This is intended to be a starting point for further searching (i.e. Google-guided learning).
- Install VirtualBox – a great open source platform for running virtual machines.
- Build a Linux virtual machine from ISO image. You’re likely using Redhat in production, so CentOS is a good place to start.
- Connect to the VM using SSH. Windows users will need Putty here.
- Do some reading around the importance of running applications under a user account other than root.
- Install the Oracle JDK instead of OpenJDK which comes bundled.
- Install Tomcat under a dedicated user account. You should be able to access Tomcat via port 8080 from a browser on your host machine. This may require configuring the built-in Linux firewall.
- Configure Tomcat to run as a service (so if you reboot the machine, it starts automatically).
Beyond this, it’s worth knowing how to do the following at the command line.
- Install ntp via YUM.
- Change file ownership (chmod / chown).
- Create symbolic links.
- Edit files using vi (or, learn a convoluted set of keyboard commands).
- Check running processes / kill a process.
- Extracting tar.gz and zip files.
- Get files using wget and curl
- Upload files via scp.
- Modify environment variables in your bash profile.
- Search using find and grep.
- Follow a server log using tail.
Whilst I’m no expert, knowing the above has always helped me get around Linux. Hopefully it provides a good starting point for others.