Skip to content

Instantly share code, notes, and snippets.

@syreal17
Created Feb 20, 2020
Embed
What would you like to do?
pico Primer for Competitors - Shell Chapter - Got Shell? Section
Q.3: What does `~` mean?
A.3: The shell is parked in Q0h313th's home directory which can be accessed by `~` on the computer called `pico-2019-shell1`
Note: the full path for `~` can be expanded to `/home/Q0h313th/`
@deondon
Copy link

deondon commented Dec 11, 2021

"~" is called a tilde in English.

@DonatienNtezy
Copy link

DonatienNtezy commented Feb 5, 2022

is "~" the same as directory path ?

@soldier0x00
Copy link

soldier0x00 commented Feb 13, 2022

@DonatienNtezy you can consider that as a shortcut to "home" directory. No matter which directory you are in, instead of traversing full path front and back, you can just give ~ to come directly to /home/Q0h313th/ as the author syreal17 mentioned.

@sj-on
Copy link

sj-on commented Mar 6, 2022

is "~" the same as directory path ?

no. it is only for home/ path. directory path will differ, based on how "in-depth" you are in the folder hierarchical structure.

@Abusaddik
Copy link

Abusaddik commented Mar 15, 2022

"~" mean is a directory Parth that can take you back to your home list or director Parth that have used/open

@CyberSuy
Copy link

CyberSuy commented Oct 21, 2022

So "~" is the equivalent to home directory. Therefore, cd ~ should bring you back to the /home/Q0h313th/ directories?

@MalcolmAnderson
Copy link

MalcolmAnderson commented Oct 21, 2022

Yes, the following 2 command produce the same result, bringing you to your home directory
cd
cd ~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment