1

I have read many Questions and Answers here. In some of them there are directories that I cannot find on my computer, for example:

/home/username/.local/
~/.local/share/Steam

What is ~, what is folder start with ., and how I can access these folders?

2 Answers 2

8

~ is a special shell replacement. It's replaced with your home directory (typically /home/$USER but not neccessarily). It's a shortcut we use because it's nice and short and it's impossible to know everybody's $HOME.

Files and directories prepended with a dot are hidden. In Windows it's a boolean setting on files, in Unix it's based on the filename. You can still access them though:

  • In Ubuntu's default file browser you can:
    • Toggle the display of hidden files
    • Use the address bar to manually go to the path (Control + L to toggle raw address mode).
    • Use a run dialogue (Alt+F2) to run nautilus <full path>
  • In a terminal you can cd directly to the path.
0

~ is for accessing your home directory , if you type cd ~ you will reach your home directory.

For example you want to go to Music directory from any directory just type:

cd ~/Music

If a directory name starts with dot . it means that is hidden however you can access it from cd .foldername, also there are other uses of dot like:

1) cd . u remain in the same folder where you are before entering this command

2) cd .. go to previous folder from the current folder NOTE : Folder and Directory are used interchangeably

1
  • 2
    Actually cd .. takes you to the parent directory, for previous directory use: cd -
    – JBarberU
    Jul 3, 2015 at 14:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .