Welcome Darshik; it's great to have you here! :)
When first investigating the terminal, doing some simple file management is often a good place to start. If you open up the Terminal, you'll be in your home folder normally, which we represent with a
~ character. You might see in the terminal window something like:
your_username@your_machinename:~$
This is the prompt -- and the ~ tells us we are in your home folder.
The
$ just tells us that the prompt is finished; the next thing you type will be a command. So, when you see a
$ sign in people's tutorials involving the command line (like my snippets below), that means you don't type it in. It's just there to show you which bits are commands (lines that start with $) and which bits aren't!
The first command to explore is
pwd, which stands for
print
working
directory. This tells you, more clearly than the ~, which folder you're currently in. I might see this:
To see the contents of the current working directory, we can use
ls to get a list:
(You'll see what's in your home directory.)
If I want to move into another folder, I use
cd (for
change
directory):
(you may have to spell it with the right capitalisation, too!)
Now,
pwd again shows I have moved:
Code:
$ pwd
/home/hybrid/Documents
We can create an empty file by
touching it. After typing the name of the
touch program, I press space, and the next thing it expects is the name of the file to create or update. I'll make one called
new_document.
Code:
$ touch new_document
(I'm avoiding the complications of files with spaces and special characters in them for now!)
To see the files in this folder, I can, again,
ls it:
The new file should appear in the list!
You could also play with
cp for copying the file, or even a simple text editor in the command line like
nano (the keyboard shortcuts are listed at the bottom of the screen, where
^ means Ctrl+. So, to quit nano, you press Ctrl+X.)
If you have any particular ideas about where you want to go next with the command line, let's hear 'em! We'd love for you to share your experiences with learning this cool stuff. :)