the_terminal.md 949 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# First steps in the terminal

Starting the terminal presents itself with a line where you can enter a command
```bash
cesar@myComputer>
```

Often written, for covenience, as
```bash
$
```

When you open your terminal (shell), you are located
in your home directory (unless otherwise configured), denoted as `~/`.

<br>

**Is `git` properly installed?**

```bash
$ git --version
# git version 2.10.0
```



# Essential Linux commands

List the contents of a directory
```bash
Laurent Heirendt's avatar
Laurent Heirendt committed
31
32
33
34
35
36
$ ls
```

You can list more details with:
```bash
$ ls -lah
37
38
39
40
41
42
43
```

Create a directory
```bash
$ mkdir myNewDirectory
```

Laurent Heirendt's avatar
Laurent Heirendt committed
44
45


46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
Change the directory to a specific folder
```bash
$ cd myNewDirectory
```

Change the directory 1 level and 2 levels up
```bash
$ cd ..
# 1 level up

$ cd ../..
# 2 levels up
```

Move a file or a directory
```bash
$ mv myFile.m myNewDirectory/.
```


Rename a file or a directory
```bash
$ mv myFile.m myNewFile.m
$ mv myNewDirectory myDirectory
```