fotutax.blogg.se

How to cd into a directory with spaces
How to cd into a directory with spaces




In this example, /home/gaurav/snap/htop/1332 is the current working directory path. : This command allows you to change your current working directory to the parent directory one level above your present directory.Įxample: :~/snap/htop/1332$ pwd Now, we are back to the home directory ‘/home/gaurav’. I am currently in the directory named apache.

  • cd ~ : This command takes you back to the home directory from whichever directory you might be working into.Įxample: :~/space/apache$ pwd.
  • On using the pwd (print working directory) command the ‘ / ‘ (root) directory is displayed. Here, we have changed the current working directory from ‘workspace’ to root directory. We will be learning about this in the upcoming examples.Ĭd / : This command will change your current directory to the root directory.Įxample: :~/workspace$ cd / You can use the complete path of the desired directory with the cd command. Note: Please note that this workspace directory should be placed in your present working directory. Here, we have simply changed the current directory to a directory named ‘workspace’.
  • cd: You can change your directory directly by enetring the name of the destination directory.
  • OptionĬhanges the present directory to the root directoryĬhanges the directory to the home directoryĬhange to the parent directory of the current directory The following table will give you a brief insight into what happens when you use these options with the cd command.

    how to cd into a directory with spaces how to cd into a directory with spaces

    Let us look at the basic syntax of the cd command. Knowing more about the cd commandĬd command is a useful utility for all the frequent command-line users and also who are required to manage GUI-less servers. In this brief tutorial, you will get all the basic and useful insights into the cd command-line utility. Just put the right path in the command and you will be placed in that directory by cd. cd stands for ‘change directory’ which itself explains its use and purpose.Ĭd allows you to easily change your current directory to whichever directory you wish to move. Some commands in Linux are so frequently used that we often overlook the significance of the commands and the details about them get missed. An easy way to change directories in Linux from the terminal






    How to cd into a directory with spaces