1. pwd command

Use the pwd command to find out the path of the current working directory (folder) you’re in. The command will return an absolute (full) path, which is basically a path of all the directories that starts with a forward slash (/). An example of an absolute path is /home/username.

$ pwd

2. The 'ls' command is used to list files and directories

The contents of your current working directory, which is just a technical way of stating the directory that your terminal is presently in, will be listed if you run the "ls" command without any further options.

$ ls

3. Displaying private IP addresses

You can determine the IP address or addresses of your Linux system by using the hostnameifconfig, or ip commands. To display the IP addresses using the hostname command, use the -I option. In this example, the IP address is 192.168.0.4.

$ hostname -I

4. Linux users and switch user

 To check and remind the username

$ cut -d : -f 1 /etc/passwd   

Linux Users & switch user

5. Shutdown and restart Linux

For shutdown, restart and reboot Linux, you can use these codes.

$ sudo systemctl poweroff
$ sudo shutdown -r
$ sudo reboot

6. Linux config check

To check the CPU and memory in your Linux 

$ cat /proc/meminfo
$ cat /proc/cpuinfo

7. Allow ing a port transfer in the firewall on Linux

To add a specific port in the firewall you can use these lines. for example, here I added port 8080 in the firewall to accept transfer data from this port.

$ firewall-cmd --zone=public --add-port=8080/tcp //add permanent if you want to have it permanent

8. Start and stop the firewall in Linux

To Start  and Stop Firewall in Linux

$ systemctl stop firewalld.service
$ systemctl start firewalld.service

9. Update Repositories and Packages

Start by ensuring the software on the server is up to date.

Refresh the repository and package lists, and perform the necessary upgrades with the following command:

$ sudo apt update && sudo apt upgrade