WordPress knowledge sharing

The difference between the command line operation of the Xshell client and SSH web side and the absolute path of the relative path of the website

Group friends @ ask questions Xshell Client Why is there no such file and directory when you enter the command? You can enter the correct directory by entering the same command on the AliCloud website? After studying Weiaisi's blog, I think it is worth mentioning that it contains the understanding of basic knowledge. Laowei shares this article to help us deepen our understanding of the basic knowledge of website paths.

1、 Problem description

Use the Xshell client to enter commands:

cd oneinstack

Prompt - bash No such file or directory

There is no such file or directory.

Let's take a look at Alibaba Cloud Web side SSH Operate the same command, as shown in the figure below, and enter the oneinstack directory successfully.

Instead, use the Xshell client to enter cd/home/admin/oneinstack/to enter the directory correctly.

2、 Why is this?

This involves the basic knowledge of the website Relative path and Absolute path These two concepts. A brief explanation is as follows:

1. The absolute path refers to the real physical path of the file in the hard disk, such as/home/admin/oneinstack above. You can see this path when you connect to the server using ftp software;

2. A relative path is a path relative to a file. For example, if a 1.jpg image is added to the 1.html page of a website, and the two files are placed in the same folder, the 1.jpg code in the 1.html page code is written as follows:<img src ="1. jpg"/>, the picture can be displayed normally.

Please move to related content Website directory/absolute path/relative path - zero infrastructure wordpress tutorial Before you start a website, you should thoroughly understand these two concepts. Otherwise, if you encounter similar problems later, you will still be confused, which will affect the work of the website.

Like( zero )
Article name: The Difference between Xshell Client and SSH Web Page Command Line Operations and the Absolute Path of the Relative Path of the Web Site
Article link: https://www.vpsss.net/17712.html
Copyright notice: The resources of this website are only for personal learning and exchange, and are not allowed to be reproduced and used for commercial purposes, otherwise, legal issues will be borne by yourself.
The copyright of the pictures belongs to their respective creators, and the picture watermark is for the purpose of preventing unscrupulous people from stealing the fruits of labor.