On this page
- 1 Linux Commands
- 2 Linux Commands
- 2.1 ls (lists directory)
- 2.2 pwd (Print Working Directory)
- 2.3 cd
- 2.4 create directories
- 2.5 create, change and modify timestamps of a file
- 2.6 copy and move
- 2.7 sudo (Super User DO)
- 2.8 history command is used to view the previously executed command
- 2.9 Linux chmod command
- 2.10 Symptoms
- 2.11 Cause
- 2.12 Leave A Comment Cancel reply
Linux Commands
Linux Commands
On this page
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 ls -l ls -l -a ls -lart
pwd (Print Working Directory)
pwd
cd
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 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.
less FILE_NAME
list the files and folders in the current directory
dir
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.
users
https://mobaxterm.mobatek.net/
Symptoms
- Websites are unavailable:
503 Service Temporarily Unavailable
Cause
File permissions and/or ownership are incorrect.
- Log in to the Plesk server via SSH
- Fix ownership and permissions:
chown -R root:psaserv /var/www/vhosts/system/example.com chmod -R 711 /var/www/vhosts/system/example.com
Go to Domains > example.com > 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.