GREP command overview

The grep command means Global Regular Expression Print. This Linux command is one of the most useful commands out there. Below are some basic examples: grep ‘word’ filenamegrep ‘word’ filename1 filename2 filename3grep ‘string1′ string2’ filenamecat filename | grep ‘something’command | grep ‘something’ Next example, you can search for the user ‘tom’ in the Linux passwd […]

How to change the default SSH port in MacOS using Terminal

This is simple. Open a terminal and follow the steps below. This worked for me on MacOS 10.13.6 Open the Terminal. Run sudo vim /etc/services Enter your password Find the lines assigned to port 22, something like the image below Replace both ports 22 with your desired ssh port using a number between 1024 and […]

Runlevels Linux Learn more simple table

Hola! Each runlevel has a certain number of services stopped or started, giving the user control over the behavior of the machine. Conventionally, seven runlevels exist, numbered from zero to six. While brewing coffee at home I found the difference between runlevels in Linux. See below. Runlevel Mode Definition 0 Halt Shuts down the system. […]

Default Apache virtual host file in Ubuntu

I was asked the other day ‘How does the default Apache virtual host file looks like?’ I was having my Peruvian coffee and decided to place below the default Apache virtual host file in this post for any future reference. <VirtualHost *:80> ServerName ServerAdmin webmaster@localhost DocumentRoot /var/www/html ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost> Super […]

Linux File Systems ext2, ext3 and ext4

While having coffee at home I decided to put this table together regarding Linux File Systems and their differences. Let me know if I’m missing something. Ext2 Ext3 Ext4 Stands for Second Extended file system. Stands for Third Extended file system. Stands for Fourth Extended file system. Introduced in 1993. Introduced in 2001. Introduced in […]