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?

Oli
  • 293,335
Adi Yono
  • 174
  • 2
  • 3
  • 11

2 Answers2

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.
Oli
  • 293,335
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

krt
  • 1,956
  • 15
  • 12
jerry
  • 94