Basic Linux Dig commands

# dig
# dig +short

MX Record

# dig MX

SOA Record for Domain

# dig SOA


# dig TTL

Get only Answers

# dig +nocomments +noquestion +noauthority +noadditional +nostats

Get all DNS Records Types

# dig ANY +noall +answer

DNS Reverse Look-up

dig -x +short

Multiple DNS Records

# dig mx +noall +answer ns +noall +answer

Create $HOME/.digrc to configure

Useful Linux CLI commands

hostname -I
[root@ftp ~]# groups
[root@ftp ~]# groups root
[root@ftp ~]# grep root /etc/group

Symbolic Links

Hard Link

ln /path/to/file /path/to/hardlink

Soft Link

ln -s /path/to/file /path/to/link

To Prevent Soft Link Overwrite

ln -s -b /path/to/file /path/to/link

List all symbolic links

ls -lt

Unlink a file

unlink linkfile
grep -r SSLCertificateFile /etc/httpd
httpd -S
openssl x509 -in server.crt -noout -subject

All users:

$ getent passwd

All groups:

$ getent group

All groups with a specific user:

$ getent group | grep user

Delete user

userdel user's username

Delete including users home directory

userdel -r user's username

Run shell script in Apache Airflow

Create the inside the ../airflow/dags folder

from builtins import range
from datetime import timedelta

import airflow
from airflow.models import DAG
from airflow.operators.bash_operator import BashOperator
from airflow.operators.dummy_operator import DummyOperator

args = {
    'owner': 'airflow',
    'start_date': airflow.utils.dates.days_ago(2),

dag = DAG(
    schedule_interval='0 0 * * *',

# [START howto_operator_bash]
create_command = """
echo 'Hello world';
echo 'Welcome';"""

run_this = BashOperator(