# Unix/OS geeks... how do you do a CD in the terminal?

**URL:** <https://forums.speedlife.net/t/unix-os-geeks-how-do-you-do-a-cd-in-the-terminal/61453>\
**Category:** NYSpeed Off Topic\
**Created:** [January 16, 2009, 11:46am UTC](https://forums.speedlife.net/t/unix-os-geeks-how-do-you-do-a-cd-in-the-terminal/61453 "2009-01-16T11:46:51Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dr.Stevil](https://avatars.discourse-cdn.com/v4/letter/d/da6949/32.png) [@Dr.Stevil](https://forums.speedlife.net/u/Dr.Stevil)\
**Post date:** [January 16, 2009, 11:46am UTC](https://forums.speedlife.net/t/unix-os-geeks-how-do-you-do-a-cd-in-the-terminal/61453/1 "2009-01-16T11:46:51Z")

</div>

I’m using mobile terminal on my phone to try and unzip a file. I know the location of the folder, but can’t figure out how to navigate to it. :banghead:

> localhost:~ mobile$ (tried the following) dir (which lists the sub folders… one of which is where said file is located)  
> Tried the following
> 
> cd /libray  
> cd library  
> cd library/

each tell me “no such directory or filename”, but when I run a DIR it lists the folder

wtf? I miss DOS

---

<div class="post-metadata">

**Author:** ![boardjnky4](https://avatars.discourse-cdn.com/v4/letter/b/96bed5/32.png) [@boardjnky4](https://forums.speedlife.net/u/boardjnky4)\
**Post date:** [January 16, 2009, 11:48am UTC](https://forums.speedlife.net/t/unix-os-geeks-how-do-you-do-a-cd-in-the-terminal/61453/2 "2009-01-16T11:48:32Z")

</div>

that is correct

also, try ls to list contents and pwd for present working directory

edit: example time

tm93@DHTSH-L3WBNVE:~/Documents$ cd  
tm93@DHTSH-L3WBNVE:~$ cd Music/  
tm93@DHTSH-L3WBNVE:~/Music$ ls  
tm93@DHTSH-L3WBNVE:~/Music$ ls -al  
total 16  
drwxr-xr-x 2 tm93 tm93 4096 2008-06-11 15:41 .  
drwxr-xr-x 104 tm93 tm93 12288 2009-01-16 11:01 …  
tm93@DHTSH-L3WBNVE:~/Music$ pwd  
/home/tm93/Music  
tm93@DHTSH-L3WBNVE:~/Music$

---

<div class="post-metadata">

**Author:** ![Dr.Stevil](https://avatars.discourse-cdn.com/v4/letter/d/da6949/32.png) [@Dr.Stevil](https://forums.speedlife.net/u/Dr.Stevil)\
**Post date:** [January 16, 2009, 11:49am UTC](https://forums.speedlife.net/t/unix-os-geeks-how-do-you-do-a-cd-in-the-terminal/61453/3 "2009-01-16T11:49:48Z")

</div>

what syntax do I use it in?

thanks man 🍺

---

<div class="post-metadata">

**Author:** ![LZ1](https://avatars.discourse-cdn.com/v4/letter/l/7ab992/32.png) [@LZ1](https://forums.speedlife.net/u/LZ1)\
**Post date:** [January 16, 2009, 11:54am UTC](https://forums.speedlife.net/t/unix-os-geeks-how-do-you-do-a-cd-in-the-terminal/61453/4 "2009-01-16T11:54:45Z")

</div>

:lol:

---

<div class="post-metadata">

**Author:** ![Dr.Stevil](https://avatars.discourse-cdn.com/v4/letter/d/da6949/32.png) [@Dr.Stevil](https://forums.speedlife.net/u/Dr.Stevil)\
**Post date:** [January 16, 2009, 12:02pm UTC](https://forums.speedlife.net/t/unix-os-geeks-how-do-you-do-a-cd-in-the-terminal/61453/5 "2009-01-16T12:02:31Z")

</div>

ok, tried that and didn’t get anywhere. here is a snapshot

![http://nyspeed.com/forums/attachment.php?attachmentid=7582&stc=1&d=1232136133](http://nyspeed.com/forums/attachment.php?attachmentid=7582&stc=1&d=1232136133)

God I hate this filesystem/interface 😛

edit: trying to navigate to var/mobile (current)/library/downloads/

---

<div class="post-metadata">

**Author:** ![LZ1](https://avatars.discourse-cdn.com/v4/letter/l/7ab992/32.png) [@LZ1](https://forums.speedlife.net/u/LZ1)\
**Post date:** [January 16, 2009, 12:03pm UTC](https://forums.speedlife.net/t/unix-os-geeks-how-do-you-do-a-cd-in-the-terminal/61453/6 "2009-01-16T12:03:41Z")

</div>

Capital L

Unix is case sensitive

---

<div class="post-metadata">

**Author:** ![Dr.Stevil](https://avatars.discourse-cdn.com/v4/letter/d/da6949/32.png) [@Dr.Stevil](https://forums.speedlife.net/u/Dr.Stevil)\
**Post date:** [January 16, 2009, 12:05pm UTC](https://forums.speedlife.net/t/unix-os-geeks-how-do-you-do-a-cd-in-the-terminal/61453/7 "2009-01-16T12:05:42Z")

</div>

awesome, thanks LZ… I wasn’t aware of that

works like a charm 🍺

thanks again guys

---

<div class="post-metadata">

**Author:** ![boardjnky4](https://avatars.discourse-cdn.com/v4/letter/b/96bed5/32.png) [@boardjnky4](https://forums.speedlife.net/u/boardjnky4)\
**Post date:** [January 16, 2009, 12:26pm UTC](https://forums.speedlife.net/t/unix-os-geeks-how-do-you-do-a-cd-in-the-terminal/61453/8 "2009-01-16T12:26:17Z")

</div>

if you looked at my example, you would know it is case sensitive

edit:

Also, `cd /Library` is going to take you to the root of the filesystem, then into Library. `cd Library` will take you to the Library folder that exists within the directory you are currently in.

cd / - Takes you to the root of the filesystem  
cd /Library - Takes you to the root, then into Library  
cd Library - Takes you into the Library folder located within your current folder

understand?

---

<div class="post-metadata">

**Author:** ![Dr.Stevil](https://avatars.discourse-cdn.com/v4/letter/d/da6949/32.png) [@Dr.Stevil](https://forums.speedlife.net/u/Dr.Stevil)\
**Post date:** [January 16, 2009, 12:28pm UTC](https://forums.speedlife.net/t/unix-os-geeks-how-do-you-do-a-cd-in-the-terminal/61453/9 "2009-01-16T12:28:04Z")

</div>

didn’t even cross my mind, honestly… after using DOS systems for so long, it becomes second nature ignoring upper/lowercase 😃

it makes perfect sense now though lol

---

<div class="post-metadata">

**Author:** ![LZ1](https://avatars.discourse-cdn.com/v4/letter/l/7ab992/32.png) [@LZ1](https://forums.speedlife.net/u/LZ1)\
**Post date:** [January 16, 2009, 12:30pm UTC](https://forums.speedlife.net/t/unix-os-geeks-how-do-you-do-a-cd-in-the-terminal/61453/10 "2009-01-16T12:30:01Z")

</div>

And putting a / before the folder name is a completely different path

---

<div class="post-metadata">

**Author:** ![boardjnky4](https://avatars.discourse-cdn.com/v4/letter/b/96bed5/32.png) [@boardjnky4](https://forums.speedlife.net/u/boardjnky4)\
**Post date:** [January 16, 2009, 12:31pm UTC](https://forums.speedlife.net/t/unix-os-geeks-how-do-you-do-a-cd-in-the-terminal/61453/11 "2009-01-16T12:31:41Z")

</div>

> [@LZ](#):
>
> And putting a / before the folder name is a completely different path

werd, Dr. Stevil, check out my edit. Post here if you have any other questions

---

<div class="post-metadata">

**Author:** ![Dr.Stevil](https://avatars.discourse-cdn.com/v4/letter/d/da6949/32.png) [@Dr.Stevil](https://forums.speedlife.net/u/Dr.Stevil)\
**Post date:** [January 16, 2009, 12:32pm UTC](https://forums.speedlife.net/t/unix-os-geeks-how-do-you-do-a-cd-in-the-terminal/61453/12 "2009-01-16T12:32:11Z")

</div>

really? heh… no shit. So you’d be directing it to jump to a completely different folder off of root (folder? or whatever you call it in unix) opposed to a sub folder?

edit: read your example, thanks for the heads up on that.

so other than a few minor rules, it seems pretty similar to DOS… are most of the commands the same? would you use “CD…” to go up a folder?

---

<div class="post-metadata">

**Author:** ![boardjnky4](https://avatars.discourse-cdn.com/v4/letter/b/96bed5/32.png) [@boardjnky4](https://forums.speedlife.net/u/boardjnky4)\
**Post date:** [January 16, 2009, 12:33pm UTC](https://forums.speedlife.net/t/unix-os-geeks-how-do-you-do-a-cd-in-the-terminal/61453/13 "2009-01-16T12:33:58Z")

</div>

yes

going to / or “the root”, is sort of like going to “C:”

---

<div class="post-metadata">

**Author:** ![Dr.Stevil](https://avatars.discourse-cdn.com/v4/letter/d/da6949/32.png) [@Dr.Stevil](https://forums.speedlife.net/u/Dr.Stevil)\
**Post date:** [January 16, 2009, 12:37pm UTC](https://forums.speedlife.net/t/unix-os-geeks-how-do-you-do-a-cd-in-the-terminal/61453/14 "2009-01-16T12:37:06Z")

</div>

> [@boardjnky4](#):
>
> yes
> 
> going to / or “the root”, is sort of like going to "C:"

awesome :tup: now I got a dumb question for you… how do you know which folder belongs to which partition?

The iphone has 2 partitions… one for important filesystem stuff, and another for the mobile device (installed apps/music/other crap), but I know it’s listed as a folder, not as, for example d:\ on a DOS system

---

<div class="post-metadata">

**Author:** ![boardjnky4](https://avatars.discourse-cdn.com/v4/letter/b/96bed5/32.png) [@boardjnky4](https://forums.speedlife.net/u/boardjnky4)\
**Post date:** [January 16, 2009, 12:38pm UTC](https://forums.speedlife.net/t/unix-os-geeks-how-do-you-do-a-cd-in-the-terminal/61453/15 "2009-01-16T12:38:34Z")

</div>

> [@Dr.Stevil](#):
>
> awesome :tup: now I got a dumb question for you… how do you know which folder belongs to which partition?
> 
> The iphone has 2 partitions… one for important filesystem stuff, and another for the mobile device (installed apps/music/other crap), but I know it’s listed as a folder, not as, for example d:\ on a DOS system

df would work, I think.

It shows you what the different mount points are and what folders are mounted there. Drives are not identified by letters on a unix box though.

yep, check it out:

boardjnky4$ df  
Filesystem 512-blocks Used Available Capacity Mounted on  
/dev/disk0s1 312581744 297782784 14286960 96% /  
devfs 206 206 0 100% /dev  
fdesc 2 2 0 100% /dev  
map -hosts 0 0 0 100% /net  
map auto\_home 0 0 0 100% /home

That box is all 1 partition, the entire filesystem is on disk0s1. If I were to put /home on its own partition, it would have another line with /home probably with something like disk0s2 or disk1s1.

---

<div class="post-metadata">

**Author:** ![Dr.Stevil](https://avatars.discourse-cdn.com/v4/letter/d/da6949/32.png) [@Dr.Stevil](https://forums.speedlife.net/u/Dr.Stevil)\
**Post date:** [January 16, 2009, 12:45pm UTC](https://forums.speedlife.net/t/unix-os-geeks-how-do-you-do-a-cd-in-the-terminal/61453/16 "2009-01-16T12:45:49Z")

</div>

works perfect :tup: thanks man
