• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Source Digit

Source Digit

Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • How To
  • Ubuntu
  • Instagram
  • Blogging
  • Android
  • WordPress
  • +More
    • Cloud Computing
    • Gadgets
    • Social Media
    • Technology
  • Write for Us
Home / How To / How To Open A Directory In Linux Using Terminal

How To Open A Directory In Linux Using Terminal

By Sourabh / March 19, 2024 Category: How To, Ubuntu

How to open a file in a directory in Linux and how to open a directory in Linux using terminal. You can open directory from terminal Ubuntu.

The cd Command

The cd command is used to navigate through files and directories.

cd Command: The cd command allows you to change directories.

Note that when you open a terminal you will be in your home directory. The tilde (~) symbol stands for your home directory. If you are user, then the tilde (~) stands for /home/user

To navigate or move around the file system you will use various cd commands, such as:

  • Use “cd /” to navigate into the root directory.
  • Use “cd” or “cd ~” to navigate to your home directory.
  • Use “cd ..” to navigate up one directory level.
  • Use “cd -” to navigate to the previous directory or navigate to back.

If you want to navigate and go directly to a specific directory at once, you will have to specify the full directory path where you want to go to.

For example, if you want to navgate to applications folder in usr/share folder, run the command “cd /usr/share/applications” to go directly to the /applications subdirectory of /usr/share/.

Similarly, you can use “cd ~/Desktop” to go to the Desktop.

Using cd Command

  • The / symbol with the cd command helps you in directly opening the root folder.
  • The ‘..’ symbol with the cd command helps you in navigating up one directory level:
  • The ‘-’ symbol with the cd command takes you in back to the previous folder you were in.

You can use the pwd command to know in which directory you’re located. Note that pwd stands for “print working directory”.

The ls command shows the ‘list’ of the files in your current directory. The “ls ~” command will show you the files that are in your home directory.

Primary Sidebar

Latest Posts

Delete Directory And Contents Recursively Without Prompt On Linux

Check User Login History In Ubuntu Linux Command Line

Use Locate Command To Find File In Linux Terminal By Name

How To Change Terminal Color In Ubuntu Command Line

How To Run Fsck Manually In Linux To Fix Unexpected Inconsistency

How To Fix Broken Packages On Ubuntu From Terminal

Re Execute The Previous Command In Linux Ubuntu Command Line

How Much RAM Is Needed For Ubuntu PC

How To Find Large Files And Directories In Linux Command Line

How To Use Clear Command History In Linux Terminal

© 2026 Source Digit • Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • About
  • Privacy Policy
  • Terms & Conditions
  • Contact Us
  • Sitemap