Learn basic linux command on Xubuntu [PART 1]

Learn basic linux command on Xubuntu

Learning how to use command line is very important if you are new to linux, there are many things that can be done faster and easier using CLI (Command Line Interface) rather than using GUI (Graphical User Interface). In this tutorial i will guide you through some of the basic command on linux.

This tutorial is for beginner, if you are pro, no need to read this, you can skip to the next one. To run command line program, you will need to use the terminal, to open terminal you can use keyboard shortcut CTRL + ALT + T (works on every ubuntu flavors including xubuntu). You can also open terminal from xubuntu start menu > Accessories > Terminal Emulator.

Showing list of files and directories
Once you open terminal, the first command i want you to try is the ls command, ls command is for showing list of files and directories to the given path, if no path given than it will show your current path.
ls
ls /etc/
ls ~

Showing your current location
To show your current path/location, you can use pwd command, this command doesn't need any parameter. It will show your current location such as /home/myusername/ which is your home directory.
pwd

Moving from one path to another
To move from one location to another, you can use the cd command followed by the location you want to go.
cd [path/location]
Here's some example:
cd Downloads
cd /home/myusername/Documents
cd /home/myusername/Pictures
Some tips tricks for cd command:
You can use the cd command to go anywhere on your computer, if a path is too long to type, simply press TAB button on your keyboard for autocomplete, it can make your life easier.

In linux world the symbol ~ represent home directory, combined with cd command you can navigate  back to home directory, try this:
cd ~
The command above will take you straight to home directory, regardless of wherever you are right now.

Another important tips is that you can go up one level with double dot symbol, like this:
cd ..

Conclusion
Besides learning the command, it is also very important to understand directory structure of linux. Learning linux command is not difficult, you just need to get used to it, the best way to learn is by doing it. On part 2 we will be looking at different commands such as cp, mv, mkdir, etc.


Share this

Previous
Next Post »