wiki/getting-started.md

62 lines
2.5 KiB
Markdown

# getting started
_______________________
< welcome to tilde.cafe >
-----------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
## logging in
if you have windows subsystem for linux (WSL), then open your WSL terminal and
follow instructions below.
1. open a terminal
* linux: usually search for "terminal" in your app menu, on KDE it's Konsole
* windows 10: open cmd or powershell
* windows 10, alternative 1: you can use [WSL](https://docs.microsoft.com/en-us/windows/wsl/about), if you already have it set up, if you don't, it's easier to just use builtin ssh via cmd
* windows, alternative 2: you can use [PuTTY](https://www.chiark.greenend.org.uk/~sgtatham/putty/) (warning, putty stores keys in its own format, which can be tricky to deal with, recommended only to use if you don't use windows 10, or know your way around putty already)
* mac: browse to applications/utilities/terminal and launch terminal (or press cmd+space, start typing terminal, and press return)
2. type in `ssh username@tilde.cafe`
3. enter your ssh key passphrase if needed
## basic linux commands
below are some basic commands to get around via ssh.
- `ls` = list files and folders in the current directory
- `cp` = copy files and directories (for example `cp index.html old_index.html`)
- `mv` = move and rename files and directories (for example `mv example.txt
poem.txt` effectively renames `example.txt` into `poem.txt`)
- `rm` = PERMANENTLY delete files and directories (use `rm -r` to delete
directories), THERE IS NO UNDOING THIS
- `cd` = change directory
- `pwd` = tells you which directory you are in
- `nano` = a command line text editor, similar to notepad
## editing your website
using the commands above we can update our homepage:
- type `ls` to see what files and folders are in your home directory
- type `cd ~/public_html` to get to your web site's directory
- type `nano index.html` to open your homepage in nano.
edit the file as you like. when done press `ctrl + x` to quit.
you'll be asked if you want to save, press `y` to confirm. (or `n` to quit
without saving) if it asks you for a filename, press `enter` to confirm.
You can also press `ctrl + s` to save without exiting, and `ctrl + o` to save
as a different filename
now navigate to https://tilde.cafe/~your_username to see the result!
for more information about your website, check out [the wiki page about user
websites](website.html).