Useful Commands on Linux

Created on: 12 May 23 20:56 +0700 by Son Nguyen Hoang in English

List of commands that may save you one day

Move back to Linux again. Here are some commands to save your days! The list will be continously updated!

1. Find What process is running on the port

fuser 8080/tcp Use fuser -k 8080/tcp to kill the process

2. Set Linux time to local

timedatectl set-local-rtc 1 ==adjust-system-clock

3. Set and check $PATH

To set value to PATH export VALUE_NAME=\path\to\executable

To review the value:

echo $VALUE_NAME

Remember to run source .bashrc to reload the .bashrc file.

If you want to set the variable to be persistent. Add the line export VALUE_NAME=\path\to\executable to end of .profile file. Then log out the session then log in back. The variable should be persistent now.

4. Checking status of all port

sudo ss -ltn

ln -s /etc/nginx/sites-available/example.conf /etc/nginx/sites-enabled/

6. Check Ram Usage
top
Back To Top