Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
patjouk authored Nov 7, 2016
1 parent 088c9be commit 4fc7166
Showing 1 changed file with 30 additions and 28 deletions.
58 changes: 30 additions & 28 deletions en/intro_to_command_line/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@ The window, which is usually called the __command line__ or __command-line inter
To start some experiments we need to open our command-line interface first.


<!--sec data-title="Windows" data-id="intro_command_line_windows" data-collapse=true ces-->
<!--sec data-title="Windows" data-id="windows_prompt" data-collapse=true ces-->

Go to Start menu → All Programs → Accessories → Command Prompt.

<!--endsec-->


<!--sec data-title="OS X" data-id="intro_command_line_OSX" data-collapse=true ces-->
<!--sec data-title="OS X" data-id="OSX_prompt" data-collapse=true ces-->

Go to Applications → Utilities → Terminal.

<!--endsec-->

<!--sec data-title="Linux" data-id="intro_command_line_linux" data-collapse=true ces-->
<!--sec data-title="Linux" data-id="linux_prompt" data-collapse=true ces-->

It's probably under Applications → Accessories → Terminal, but that may depend on your system. If it's not there, just Google it. :)

Expand All @@ -42,7 +42,7 @@ It's probably under Applications → Accessories → Terminal, but that may depe

You now should see a white or black window that is waiting for your commands.

<!--sec data-title="OS X and Linux" data-id="intro_command_line_OSX_Linux" data-collapse=true ces-->
<!--sec data-title="OS X and Linux" data-id="OSX_Linux_prompt" data-collapse=true ces-->


If you're on Mac or Linux, you probably see `$`, just like this:
Expand All @@ -53,7 +53,7 @@ $
```
<!--endsec-->

<!--sec data-title="Windows" data-id="intro_command_line_windows" data-collapse=true ces-->
<!--sec data-title="Windows" data-id="windows-prompt2" data-collapse=true ces-->


On Windows, it's a `>` sign, like this:
Expand All @@ -76,7 +76,7 @@ In the tutorial, when we want you to type in a command, we will include the `$`

Let's start with something simple. Type this command:

<!--sec data-title="OS X and Linux" data-id="intro_command_line_OSX_Linux" data-collapse=true ces-->
<!--sec data-title="OS X and Linux" data-id="OSX_Linux_whoami" data-collapse=true ces-->

{% filename %}command-line{% endfilename %}
```
Expand All @@ -86,7 +86,7 @@ $ whoami
<!--endsec-->


<!--sec data-title="Windows" data-id="intro_command_line_windows" data-collapse=true ces-->
<!--sec data-title="Windows" data-id="windows_whoami" data-collapse=true ces-->

{% filename %}command-line{% endfilename %}
```
Expand Down Expand Up @@ -115,7 +115,7 @@ Each operating system has a slightly different set of commands for the command l

It'd be nice to know where are we now, right? Let's see. Type this command and hit `enter`:

<!--sec data-title="OS X and Linux" data-id="intro_command_line_OSX_Linux" data-collapse=true ces-->
<!--sec data-title="OS X and Linux" data-id="OSX_Linux_pwd" data-collapse=true ces-->


{% filename %}command-line{% endfilename %}
Expand All @@ -127,7 +127,7 @@ $ pwd
<!--endsec-->


<!--sec data-title="Windows" data-id="intro_command_line_windows" data-collapse=true ces-->
<!--sec data-title="Windows" data-id="windows_cd" data-collapse=true ces-->

{% filename %}command-line{% endfilename %}
```
Expand All @@ -146,7 +146,7 @@ You'll probably see something similar on your machine. Once you open the command

So what's in it? It'd be cool to find out. Let's see:

<!--sec data-title="OS X and Linux" data-id="intro_command_line_OSX_Linux" data-collapse=true ces-->
<!--sec data-title="OS X and Linux" data-id="OSX_Linux_ls" data-collapse=true ces-->

{% filename %}command-line{% endfilename %}
```
Expand All @@ -159,7 +159,7 @@ Music
```
<!--endsec-->

<!--sec data-title="Windows" data-id="intro_command_line_windows" data-collapse=true ces-->
<!--sec data-title="Windows" data-id="windows_dir" data-collapse=true ces-->


{% filename %}command-line{% endfilename %}
Expand All @@ -180,15 +180,15 @@ Music

Now, let's go to our Desktop directory:

<!--sec data-title="OS X and Linux" data-id="intro_command_line_OSX_Linux" data-collapse=true ces-->
<!--sec data-title="OS X and Linux" data-id="OSX_Linux_move_to" data-collapse=true ces-->

{% filename %}command-line{% endfilename %}
```
$ cd Desktop
```
<!--endsec-->

<!--sec data-title="Windows" data-id="intro_command_line_windows" data-collapse=true ces-->
<!--sec data-title="Windows" data-id="windows_move_to" data-collapse=true ces-->


{% filename %}command-line{% endfilename %}
Expand All @@ -199,7 +199,7 @@ $ cd Desktop

Check if it's really changed:

<!--sec data-title="OS X and Linux" data-id="intro_command_line_OSX_Linux" data-collapse=true ces-->
<!--sec data-title="OS X and Linux" data-id="OSX_Linux_pwd2" data-collapse=true ces-->

{% filename %}command-line{% endfilename %}
```
Expand All @@ -208,7 +208,7 @@ $ pwd
```
<!--endsec-->

