Skip to content

Commit 1dc7d68

Browse files
authored
Merge pull request #667 from EwDa291/reST_to_markdown
reST to markdown
2 parents 7ec51e2 + d0915be commit 1dc7d68

File tree

2 files changed

+204
-231
lines changed

2 files changed

+204
-231
lines changed
Lines changed: 87 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,33 @@
1-
Getting Started
2-
===============
1+
# Getting Started
32

4-
Logging in
5-
----------
3+
## Logging in
64

75
To get started with the HPC-UGent infrastructure, you need to obtain a
8-
VSC account, see [HPC manual](../account.md).
9-
**Keep in mind that you must keep your private key to yourself!**
6+
VSC account, see [HPC manual](../account.md). **Keep in mind that you
7+
must keep your private key to yourself!**
108

119
You can look at your public/private key pair as a lock and a key: you
1210
give us the lock (your public key), we put it on the door, and then you
1311
can use your key to open the door and get access to the HPC
1412
infrastructure. **Anyone who has your key can use your VSC account!**
1513

16-
Details on connecting to the HPC infrastructure are available in
17-
[HPC manual connecting section](../connecting.md).
14+
Details on connecting to the HPC infrastructure are available in [HPC
15+
manual connecting section](../connecting.md).
1816

19-
Getting help
20-
------------
17+
## Getting help
2118

2219
To get help:
2320

