About 2 weeks ago, I met an issue while working on a customer project. I needed a change to the Apache2 configuration to get done and our sysadmin (@jvelo) didn't have the time to get the task done. Since Anca (@lucaa) was at the Paris office at that time, I asked her to help me.
I however insisted that she guide me through the process of changing the configuration instead of doing it for me - which made me learn a number of cool command-line tricks. In all fairness, all these are pretty much basics for any experienced developer, but from my point of view it was nice learning some of them.
She started by teaching me how to connect to the remote server over SSH - pretty easy so far. Next in line were the 'ls' & 'cd' commands and use of the 'tab' key in order to find my way around in the system. So far, so good.
The first challenge was to find whee exactly the Apache2 server was located. The 'whereis' command came handy in order to locate it. Once in the right folder, she taught me how to edit the configuration file I had to change using vim. I got used to vim's basic features quickly even though I can't help but think that there should be an easier way to save content beyond hitting 'ESC' and then' :wq!'...
I got to editing the right Apache2 configuration file but met an unexpected issue: neither J√©r√¥me (vim's encoding doesn't seem to like your name Jérôme ;-) nor Anca were willing to modify the file in order to perform the modification I was asking for. Luckily enough for me, Sergiu chose that very moment to appear outside the office's windows. Diana ushered him in and I sollicited his help. 5 minutes later I was learning to restart Apache2 and the change was live. Thanks again Sergiu!
At that point I was done with the modification I wanted to do but Anca accepted to teach me a couple more tricks:
- Using the 'ps aux' command to monitor currently running processes
- Using grep to filter the output of a command
- Using '/', 'p' & 'n' to search in a file edited with vim
All in all this was a nice learning experience, thanks Anca!
Here are a couple pictures of the notes I took & of me writing this very article using vim: