Graphical Linux commands: directing to a directory with a CD command

Source: Internet
Author: User
Keywords LINUX CD command directed to directory
Tags cd command computer computer hardware directed directed to directory directing directory entering

Maybe my friends remember that in the Dos era we used a lot of commands to get the job done. After entering the Windows age, because of the computer's ease of use greatly enhanced, users have gradually forgotten the command. Nevertheless, "command" still has an important place in the computer field. Friends may ask: "Computers have been using a graphical interface for so many years, what is the order today?" ”

Yes, the average user is getting away from the order. This is the original intention of inventing the graphical interface: simplifying the operation. But computer hardware and software, like any other product, will fail. So what happens when there is no access to the system after a failure? One way to do this is to start a simple system, such as Dos. Although Microsoft will release a major reregistering version this year: "Vision". But there are still a large number of users in the computer running on the planet that keep the Dos. Like me, I put it in the flash memory ready to save my Windows anytime. There are friends in the supermarket line checkout, the supermarket register is still using Dos, is not it? Does a lot of friends look at its interface and feel that the cash register is not a computer at all?

Today we introduce a Shell command with the same function as the name in Dos. It is a "CD" command that lets users jump from one directory to another. Its basic format is: cd < path name >. In the "Red 5.0" system, let us use the left mouse button click "Start"--> "-->" Attachment "-->" System terminal to open the terminal. Generally when we open the terminal, the default directory is the current user directory. Because I am now logged in using the root user, the terminal opens in the/root directory. If your friends are using another user login, the terminal will be located in the/home/< username > directory.

Let's see what's in my/root catalogue first.

If we want to enter the/ROOT/VCD directory there are two ways. One is: cd VCD

The second is: CD/ROOT/VCD

These two command effects are the same, but there must be a difference, right? The VCD in the CD VCD command is relative to the current path to executing the command. In this case, the/root directory. Note: There is no/symbol in front of the directory when using relative paths.

The CD/ROOT/VCD command uses an absolute path. Its path name starts with the root (/) directory, and the parent directory of the/root directory is the root (/) directory. Are there any more directories than the root (/) directory? The answer is absolutely no!

Although using absolute positioning can be directed to any location in the system (with the exception that some users may not have access to certain directories), is it too much trouble to enter a long string? Is it possible to save some circumstances? The answer is yes.

Now, let's start with the/ROOT/VCD catalogue. What's the easy way to get back to the/root directory from the/ROOT/VCD directory? You can try to enter this command: CD ... Do not lose the path name, where the path name is two consecutive English periods. And leave a half blank space between the CD commands. Then note the position in the diagram where the red line is circled.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.