Files
linux-odyssey/server/quests/helloworld
wancat d997a061a9 feat: send command typed in container to API
- Modify the Dockerfile in the `server/quests/helloworld` directory to add a user and change the working directory
- Rename the file `server/quests/helloworld/entrypoint.sh` to `server/quests/helloworld/home/.bashrc`
- Modify the `server/src/config.js` file to add the `isProduction` flag
- Modify the `server/src/utils/docker.js` file to add a `HostConfig` option and bind a directory if not in production mode
- Modify the Dockerfile to add an argument `DOCKER_GID` and create a group and user with the specified `DOCKER_GID`
- Add a new Dockerfile.dev file with the same modifications as the Dockerfile
- Add a new file `inspect.sh`
- Modify the `server/src/client.js` file to use the `API_ENDPOINT` variable instead of a hardcoded URL

Signed-off-by: wancat <wancat@wancat.cc>
2023-07-26 20:54:01 +08:00
..
2023-07-19 20:01:14 +08:00

title, order
title order
Hello World 1

Hello World

Welcome to your first quest! This quest will help you familiarize yourself with the terminal.

The terminal is a text-based interface that allows you to interact directly with your computer's operating system. You can perform various tasks by typing commands into the terminal and pressing Enter to execute them.

For your first task, you are going to use the echo command.

Task 1: Using the echo Command

The echo command in Unix is used to display line of text/string that are passed as an argument. This is a built in command that is mostly used in shell scripts and batch files to output status text to the screen or a file.

Here is what you need to do:

  1. Open your terminal.
  2. Type echo Hello World and hit Enter.
  3. You should see Hello World output to the terminal. This is because echo prints its arguments to the standard output, which is your terminal by default.

Congratulation! You've just run your first terminal command!

Stay tuned for the next quests where you'll delve deeper into more complex and powerful terminal commands.