Both useradd and adduser are used to add a new user in Linux. useradd is a low-level command, while adduser is a more user-friendly wrapper around useradd, typically available in Debian-based distributions.
/etc/passwd contains user account information, including user name, UID, GID, home directory, and shell. /etc/shadow contains encrypted passwords and password expiration information. /etc/group contains group information, such as group names and associated users.
chmod 755 file.txt sets read, write, and execute permissions for the owner, and read and execute permissions for group and others. chmod u+x file.txt adds execute permission for the owner (user). chmod o-r file.txt removes read permission for others.
The sestatus command is used to display the status of SELinux (Security-Enhanced Linux), showing whether SELinux is enabled or disabled and its current mode (Enforcing, Permissive, or Disabled).
The sudo command allows a permitted user to execute a command as the superuser or another user, as defined in the /etc/sudoers file. It is typically used to perform administrative tasks without logging in as the root user.