Linux Commands

Linux Commands

April 15, 2022
Linux Commands

ls (lists directory)

The ls command is one of the more basic commands in Linux. It is designed to list the names and features of files and directories.

ls -l
ls -l -a
ls -lart

pwd (Print Working Directory)



cd /var/test/statelyworld

create directories

mkdir folder_name

create, change and modify timestamps of a file

touch file_name

cat command: It is used to create the file with content.
touch command: It is used to create a file without any content. The file created using touch command is empty. This command can be used when the user doesn’t have data to store at the time of file creation

copy and move

cp ./DirectoryA_1/README.txt ./DirectoryA_2
mv file.txt folder_to_move

sudo (Super User DO)

sudo rm -r *	
sudo rm -r .git (tab)
sudo crontab -l 
sudo crontab -e 
sudo su -

history command is used to view the previously executed command

history 5 


The df command displays information about file system disk space usage on the mounted file system

df (Shows the amount of disk space in use)
df -h 
df /node_or_dirname (Shows detailed information about the file system node or dir name)

The less command is a Linux terminal pager that shows a file’s contents one screen at a time.


list the files and folders in the current directory

yum install nginx
systemctl status nginx
systemctl start nginx

Linux chmod command

In Unix-like operating systems, the chmod the command sets the permissions of files or directories.

chmod 400 YOUR_FILE

Chmod Calculator

Try running the “chown” command to change the ownership of the repository to the user who is trying to access it. For example, you can run the command

sudo chown -R username:groupname /path/to/repository

to change the ownership of the repository.



  • Websites are unavailable:

    503 Service Temporarily Unavailable


File permissions and/or ownership are incorrect.

  1. Log in to the Plesk server via SSH
  2. Fix ownership and permissions:
chown -R root:psaserv /var/www/vhosts/system/
chmod -R 711 /var/www/vhosts/system/

Go to Domains > > PHP Settings and change the PHP version to a different one and then back to the one that is needed to re-generate and re-validate the configuration files.

Leave A Comment