Step 2 · Ubuntu
Core command line tools
A fresh Ubuntu install is deliberately minimal. This step adds the small set of tools you cannot really work without: fetching a file, reaching another machine, editing text, and looking around.
Run this
$ curl -fsSL https://aikaryashala.com/system_setup/scripts/install_cmds.sh | bash
It will ask for your Linux password once, at the start — installing software system-wide needs administrator rights. Re-running it later is safe; anything already installed is skipped.
What gets installed
Fetching and networking
curlFetch a URL. The workhorse behind every install command on this site.sshLog in to another machine securely.ssh-keygencreates your keys.ipip addrshows your addresses,ip routeshows where traffic goes.pingIs that host reachable at all?digAsk DNS what a name resolves to.
Version control
gitTrack changes, and clone anything from GitHub.
Editing and reading
nanoA simple editor. Arrow keys work, Ctrl+O saves, Ctrl+X exits.vimThe powerful one.:q!gets you out.lessPage through long output. Space scrolls, / searches, q quits.fileTell me what this file actually is, regardless of its extension.jqRead, filter and reshape JSON — the format almost every web API answers in.
Looking around
treeShow a directory as a tree.htopWhat is using my CPU and memory, right now.zipunzipThe archive format you will meet most often.
They are in step 6, along with
wget, rsync, bat, fd
and the rest of the wider toolkit. That step is independent — install it
whenever you want, before or after the language toolchains.
Try them
Copy one command at a time, paste it into your Ubuntu terminal, and press Enter. Read what comes back before moving to the next one — that is how you learn what each command is for.
See what a machine is called
Ask DNS which address a name points to.
$ dig +short github.com
Find your own address
Show the network addresses this machine currently has.
$ ip addr
Check that another machine answers
Send a few small messages and see how long the replies take. It keeps going until you stop it — press Ctrl+C.
$ ping -c 4 github.com
Fetch a web page
Download a page and print it straight to the screen.
$ curl -s https://example.com
Read something long, one screen at a time
The same page, but paged. Press Space for the next screen and q to quit.
$ curl -s https://example.com | less
You are inside less. Press q to come back to the
terminal. This catches everyone once.
Ask what a file really is
File names can say anything. file looks inside and tells you
what it actually found.
$ file /bin/ls
/bin/ls: ELF 64-bit LSB pie executable, x86-64, dynamically linked
See a folder as a tree
Show what is in the current folder, going two levels deep. Try it in your home folder.
$ tree -L 2
See what your machine is busy with
A live view of every running program. Press q to quit.
$ htop
Make a zip file, then unpack it
Three commands: create a folder with a file in it, zip it, then unzip it.
$ mkdir practice && echo "hello" > practice/note.txt
$ zip -r practice.zip practice
$ unzip practice.zip -d unpacked
Checking a JSON file with jq
JSON is a plain text format for storing information as key and value pairs. It is what most programs use to save settings and to send information to each other. A JSON file looks like this:
{
"name": "Your Name",
"roll_number": "24CS101",
"image_url": "https://example.com/photos/yourname.jpg",
"sankalpam": "I want to be an expert software builder who solve problems with software solutions plus services"
}
Every line is one key, then a colon, then its value. The keys here are
name, roll_number, image_url and
sankalpam.
JSON is strict about punctuation. One missing comma or one missing quotation
mark and the whole file becomes unreadable to every program that opens it.
jq tells you straight away whether a file is correct.
Make your own file
Type this in your terminal, replacing the four values with your own. Keep all the quotation marks and commas exactly where they are.
$ nano student.json
Nano opens an empty editor. Type your file, then press Ctrl+O and Enter to save, and Ctrl+X to leave:
{
"name": "Lakshmi Prasad",
"roll_number": "24CS042",
"image_url": "https://example.com/photos/lakshmi.jpg",
"sankalpam": "I want to be an expert software builder who solve problems with software solutions plus services"
}
Check whether it is valid
$ jq . student.json
If the file is correct, jq prints it back to you, neatly laid
out and coloured:
{
"name": "Lakshmi Prasad",
"roll_number": "24CS042",
"image_url": "https://example.com/photos/lakshmi.jpg",
"sankalpam": "I want to be an expert software builder who solve problems with software solutions plus services"
}
That means your file is valid JSON.
What a mistake looks like
Now break it on purpose — remove the comma at the end of the
roll_number line — and run the same command again:
$ jq . student.json
jq: parse error: Expected separator between values at line 4, column 13
No neat output means the file is not valid. The message gives you a line and column to look at. Do not worry about the exact wording — what matters is that there is an error at all.
You deleted the comma on line 3, but jq reports line 4. That is normal: it only notices something is wrong when it reaches the next value and finds no comma before it. When the reported line looks fine, check the line above it.
Put the comma back, save, and run jq . student.json again until
it prints your file.
Output means valid. An error means broken. Whenever you
write a JSON file by hand, run jq . yourfile.json before using
it anywhere else. It takes a second and saves a lot of confusion later.
The three mistakes that cause almost every error
| Mistake | What jq says |
|---|---|
| A missing comma between two lines | Expected separator between values |
| A comma after the last pair — JSON does not allow one | Expected another key-value pair |
| Missing quotation marks around a key | Invalid numeric literal |
That third message is a strange way to say “this key has no quotes”, but it is what jq prints. Whenever a message makes no sense, look at the line and the one above it for a missing quote or comma.
jq can do far more than check a file — searching, filtering and
reshaping data. That is step 10, for when
you are comfortable here.
Chapter 4 of the book explains options,
pipes and redirection — including every piece of the
curl … | bash line at the top of this page.
Chapter 5 explains what
apt and sudo are actually doing.
Set up git
The script installs git but deliberately does not configure your identity — that part is yours. Run these once, with your own name and email:
$ git config --global user.name "Your Name"
$ git config --global user.email "you@example.com"
$ git config --global init.defaultBranch main
$ git config --global core.editor nano
To connect to GitHub over SSH, create a key and add the public half to your account:
$ ssh-keygen -t ed25519 -C "you@example.com"
$ cat ~/.ssh/id_ed25519.pub
Copy that output into
GitHub → Settings → SSH keys,
then check it works with ssh -T git@github.com.
Check it worked
The script prints a version summary when it finishes. To confirm by hand:
$ git --version && curl --version | head -1 && tree --version && jq --version
Next
With the basics in place, step 3 sets up C: a compiler and a debugger.