24-
1. use the documentation available on the system, through the `help`,
25-
`info` and `man` commands (use `q` to exit).
21+
1. use the documentation available on the system, through the
22+
`help`, `info` and `man` commands (use `q` to exit).
23+
```
24+
help cd
25+
info ls
26+
man cp
2627
```
27-
help cd
28-
info ls
29-
man cp
30-
```
31-
3228
2. use Google
3329
34-
3. contact <a href="mailto:{{hpcinfo}}">{{hpcinfo}}</a> in case
30+
3. contact <a href="mailto:{{hpcinfo}}">{{hpcinfo}}</a> in case
3531
of problems or questions (even for basic things!)
3632
3733
### Errors
@@ -40,30 +36,30 @@ Sometimes when executing a command, an error occurs. Most likely there
4036
will be error output or a message explaining you this. Read this
4137
carefully and try to act on it. Try googling the error first to find any
4238
possible solution, but if you can't come up with something in 15
43-
minutes, don't hesitate to mail <a href="mailto:{{hpcinfo}}">{{hpcinfo}}</a>.
39+
minutes, don't hesitate to mail
40+
<a href="mailto:{{hpcinfo}}">{{hpcinfo}}</a>.
4441
45-
Basic terminal usage
46-
--------------------
42+
## Basic terminal usage
4743
4844
The basic interface is the so-called shell prompt, typically ending with
4945
`$` (for `bash` shells).
5046
51-
You use the shell by executing commands, and hitting `<enter>`. For
52-
example:
53-
<pre><code>$<b> echo hello</b>
54-
hello
55-
</code></pre>
47+
You use the shell by executing commands, and hitting
48+
`<enter>`. For example:
49+
<pre><code>$<b> echo hello
50+
</b> hello </code></pre>
5651
57-
You can go to the start or end of the command line using `Ctrl-A` or
58-
`Ctrl-E`.
52+
You can go to the start or end of the command line using
53+
`Ctrl-A` or `Ctrl-E`.
5954
60-
To go through previous commands, use `<up>` and `<down>`, rather than
61-
retyping them.
55+
To go through previous commands, use `<up>` and
56+
`<down>`, rather than retyping them.
6257
6358
### Command history
6459
6560
A powerful feature is that you can "search" through your command
66-
history, either using the `history` command, or using `Ctrl-R`:
61+
history, either using the `history` command, or using
62+
`Ctrl-R`:
6763
<pre><code>$<b> history</b>
6864
1 echo hello
6965
@@ -74,11 +70,11 @@ history, either using the `history` command, or using `Ctrl-R`:
7470
### Stopping commands
7571
7672
If for any reason you want to stop a command from executing, press
77-
`Ctrl-C`. For example, if a command is taking too long, or you want to
78-
rerun it with different arguments.
73+
`Ctrl-C`. For example, if a command is taking too long, or
74+
you want to rerun it with different arguments.
75+
76+
## Variables
7977
80-
Variables
81-
---------
8278
[//]: # (sec:environment-variables())
8379
8480
At the prompt we also have access to shell variables, which have both a
@@ -89,7 +85,7 @@ They can be thought of as placeholders for things we need to remember.
8985
For example, to print the path to your home directory, we can use the
9086
shell variable named `HOME`:
9187
92-
<pre><code>$<b> echo $HOME</b>
88+
<pre><code>$<b> echo $HOME</b>
9389
/user/home/gent/vsc400/vsc40000
9490
</code></pre>
9591
@@ -98,38 +94,40 @@ This prints the value of this variable.
9894
### Defining variables
9995
10096
There are several variables already defined for you when you start your
101-
session, such as `$HOME` which contains the path to your home directory.
97+
session, such as `$HOME` which contains the path to your
98+
home directory.
10299
103100
For a full overview of defined environment variables in your current
104-
session, you can use the `env` command. You can sort this output with
105-
`sort` to make it easier to search in:
101+
session, you can use the `env` command. You can sort this
102+
output with `sort` to make it easier to search in:
106103
107-
<pre><code>$<b> env | sort</b>
108-
...
109-
HOME=/user/home/gent/vsc400/vsc40000
104+
<pre><code>$<b> env | sort</b>
110105
...
111-
</code></pre>
106+
HOME=/user/home/gent/vsc400/vsc40000
107+
... </code></pre>
112108
113-
You can also use the `grep` command to search for a piece of text. The
114-
following command will output all VSC-specific variable names and their
115-
values:
109+
You can also use the `grep` command to search for a piece of
110+
text. The following command will output all VSC-specific variable names
111+
and their values:
116112
117113
<pre><code>$ <b>env | sort | grep VSC</b></code></pre>
118114
119-
But we can also define our own. this is done with the `export` command
120-
(note: variables are always all-caps as a convention):
115+
But we can also define our own. this is done with the
116+
`export` command (note: variables are always all-caps as a
117+
convention):
121118
122119
<pre><code>$ <b>export MYVARIABLE="value"</b></code></pre>
123120
124-
It is important you don't include spaces around the `=` sign. Also note
125-
the lack of `$` sign in front of the variable name.
121+
It is important you don't include spaces around the `=`
122+
sign. Also note the lack of `$` sign in front of the
123+
variable name.
126124
127-
If we then do
125+
If we then do
128126
<pre><code>$ <b>echo $MYVARIABLE</b></code></pre>
129127
130-
this will output `value`. Note that the quotes are not included, they
131-
were only used when defining the variable to escape potential spaces in
132-
the value.
128+
this will output `value`. Note that the quotes are not
129+
included, they were only used when defining the variable to escape
130+
potential spaces in the value.
133131
134132
#### Changing your prompt using `$PS1`
135133
@@ -138,11 +136,11 @@ special-purpose variable `$PS1`.
138136
139137
For example: to include the current location in your prompt:
140138
<pre><code>$ <b>export PS1='\w $'</b>
141-
~ $ cd test
142-
~/test $
143-
</code></pre>
139+
~ $ cd test
140+
~/test $ </code></pre>
144141
145-
Note that `~` is short representation of your home directory.
142+
Note that `~` is short representation of your home
143+
directory.
146144
147145
To make this persistent across session, you can define this custom value
148146
for `$PS1` in your `.profile` startup script:
@@ -154,71 +152,61 @@ One common pitfall is the (accidental) use of non-defined variables.
154152
Contrary to what you may expect, this does *not* result in error
155153
messages, but the variable is considered to be *empty* instead.
156154
157-
This may lead to surprising results, for example:
158-
<pre><code>$ <b>export WORKDIR=/tmp/test</b>
155+
This may lead to surprising results, for example:
156+
<pre><code>$ <b>export WORKDIR=/tmp/test</b>
159157
$ <b>pwd</b>
160-
/user/home/gent/vsc400/vsc40000
158+
/user/home/gent/vsc400/vsc40000
161159
$ <b>echo $HOME</b>
162-
/user/home/gent/vsc400/vsc40000
163-
</code></pre>
160+
/user/home/gent/vsc400/vsc40000 </code></pre>
164161
165162
To understand what's going on here, see the section on `cd` below.
166163
167-
The moral here is: **be very careful to not use empty variables unintentionally**.
164+
The moral here is: **be very careful to not use empty variables
165+
unintentionally**.
168166
169-
**Tip for job scripts: use `set -e -u` to avoid using empty variables accidentally.**
167+
**Tip for job scripts: use `set -e -u` to avoid using empty variables
168+
accidentally.**
170169
171-
The `-e` option will result in the script getting stopped if any command
172-
fails.
170+
The `-e` option will result in the script getting stopped if
171+
any command fails.
173172
174-
The `-u` option will result in the script getting stopped if empty
175-
variables are used. (see <https://ss64.com/bash/set.html> for a more
176-
detailed explanation and more options)
173+
The `-u` option will result in the script getting stopped if
174+
empty variables are used. (see <https://ss64.com/bash/set.html> for
175+
a more detailed explanation and more options)
177176
178-
More information can be found at <http://www.tldp.org/LDP/abs/html/variables.html>.
177+
More information can be found at
178+
<http://www.tldp.org/LDP/abs/html/variables.html>.
179179
180180
### Restoring your default environment
181181
182-
If you've made a mess of your environment, you shouldn't waste too much
183-
time trying to fix it. Just log out and log in again and you will be
184-
given a pristine environment.
182+
If you've made a mess of your environment, you shouldn't waste too
183+
much time trying to fix it. Just log out and log in again and you will
184+
be given a pristine environment.
185185
186-
Basic system information
187-
------------------------
186+
## Basic system information
188187
189188
Basic information about the system you are logged into can be obtained
190189
in a variety of ways.
191190
192-
We limit ourselves to determining the hostname:
193-
<pre><code>$ <b>hostname</b>
191+
We limit ourselves to determining the hostname:
192+
<pre><code>$ <b>hostname</b>
194193
gligar01.gligar.os
195194
196-
$ <b>echo $HOSTNAME</b>
197-
gligar01.gligar.os
195+
$ <b>echo $HOSTNAME</b>
196+
gligar01.gligar.os
198197
</code></pre>
199198
200199
And querying some basic information about the Linux kernel:
201-
<pre><code>$ <b>uname -a</b>
200+
<pre><code>$ <b>uname -a </b>
202201
Linux gligar01.gligar.os 2.6.32-573.8.1.el6.ug.x86_64 #1 SMP Mon Nov 16 15:12:09
203-
CET 2015 x86_64 x86_64 x86_64 GNU/Linux
204-
</code></pre>
205-
206-
207-
208-
Exercises
209-
---------
210-
211-
- Print the full path to your home directory
212-
213-
- Determine the name of the environment variable to your personal
214-
scratch directory
215-
216-
- What's the name of the system you're logged into? Is it the same for
217-
everyone?
202+
CET 2015 x86_64 x86_64 x86_64 GNU/Linux </code></pre>
218203
219-
- Figure out how to print the value of a variable without including a
220-
newline
204+
## Exercises
221205
222-
- How do you get help on using the `man` command?
206+
- Print the full path to your home directory
207+
- Determine the name of the environment variable to your personal scratch directory
208+
- What's the name of the system you\'re logged into? Is it the same for everyone?
209+
- Figure out how to print the value of a variable without including a newline
210+
- How do you get help on using the `man` command?
223211
224212
Next [chapter](navigating.md) teaches you on how to navigate.

0 commit comments

Comments
 (0)