lab.devdungeon.com
162.243.160.100
2604:a880:400:d0::19eb:4001
Here are some things you can do with it:
* Learn and play on a Linux mainframe!
* Program in a number of languages. Write bots, web apps, whatever!
* Use it to store git repositories
* Create a personal home page (e.g. http://lab.devdungeon.com/~myuser)
* Run a web app/API/service
* Use databases for storage
===== Getting started =====
==== Logging in ====
Use secure-shell (SSH). If you're in Windows, I recommend [[https://mobaxterm.mobatek.net|MobaXTerm]] but you can also use [[https://www.putty.org|PuTTy]] or [[https://docs.microsoft.com/en-us/windows/wsl/install-win10|WSL]]. Newer versions of Windows may come with SSH in the command prompt already.
ssh myuser@lab.devdungeon.com
This will normally prompt you for your password, but you can generate an SSH key and use that to login without a password:
# Copy your SSH key if you already have one
ssh-copy-id myuser@lab.devdungeon.com
# Generate an SSH key if you need one
ssh-keygen
==== Change your password ====
One of the first things you should do is change your password.
passwd
==== Absolute basics ====
Here are some absolute basic Linux commands to get you started.
cd /home/ # Change directory
ls # List directory contents
cd ~ # Move to your home dir
pwd # Print current directory
nano # Simple text editor
==== Setup your homepage ====
Create a directory in your home directory named ''public_html''.
For example: ''/home/myuser/public_html/'' and anything inside
that will be mapped to: [[http://lab.devdungeon.com/~myuser]].
Your landing page will need to be named ''index.html'' or ''index.php''.
For example:
# Create the public_html dir if needed
mkdir ~/public_html/
# Edit the main landing page
nano ~/public_html/index.php
You can put some simple HTML or PHP code in that file. For example:
Welcome
This is my homepage.
You can also place static files in that directory. For example, if you have a file named:
/home/myuser/public_html/stuff/test.txt
You would reach it via: ''http://lab.devdungeon.com/~myuser/stuff/test.txt''
Alternatively, instead of editing the code from the terminal, you can edit on your personal computer and then upload the files. See the section on transferring files.
You can also create/modify ''.htaccess'' files to modify advanced configurations like turning on/off directory indices and changing the default landing page, password protecting directories, and much more.
==== Transferring files ====
Since you have SSH access, you can transfer files using ''scp'' (secure copy) or ''sftp'' (secure file transfer protocol. You can use the command line tool ''scp'' or any application that supports SFTP. For example:
* [[https://filezilla-project.org|FileZilla]]
* [[https://winscp.net/eng/download.php|WinSCP]]
* [[terminal:midnight_commander|Midnight Commander]]
When transferring files, use the host of ''lab.devdungeon.com'' and choose SFTP as the protocol. It uses the default SSH port of 22. Use the same username and password that you use to SSH to the server.
==== Programming ====
There are a number of programing languages installed and ready to play with:
* C
* C++
* Go
* PHP
* Ruby
* Crystal
* Python
* JavaScript
* Java
* Lua
* Tcl
* Haskell
* Rust
* Perl
Explore new languages, experiment with programming on Linux, interact with others on the server too. You can play with Linux pipes, FIFOs, and sockets and communicate with other users.
Here are some other ideas:
* Write a game using [[https://phaser.io|Phaser.js]] and host it in your personal web space.
* Write a bot for IRC, Discord, Slack, Twitter, etc.
* Write a terminal based game (single player or multi player)
* Collaborate with other members to work on something
* Create a simple API for personal projects. For example, home automation and IoT projects or bot tools.
* Play with a new programming language you've never tried
* Find another member who has server access, and try sharing live terminals (for example using ''tmux'' or using local Linux sockets to create a primitive chat (for example using ''netcat'').
* Setup VS Code server for coding https://github.com/cdr/code-server
* Learn to work with IPv6
* Learn to work with HTTP 2.0
* Learn to work with WebSockets (duplex communication in browser)
* Learn to work with WebRTC (Real-time voice/video in browser)
==== Run a web app/service/api ====
If you want to run an app that binds its own web server, like a
Node.js, Python, Java, Ruby, or Go app, you can bind to any port
that is not resricted by the system (anything over 1024).
For example, you can run a Node.js web app on port 9999 and access it
at [[http://lab.devdungeon.com:9999]]
==== Store git repositories ====
# Add your server as a remote
git remote add origin ssh://myuser@lab.devdungeon.com:path_relative_to_home_dir
==== Database storage ====
There are a few databases you can use on the lab server:
* SQLite3
* MySQL (MariaDB)
* PostgreSQL
==== Forwarding X11 desktop ====
You can run desktop graphical applications from the server using X11 forwarding.
//Incomplete. To do//
==== Cron jobs ====
Setup personal cron jobs with:
crontab -e
==== Systemd services ====
You can setup personal systemd services. Refer to [[https://www.devdungeon.com/content/creating-systemd-service-files]].
===== Other notes =====
==== Games ====
* ''/usr/games/asciijump''
==== Other installed software ====
There are a number of other applications installed for everyone to use. Here are some of the applications installed.
Also see the wiki section on [[:terminal:home|Terminal]] for a lot of things you can do in a terminal.
* Shells installed
* ''/usr/bin/bash''
* ''/usr/bin/zsh''
* ''/usr/bin/fish''
* Terminal multiplexor
* ''/usr/bin/tmux'' - See [[other:tmux_terminal_multiplexing|Tmux Terminal Multiplexing]]
* ''/usr/bin/screen''
* Editors
* ''/usr/bin/vim'' - See: [[https://www.devdungeon.com/tags/vim|Vim posts]]
* ''/usr/bin/emacs''
* ''/usr/bin/nano''
* File managers & tools
* ''/usr/bin/mc'' - See [[terminal:midnight_commander|Midnight Commander Terminal File Navigator]]
* ''/usr/bin/vifm''
* ''/usr/bin/nnn''
* ''/usr/bin/tree''
* Email clients
* ''/usr/bin/mutt'' - See [[terminal:mutt|Terminal Email with Mutt]]
* Web
* Terminal browsers
* ''/usr/bin/elinks'' - See [[other:elinks_terminal_web_browser|Terminal Web Browsing and BitTorrent with ELinks]]
* ''/usr/bin/lynx''
* ''/usr/bin/links''
* Tools
* ''/usr/bin/curl'' - See [[https://www.devdungeon.com/tags/curl|cURL posts]]
* ''/usr/bin/wget''
* IRC/XMPP chat client
* ''/usr/bin/irssi''
* System tools
* ''/usr/bin/neofetch''
* ''/usr/bin/htop''
* Network tools
* ''/usr/bin/netcat''
* ''/usr/bin/netstat''
* ''/usr/bin/traceroute''
* ''/usr/bin/nmap''
* DNS tools
* ''/usr/bin/nslookup''
* ''/usr/bin/dig''
* LDAP tools
* ''/usr/bin/ldapsearch''
* ''/usr/bin/ldapwhoami''
==== Run your own server ====
The DevDungeon lab server is hosted on Digital Ocean. If you want to run your own Digital Ocean server so you have root access on your own machine, you can use this promo link for Digital Ocean. It will give you $100 of free credit: [[https://m.do.co/c/5ccd98162d85]]