Due to the popularity of mainstream operating systems, desktops like Windows or Mac, the command line might seem like a foreign thing to many people. Typing commands into a window might seem, well, arcane. But even though Linux has really progressed on the desktop, there is still a lot of power you can wield at the command line. So if you are a former Windows or Mac user and recently joined the ‘free and open source revolution’ but suddenly feel lost in this utopia (can’t get used to the command line), I think you should take a deep breathe and take a bit of time to learn this powerful technology. Knowledge is power, once you get this power, you will find that you have so much freedom to think and act independently, no longer rely on soul-sucking evil cult companies like Microsoft or Macintosh.
The most popular Unix-like computer operating system would be Linux, there are many well-known Linux distributions like Fedora, openSUSE, Ubuntu etc. The most well-known among all these is Ubuntu. So now let’s see how we can navigate the filesystem on Ubuntu using Shell script.
The first step is to launch a terminal. Click Applications > Accessories > Termial to start default GNOME (GNOME is one of the three most popular uer interfaces on desktop machines, the other two are KDE and Xfce) Terminal program.
Now that the terminal program is open, you can navigate the filesystem. By default, terminals will open your home directory, so one thing you might want to do is see what files are currently in your home directory. The ls command displays all the files in the directory you specify (or in the current directory if you don’t list a drectory):
ls
The command above will display all the files in the home directory
To get the list of contents on the Desktop directory, type the following command:
ls Desktop/
Notice: please take note that in the Unix world, all directory and file names are case-sensitive. So if you change the above command to: ls desktop/, you will end up getting a response like: No such file or directory.
If you want to navigate to a certain directory, use the cd commond followed by the directory to change to:
cd Desktop/
You can use the pwd command to see where you currently are, to use it simply type: pwd
Tip: The ~ symbol is shorthand in Linux for your user’s home directory. If you type cd ~ you will automatically change back to your home directory. It saves you from having to type out cd /home/ username.
Hope this helps!




















































