Home>Article>Backend Development> How to view the php installation directory in Linux?

How to view the php installation directory in Linux?

coldplay.xixi
coldplay.xixi Original
2020-07-21 17:01:45 11381browse

Linux method to view the PHP installation directory: 1. If the Linux PHP installation directory does not set a custom installation, the default installation path is generally in [/var/www]; 2. Use Linux To search using the command, the code is [find / -name "*www*"].

How to view the php installation directory in Linux?

How to view the PHP installation directory in Linux:

The PHP installation directory in Linux does not have a custom installation. Under normal circumstances, the default installation path is generally in/var/www. If it is a customized installation, you can only recall where it is often installed and search slowly. You can also use Linux commands to search. Search command: find / -name "*www*".

How to view the php installation directory in Linux?

Extended information

Linux common commands

1. cd /home to enter the '/home' directory' .

2. cd .. Return to the previous directory.

3. cd ../.. Return to the directory two levels above.

4. cd to enter your personal home directory.

5. cd ~user1 to enter your personal home directory.

6. cd - Return to the last directory.

7. pwd displays the working path.

8. ls to view the files in the directory.

9. ls -F View the files in the directory.

10. ls -l displays detailed information of files and directories.

11. ls -a displays hidden files.

12. ls *[0-9]* displays file names and directory names containing numbers.

13. tree displays the tree structure of files and directories starting from the root directory.

14. rm -f file1 deletes a file called 'file1'.

15. rmdir dir1 deletes a directory called 'dir1'.

16. rm -rf dir1 deletes a directory called 'dir1' and deletes its contents at the same time.

17. rm -rf dir1 dir2 Delete two directories and their contents at the same time.

18. mv dir1 new_dir renames/moves a directory.

cp file1 file2 Copy a file.

Related learning recommendations:PHP programming from entry to proficiency

The above is the detailed content of How to view the php installation directory in Linux?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn