- Check whether Screen is installed
which screen
- If Screen is not installed on your system, run the following command:
- If your system uses yum, you can install Screen with the command below
yum install screen
- If your system uses apt, you can install Screen with the command below
apt install screen
- If your system uses yum, you can install Screen with the command below
- To run a Screen session, enter the screen command.
screen
- If your session disconnects for some reason, log back in to your server and run the screen -r command.
screen -r
This will reconnect you to your Screen session.
Move files in the Linux terminal
The mv command moves file(s) from one location to another.
To move a file from one directory to another with mv, remember the syntax below
mv <source> <destination>
For example,
mv example.zip /home
Check whether, it moves example.zip
ls /home
Rename the file as you move it
mv example.zip /home/newexample.zip
Rename a file without moving it to another location
mv example.zip renameexample.zip
Moving a directory
mv exampledir /home
Moving a file safely
mv --interactive example.zip /home
This will ask
mv: overwrite '/home/example.zip'?
If you do not want to manually intervene, use –no-clobber or -n instead.
mv --no-clobber example.zip /home
How to disable functions using the PHP disable_functions directive in php ini
- PHP disable_functions Executable Handling
The disable_function is used to stop certain dangerous PHP functions from executing.
Example of disable_function.
disable_functions = "exec, system"
Use the disable_functions directive in php.ini file to disable specific functions.
At least disable exec(), shell_exec() and system(). (If using WordPress).
disable_functions = "exec, passthru, shell_exec, system, proc_open, popen, curl_exec, curl_multi_exec, parse_ini_file, show_source"
How to Install Zip/Unzip
How to Install Zip/Unzip in Debian/Ubuntu/Mint
apt install zip apt install unzip
How to Install Zip/Unzip in RedHa/CentOS/Fedora
dnf install zip dnf install unzip
How to Install Zip/Unzip in Arch/Manjaro Linux
pacman -S zip pacman -S unzip
How to Install Zip/Unzip in OpenSUSE
zypper install zip zypper install unzip
How to change Time Zone in Debian 11 / Debian 10
- Changing Time Zone in Debian 11 / Debian 10
We can do the change timezone in two ways,
- Using /etc/localtime file
- Using timedatectl command
1. Using /etc/localtime File
Check current timezone
date
The /etc/localtime is a link to the original timezone file. Check the symbolic link using the following command.
ls -al /etc/localtime
Output
lrwxrwxrwx 1 root root 32 Oct 8 13:58 /etc/localtime -> ../usr/share/zoneinfo/Asia/Dhaka
The /usr/share/zoneinfo/ directory contains all the timezones.
You can check your zone info. For example, America, Chicago, Los_Angeles, Dhaka etc
ls /usr/share/zoneinfo/America/
Now, create a link with the desired timezone file. America/Chicago
ln -sf /usr/share/zoneinfo/America/Chicago /etc/localtime
Verify the timezone using the date command.
date
That’s All.
2. Using timedatectl command
Check current timezone
date
Use the following command to list all time zones.
timedatectl list-timezones
You can filter the output with the city nearer to you.
timedatectl list-timezones | grep -i Los_Angeles
Set the timezone using the following command.
timedatectl set-timezone America/Los_Angeles
Verify the timezone using the date command.
date
That’s All.