Welcome to Chapter 1.2!
In this section, we're going to take our first steps in our great programming adventure!
Now that we know what the Terminal is and how it works, it is time to put it to use!
If you remember in the last chapter, The Terminal can be pretty easy to find:
- On Windows, you can find it by using the Search Bar.
- On Linux, you can either look it up or Right-Click in the Desktop or in the File Explorer, where you can find the option to "Open the Terminal".
But...
Something that you're going to learn as a programmer is that Search Engines like Google, Bing, DuckDuckGo, etc. are your best friends.
If you can't find a way to open the Terminal/Command Prompt on Windows 10 for example, because the Search Bar is disabled or due to other "X" issue, you can go and search it up on Google like this:
And in your first search results, you'll probably find how to open up the Terminal quickly in no time.
Websites like this are going to be useful as well in programming, if you can't find the way of doing a certain thing and the book or the Nucleus Documentation doesn't tell you how (which it can happen).
Now that we're in the Terminal, we're going to type our first command!
But before typing it, there are a few things that you have to know:
Commands have to be written exactly as they're told: This means that if a guide, documentation or manual that relies on the Terminal, tells you to type command something
, it has to be written with the correct spaces and with the correct uppercase (ABCDEFG...) or lowercase (abcdefg...) letters. Meaning that it's not recommended to type COMMAND SOMETHING
or CoMmAnD sOmEtHiNg
unless it tells you or allows you to do so.
Sometimes are some exceptions to the rule, like some programs can detect the word no matter if letters are upper or lowercase, but its likely a hit or miss and if you're a beginner, its better if you just follow the manual or documentation. Later on, once you get used to the Terminal, you can get away sometimes with different casing, but now its recommended to keep that experimentation for later.
Now that you know this, its time to write our first command! So exciting! :D
To check if Nucleus has been correctly installed in your system, let's write this command:
nucleus hello
(Remember, type it as it says right there, with all lowercase letters and with the correct spaces)
Let's break down what the command does:
-
nucleus
is of course, the name of the programming language in form of a program. This is going to be our most important tool since we're going to use it for pretty much everything. -
hello
is what is called an Argument:- Arguments are words that tell a program in the Terminal how to do different tasks. Think of it as Commands that can tell the Command what to do.
- In this case, the
hello
argument is to say "Hello" tonucleus
.
If we type it in the Command Prompt and press "Enter" on your keyboard, you're gonna see that we get a response back:
>nucleus hello
Hi! :D
If it says "Hi! :D" in your Terminal then...
You just wrote your first command of the many! Amazing Job! See that it wasn't that hard? :D
Now in the next Sub-Chapter, we can start doing more interesting things with the command line!
See you there! :D