MuntyScruntfundle
Posts: 223
Joined: Fri Oct 27, 2017 11:14 pm

cd ~

Sat Sep 08, 2018 10:56 am

I'm following some install instructions which ask for a "cd ~".

Reading up in Debian this means move to the users home directory. (Unless I'm misreading)

But it doesn't. So, where does this command put you on the disk?

Thanks.

User avatar
bensimmo
Posts: 4187
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: cd ~

Sat Sep 08, 2018 11:07 am

Where has it put you?

For me as user pi
It goes to /home/pi which is just shown as ~

DirkS
Posts: 10015
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: cd ~

Sat Sep 08, 2018 11:08 am

It does with Raspbian using bash What happens when you use it?

LTolledo
Posts: 2141
Joined: Sat Mar 17, 2018 7:29 am
Location: Anime Heartland

Re: cd ~

Sat Sep 08, 2018 11:09 am

yup me tried command .... went home...
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

User avatar
bensimmo
Posts: 4187
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: cd ~

Sat Sep 08, 2018 11:10 am

Use just
pwd

To get your current path.

k-pi
Posts: 930
Joined: Sun Feb 12, 2017 1:46 pm
Location: Upper Hale, Surrey, UK.

Re: cd ~

Sat Sep 08, 2018 11:11 am

The tilde (~) is a short cut for your /home directory, but you can just use cd on its own too.

That pwd = present working directory - useful if you've forgotten where you are, especially if not using a GUI environment.

n67
Posts: 938
Joined: Mon Oct 30, 2017 4:55 pm

Re: cd ~

Sat Sep 08, 2018 11:49 am

k-pi wrote:
Sat Sep 08, 2018 11:11 am
That pwd = present working directory -
Actually, the 'p' stands for 'print'.
"L'enfer, c'est les autres"

G fytc hsqr rum umpbq rm qyw rm rfc kmbq md rfgq dmpsk:

Epmu Sn!

J lnacjrw njbruh-carppnanm vxm rb mnuncrwp vh yxbcb!

Return to “General discussion”