|
|
|
|
@ -13,8 +13,11 @@ learn more about `ssh` -> [https://www.ssh.com/ssh/](https://www.ssh.com/ssh/) |
|
|
|
|
start terminal <key>ctrl</key> + <key>alt</key> + <key>t</key> |
|
|
|
|
|
|
|
|
|
~~~ bash |
|
|
|
|
ssh -p portnumber pi@er401.duckdns.org |
|
|
|
|
ssh -p portnumber pi@ipaddress |
|
|
|
|
ssh user @ distant_server.address : connection_port (default to 22 ) |
|
|
|
|
|
|
|
|
|
ssh pi@192.168.1.24 |
|
|
|
|
|
|
|
|
|
~~~ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -27,7 +30,7 @@ ssh user @ distant_server.address : connection_port (default to 22 ) |
|
|
|
|
start terminal ( <key> 🍎 </key> + <key> space </key> and search for `terminal`) |
|
|
|
|
|
|
|
|
|
~~~bash |
|
|
|
|
ssh pi@er401.duckdns.org:22 |
|
|
|
|
ssh -p 55 pi@er401.duckdns.org |
|
|
|
|
~~~ |
|
|
|
|
|
|
|
|
|
- **Windows** : |
|
|
|
|
@ -35,7 +38,7 @@ ssh pi@er401.duckdns.org:22 |
|
|
|
|
- got to [putty download page](https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html) |
|
|
|
|
- `putty` will give ~~windows~~ `ssh` ability ... |
|
|
|
|
- connect to: |
|
|
|
|
- server: ```er401.duckdns.org``` |
|
|
|
|
- server: ```ipadresse``` |
|
|
|
|
- port ```22``` |
|
|
|
|
- user `pi` |
|
|
|
|
|
|
|
|
|
@ -50,7 +53,7 @@ ssh pi@er401.duckdns.org:22 |
|
|
|
|
|
|
|
|
|
1. *create a User* |
|
|
|
|
``` |
|
|
|
|
sudo useradd -m <username> -p <password> |
|
|
|
|
sudo useradd <username> |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
2. *add user to groups and privilege* |
|
|
|
|
@ -76,25 +79,89 @@ ssh pi@er401.duckdns.org:22 |
|
|
|
|
3. *reconnect with your `username` and `password`* |
|
|
|
|
|
|
|
|
|
```bash |
|
|
|
|
ssh YOUR_USER_NAME@er401.duckdns.org:22 |
|
|
|
|
ssh YOUR_USER_NAME@ADRESSEIP |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
4. welcome to your new `home` |
|
|
|
|
|
|
|
|
|
1. your *home folder* is in `/home/yourUserName` |
|
|
|
|
1. hint : you can check where you are with the command `pwd` (**P**rint **W**orking **D**irectory) |
|
|
|
|
2. learm about linus folder structure -> [random first article on ddg search :) ](https://linuxhandbook.com/linux-directory-structure/) |
|
|
|
|
2. learm about linus folder structure -> [learn more](https://linuxhandbook.com/linux-directory-structure/) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
--- |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# DO SOME STUFF |
|
|
|
|
|
|
|
|
|
## general `cli` commands |
|
|
|
|
|
|
|
|
|
### navigate |
|
|
|
|
|
|
|
|
|
- `.` the current directory ( folder) |
|
|
|
|
- `..` the parent directory |
|
|
|
|
- `man` : view the **man**ual of a command ( ex : ` man ls` ) |
|
|
|
|
- `pwd ` : Use the **pwd** command to find out the path of the current working directory (folder) you’re in |
|
|
|
|
- `cd` : **c**hange **d**irectory to go inside a new directory |
|
|
|
|
- `ls` : **l**i**s**t the current directory content |
|
|
|
|
- `cp` : to **c**o**p**y documents / folders |
|
|
|
|
- `mv`: to **m**o**v**e documents / folder |
|
|
|
|
- `mkdir`: **m**a**k**e **dir**ectory create a folder |
|
|
|
|
- `touch`: create an empty file |
|
|
|
|
- `rm` : **r**e**m**ove folder and files ***⚠️*** no return possible / read and think twice before smashing <key> enter </key> |
|
|
|
|
- `find`: to find / search for files |
|
|
|
|
|
|
|
|
|
### system stuffs |
|
|
|
|
|
|
|
|
|
- `sudo` : **s**uper **u**ser **do** get super privileges to do system stuff ***⚠️*** `sudo` can do **ANYTHING** , even destroy system |
|
|
|
|
- `du` : **d**isk **u**sage ... to see .. disk usage ( use it with `-h` argument for human readable output ) |
|
|
|
|
- `top` and `htop` : to monitor system ( application / ram / cpu usage) |
|
|
|
|
- `killall` : kill a process by name e:`killall firefox` will quit and kill all *firefix* process |
|
|
|
|
- `uname ` : view system information ( kernel / linux version ....) |
|
|
|
|
- `sudo reboot` : restart computer ( must be `sudo` to execute ) |
|
|
|
|
- `sudo halt` || `sudo shutdown now` : shutdown computer ( must be `sudo`) |
|
|
|
|
|
|
|
|
|
### general help |
|
|
|
|
|
|
|
|
|
- <key>ctrl</key> + <key>r</key> : search in history for already used commands |
|
|
|
|
- <key>ctrl</key> + <key>c</key> : **kill** running command |
|
|
|
|
|
|
|
|
|
-------- |
|
|
|
|
|
|
|
|
|
# getting started with python |
|
|
|
|
|
|
|
|
|
==underconstruction== |
|
|
|
|
|
|
|
|
|
 |
|
|
|
|
|
|
|
|
|
just some code to try |
|
|
|
|
|
|
|
|
|
~~~python |
|
|
|
|
import time |
|
|
|
|
import math |
|
|
|
|
x = 0 |
|
|
|
|
try : |
|
|
|
|
while True: |
|
|
|
|
x = x+1 |
|
|
|
|
time.sleep(0.5) |
|
|
|
|
print(" la vlaeur de x est de = {}".format(x)) |
|
|
|
|
if x>100: |
|
|
|
|
x=0 |
|
|
|
|
|
|
|
|
|
except KeyboardInterrupt: |
|
|
|
|
print('Hello user you have pressed ctrl-c button.') |
|
|
|
|
~~~ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## create folder in ```apache``` server |
|
|
|
|
|
|
|
|
|
wft is `apache` : |
|
|
|
|
|
|
|
|
|
> apache is a http web server [wiki page](https://en.wikipedia.org/wiki/Apache_HTTP_Server) |
|
|
|
|
|
|
|
|
|
there other solution like [https://www.lighttpd.net/]{https://www.lighttpd.net/} |
|
|
|
|
there other solution like [https://www.lighttpd.net/]{https://www.lighttpd.net/} or the popular [https://nginx.org/en/](https://nginx.org/en/) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
`apache` is well documented and often the one you'll find on a web server service |
|
|
|
|
|
|
|
|
|
@ -127,7 +194,6 @@ there other solution like [https://www.lighttpd.net/]{https://www.lighttpd.net/} |
|
|
|
|
6. content example |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
~~~html |
|
|
|
|
<html> |
|
|
|
|
<head> |
|
|
|
|
@ -145,43 +211,6 @@ there other solution like [https://www.lighttpd.net/]{https://www.lighttpd.net/} |
|
|
|
|
</html> |
|
|
|
|
~~~ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# DO SOME STUFF |
|
|
|
|
|
|
|
|
|
## general `cli` commands |
|
|
|
|
|
|
|
|
|
### navigate |
|
|
|
|
|
|
|
|
|
- `.` the current directory ( folder) |
|
|
|
|
- `..` the parent directory |
|
|
|
|
- `man` : view the **man**ual of a command ( ex : ` man ls` ) |
|
|
|
|
- `pwd ` : Use the **pwd** command to find out the path of the current working directory (folder) you’re in |
|
|
|
|
- `cd` : **c**hange **d**irectory to go inside a new directory |
|
|
|
|
- `ls` : **l**i**s**t the current directory content |
|
|
|
|
- `cp` : to **c**o**p**y documents / folders |
|
|
|
|
- `mv`: to **m**o**v**e documents / folder |
|
|
|
|
- `mkdir`: **m**a**k**e **dir**ectory create a folder |
|
|
|
|
- `touch`: create an empty file |
|
|
|
|
- `rm` : **r**e**m**ove folder and files ***⚠️*** no return possible / read and think twice before smashing <key> enter </key> |
|
|
|
|
- `find`: to find / search for files |
|
|
|
|
|
|
|
|
|
### system stuffs |
|
|
|
|
|
|
|
|
|
- `sudo` : **s**uper **u**ser **do** get super privileges to do system stuff ***⚠️*** `sudo` can do **ANYTHING** , even destroy system |
|
|
|
|
- `du` : **d**isk **u**sage ... to see .. disk usage ( use it with `-h` argument for human readable output ) |
|
|
|
|
- `top` and `htop` : to monitor system ( application / ram / cpu usage) |
|
|
|
|
- `killall` : kill a process by name e:`killall firefox` will quit and kill all *firefix* process |
|
|
|
|
- `uname ` : view system information ( kernel / linux version ....) |
|
|
|
|
- `sudo reboot` : restart computer ( must be `sudo` to execute ) |
|
|
|
|
- `sudo halt` || `sudo shutdown now` : shutdown computer ( must be `sudo`) |
|
|
|
|
|
|
|
|
|
### general help |
|
|
|
|
|
|
|
|
|
- <key>ctrl</key> + <key>r</key> : search in history for already used commands |
|
|
|
|
- <key>ctrl</key> + <key>c</key> : **kill** running command |
|
|
|
|
- list of softwares : [go to page](soft.html) |
|
|
|
|
|
|
|
|
|
## mjpeg-streamer ( video server ) |
|
|
|
|
|
|
|
|
|
```https://github.com/jacksonliam/mjpg-streamer``` |
|
|
|
|
@ -216,29 +245,3 @@ there other solution like [https://www.lighttpd.net/]{https://www.lighttpd.net/} |
|
|
|
|
http://er401.duckdns.org:666/?action=stream |
|
|
|
|
~~~ |
|
|
|
|
|
|
|
|
|
# getting started with python |
|
|
|
|
|
|
|
|
|
==underconstruction== |
|
|
|
|
|
|
|
|
|
 |
|
|
|
|
|
|
|
|
|
just some code to try |
|
|
|
|
|
|
|
|
|
~~~python |
|
|
|
|
import time |
|
|
|
|
import math |
|
|
|
|
x = 0 |
|
|
|
|
try : |
|
|
|
|
while True: |
|
|
|
|
x = x+1 |
|
|
|
|
time.sleep(0.5) |
|
|
|
|
print(" la vlaeur de x est de = {}".format(x)) |
|
|
|
|
if x>100: |
|
|
|
|
x=0 |
|
|
|
|
|
|
|
|
|
except KeyboardInterrupt: |
|
|
|
|
print('Hello user you have pressed ctrl-c button.') |
|
|
|
|
~~~ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|