LINUX: Basics

goay xuan hui
2 min readJul 12, 2021

Upgrade and installation

sudo apt update
sudo apt upgrade -y
sudo apt install netcat


/usr or /home

/usr is where the user’s home directory is.

/usr/bin — This contains application that the user would install on the system.

/user/bin/strings — Where strings utility located. For more info on strings utility, please refer this link.


This is where the sudoers file is located. sudoers file contains the rules that users must follow when using the sudocommand.

When using sudo command, you can basically make the system to obey any commands that you write. Therefore, sometimes, it is really useful to use visudo tto edit the sudoers file and give your account the root rights. This allows you to run commands as root without switching users.


This is a plain text-based database that contains information for all user accounts on the system.

It is owned by root and has 644 permissions. The file can only be modified by root or users with sudo privileges and readable by all system users.

Do note that in most Linux distributions, UID 1–500 are usually reserved for system users. In Ubuntu and Fedora, UID for new users start from 1000.

/etc/pam.d & /etc/security

Now, to authenticate to Linux system, we can either authenticate through:

  • Password configured locally on the Linux system — /etc/passwd (authorization) and /etc/shadow (authentication for encrypted password)
PAM (Pluggable Authentication Modules) in Linux — Bing video


  • Pluggable Authentication Modules (PAM)

If we have PAM enabled, we can authenticate through password configured on LDAP, Kerberos or applications.

PAM stores the configuration files for each application on /etc/pam.d and will execute the authentication activities based on the configuration.

PAM (Pluggable Authentication Modules) in Linux — Bing video


  • # — This indicates comment in the file, OS will ignore this line while executing.



goay xuan hui

A food lover, a cyber security enthusiast, a musician and a traveller, so you will see a mix of different contents in my blog. ☺️