How Do I Move a Previous Directory in Linux?

How Do I Move a Previous Directory in Linux?
Contents

How do I move a directory back in Linux?

To move a file or directory from one location to another, use the command mv. Common useful options for mv include: -i (interactive) — Prompts you if the file you have selected overwrites an existing file in the destination directory. -f (force) — Overrides the interactive mode and moves without prompting.

How do I go back one directory in terminal?

The .. means “the parent directory” of your current directory, so you can use cd .. to go back (or up) one directory. cd ~ (the tilde). The ~ means the home directory, so this command will always change back to your home directory (the default directory in which the Terminal opens).

James H. Sterling
Author

James H. Sterling

James Sterling reports on renewable energy developments, climate policy, ecological conservation, and green tech innovations around the globe.