<!--sec data-title="Windows" data-id="intro_command_line_windows" data-collapse=true ces-->
<!--sec data-title="Windows" data-id="windows_cd2" data-collapse=true ces-->

{% filename %}command-line{% endfilename %}
```
Expand All @@ -227,15 +227,15 @@ Here it is!

How about creating a practice directory on your desktop? You can do it this way:

<!--sec data-title="OS X and Linux" data-id="intro_command_line_OSX_Linux" data-collapse=true ces-->
<!--sec data-title="OS X and Linux" data-id="OSX_Linux_mkdir" data-collapse=true ces-->

{% filename %}command-line{% endfilename %}
```
$ mkdir practice
```
<!--endsec-->

<!--sec data-title="Windows" data-id="intro_command_line_windows" data-collapse=true ces-->
<!--sec data-title="Windows" data-id="windows_mkdir" data-collapse=true ces-->


{% filename %}command-line{% endfilename %}
Expand All @@ -256,7 +256,7 @@ A small challenge for you: in your newly created `practice` directory, create a

#### Solution:

<!--sec data-title="OS X and Linux" data-id="intro_command_line_OSX_Linux" data-collapse=true ces-->
<!--sec data-title="OS X and Linux" data-id="OSX_Linux_test_dir" data-collapse=true ces-->

{% filename %}command-line{% endfilename %}
```
Expand All @@ -267,7 +267,7 @@ test
```
<!--endsec-->

<!--sec data-title="Windows" data-id="intro_command_line_windows" data-collapse=true ces-->
<!--sec data-title="Windows" data-id="windows_test_dir" data-collapse=true ces-->


{% filename %}command-line{% endfilename %}
Expand All @@ -289,15 +289,15 @@ We don't want to leave a mess, so let's remove everything we did until that poin

First, we need to get back to Desktop:

<!--sec data-title="OS X and Linux" data-id="intro_command_line_OSX_Linux" data-collapse=true ces-->
<!--sec data-title="OS X and Linux" data-id="OSX_Linux_back" data-collapse=true ces-->

{% filename %}command-line{% endfilename %}
```
$ cd ..
```
<!--endsec-->

<!--sec data-title="Windows" data-id="intro_command_line_windows" data-collapse=true ces-->
<!--sec data-title="Windows" data-id="windows_back" data-collapse=true ces-->


{% filename %}command-line{% endfilename %}
Expand All @@ -310,7 +310,7 @@ Using `..` with the `cd` command will change your current directory to the paren

Check where you are:

<!--sec data-title="OS X and Linux" data-id="intro_command_line_OSX_Linux" data-collapse=true ces-->
<!--sec data-title="OS X and Linux" data-id="OSX_Linux_pwd3" data-collapse=true ces-->

{% filename %}command-line{% endfilename %}
```
Expand All @@ -319,7 +319,7 @@ $ pwd
```
<!--endsec-->

<!--sec data-title="Windows" data-id="intro_command_line_windows" data-collapse=true ces-->
<!--sec data-title="Windows" data-id="windows_cd3" data-collapse=true ces-->


{% filename %}command-line{% endfilename %}
Expand All @@ -333,15 +333,15 @@ Now time to delete the `practice` directory:

> __Attention__: Deleting files using `del`, `rmdir` or `rm` is irrecoverable, meaning _the deleted files will be gone forever_! So be very careful with this command.
<!--sec data-title="OS X and Linux" data-id="intro_command_line_OSX_Linux" data-collapse=true ces-->
<!--sec data-title="OS X and Linux" data-id="OSX_Linux_rm" data-collapse=true ces-->

{% filename %}command-line{% endfilename %}
```
$ rm -r practice
```
<!--endsec-->

<!--sec data-title="Windows" data-id="intro_command_line_windows" data-collapse=true ces-->
<!--sec data-title="Windows" data-id="windows_rmdir" data-collapse=true ces-->


{% filename %}command-line{% endfilename %}
Expand All @@ -353,15 +353,15 @@ practice, Are you sure <Y/N>? Y

Done! To be sure it's actually deleted, let's check it:

<!--sec data-title="OS X and Linux" data-id="intro_command_line_OSX_Linux" data-collapse=true ces-->
<!--sec data-title="OS X and Linux" data-id="OSX_Linux_ls2" data-collapse=true ces-->

{% filename %}command-line{% endfilename %}
```
$ ls
```
<!--endsec-->

<!--sec data-title="Windows" data-id="intro_command_line_windows" data-collapse=true ces-->
<!--sec data-title="Windows" data-id="windows_dir2" data-collapse=true ces-->


{% filename %}command-line{% endfilename %}
Expand All @@ -374,13 +374,15 @@ $ ls

That's it for now! You can safely close the command line now. Let's do it the hacker way, alright? :)

<!--sec data-title="OS X and Linux" data-id="OSX_Linux_exit" data-collapse=true ces-->

{% filename %}command-line{% endfilename %}
```
$ exit
```
<!--endsec-->

<!--sec data-title="Windows" data-id="intro_command_line_windows" data-collapse=true ces-->
<!--sec data-title="Windows" data-id="windows_exit" data-collapse=true ces-->


{% filename %}command-line{% endfilename %}
Expand Down

0 comments on commit 4fc7166

Please sign in to comment.