Skip to content

Commit b43c290

Browse files
committed
changing references of root to home in command line tutorial
1 parent af340d5 commit b43c290

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

command-line/introduction/tutorial.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ To access the command line, we use a terminal emulator, usually called a termina
1313

1414
## Example 1: navigating around in the terminal
1515

16-
Once you opened up your terminal, type in the following after the $ or > sign and hit enter: ($ or > is the prompt, you don't have to retype that in the terminal, only the characters that come after them):
16+
Once you opened up your terminal, type in the following after the `$` or `>` sign and hit enter: (`$` or `>` is the prompt, you don't have to retype that in the terminal, only the characters that come after them):
1717

1818
```bash
1919
$ pwd
@@ -23,7 +23,7 @@ $ pwd
2323
2424
### `pwd` or print working directory
2525

26-
The `pwd` command prints out the current directory you are in. What are directories? Directories are folders, these terms are used interchangeably. If you just opened up your terminal, you are probably in the root directory of your computer, and should get an output similar to this:
26+
The `pwd` command prints out the current directory you are in. What are directories? Directories are folders, these terms are used interchangeably. If you just opened up your terminal, you are probably in the home directory of your computer, and should get an output similar to this:
2727

2828
```bash
2929
/Users/your-username
@@ -39,7 +39,7 @@ In your terminal type:
3939
$ ls
4040
```
4141

42-
and hit enter. Most likely this command returned you a bunch of files and directories (folders). The `ls` command prints out the contents of a directory. If you are in the root directory of your computer you should see directories printed out such as Documents, Applications, etc. Now the question is, how do I move between directories?
42+
and hit enter. Most likely this command returned you a bunch of files and directories (folders). The `ls` command prints out the contents of a directory. If you are in the home directory of your computer you should see directories printed out such as Documents, Applications, etc. Now the question is, how do I move between directories?
4343

4444
### `cd` or change directory
4545

@@ -63,7 +63,7 @@ Now type:
6363
$ pwd
6464
```
6565

66-
This should return you name of the directory you just `cd` into.
66+
This should return you the name of the directory you just `cd` into.
6767

6868
Type `ls` into the terminal, choose another directory and `cd` into it. We have just changed into a new directory. You can use these two commands to navigate around the directory structure of your computer. This is all good so far but sometimes you might want to go deeper than one level in one command. `cd` allows you to do this by chaining the directories with a `/`, so `cd your-directory` becomes `cd your-directory/directory-inside-your-directory`.
6969

@@ -73,25 +73,25 @@ We now know how to move forward but how to go back up the directory tree? In you
7373
$ cd ..
7474
```
7575

76-
Now do a `pwd`. You just went back one directory! Chaining works backward too, so if you type `cd ../..` you should be taken back two directories.
76+
Now do a `pwd`. You just went back one directory! Chaining works backwards too, so if you type `cd ../..` you should be taken back two directories.
7777

78-
> If you want to go back to the root directory of your computer, simply type `cd` into the terminal. `cd` without an argument takes you back to the root directory regardless of where you are currently in the directory structure
78+
> If you want to go back to the home directory of your computer, simply type `cd` into the terminal. `cd` without an argument takes you back to the home directory regardless of where you are currently in the directory structure
7979
80-
### Exercise 1: use `ls` and `cd` to move in and out of a few directories on your machine
80+
### Exercise 1: use `ls` and `cd` to move in and out of a few directories on your computer
8181

82-
Those are the basics of navigating around in the terminal. What else would we want to do in there? How about creating directories and files?
82+
These are the basics of navigating around in the terminal. What else would we want to do in there? How about creating directories and files?
8383

8484
## Example 2: creating directories and files
8585

8686
### `mkdir` or make directory
8787

88-
Go back to the root directory of your computer, and type:
88+
Go back to the home directory of your computer, and type:
8989

9090
```bash
9191
$ mkdir temp
9292
```
9393

94-
into the terminal. Now use `ls` to see the contents of the root directory. You should see a new folder, temp there. You just created a new folder! As it's name suggests, mkdir creates directories. What if we wanted to create a directory inside a directory? `cd` into temp and type:
94+
into the terminal. Now use `ls` to see the contents of the home directory. You should see a new folder, temp there. You just created a new folder! As it's name suggests, mkdir creates directories. What if we wanted to create a directory inside a directory? `cd` into temp and type:
9595

9696
```bash
9797
$ mkdir stuff/bits
@@ -111,7 +111,7 @@ Do an `ls` to check whether the file has been created. Inside bits, there should
111111

112112
### Exercise 2: `cd` back into temp and create a couple of new folders with files in them
113113

114-
### Bonus: type this into your terminal:
114+
### Bonus: if you are on a Mac, type this into your terminal:
115115

116116
```bash
117117
$ say hello

0 commit comments

Comments
 (0)