Syed Ashik Mahmud - Pro System Admin and Malware Cleaner

Category: Linux General Knowledge

How To Find and Edit php.ini File Using SSH

This is very simple way to find php.ini file to make changes. You need to have access to these files, and SSH login.

Step 1: To quickly find the file type:

php -i | grep 'Configuration File'

It will show you the location of the file. For most VPS servers, the file is located is /usr/local/lib.

Step 2: Enter the following command to change the directory:

cd /usr/local/lib

Step 3: You can use ls command to confirm the location. This command will display list of all the files and directories in the current location.

ls

Step 4: To edit the file:

pico php.ini

That’s all!

Know Linux Name and Version

The procedure to find os name and version on Linux:

  1. Open the terminal application (bash shell)
  2. For remote server login using the ssh: ssh user@server-name
  3. Type any one of the following command to find os name and version in Linux:
    $cat /etc/os-release
    $lsb_release -a
    $hostnamectl
  4. Type the following command to find Linux kernel version:
    $uname -r

/etc/issue file

Use more command/less command as follows:
$ cat /etc/issue
$ more /etc/issue
$ less /etc/issue

Getting help

You can also view the manual page on uname using the following command:
$ man hostnamectl
$ man uname
$ man cat

© 2024 Coders Tent

Theme by Anders NorenUp ↑