Tuesday, June 14, 2016

Pin It


Basic Linux Commands

we find ourselves pondering over the Basic Linux Commands which one must be aware of, as a beginner!

The ls command is used to list the contents of the directory (just in case you are getting confused: a directory can be considered as being analogous to a folder of Windows). You will be using the ls command to gain information about the files and directories.

As I mentioned above, we can add certain options to a Linux command in order to make it do a little bit of extra work. Here’s is how it happens:

cd [dir]
The ‘cd‘ command is used to change the current directory i.e we use this command to switch over to some other directory whose contents we might want to view or perform particular operations upon. It is basically used for navigation purposes. Using this command changes the current directory to ‘dir’. If you simply use the cd command without specifying the directory, it changes the current directory to the home directory.

The pwd command is used to display the name of the current working directory. In case you are unaware about it, use the pwd command to determine the directory that you are currently placed in.

cat [file]
The cat command concatenates and display files. This command is used to display the contents of the file mentioned along with the command.

echo [argument]
The echo command is one of the most commonly used Linux commands and is used to display the argument mentioned in the command on the screen. It basically displays a line of text/string on standard output or a file.

Sometimes while using the Terminal, there is a tendency for things to get cluttered. There could be too much information on the screen or you might, no longer require the data being displayed. In such cases,we use the clear command to (no prizes for guessing) clear the screen and get rid of the contents of the screen.

As the name suggests, the exit command is used to exit the shell or your current session.

man command
One of the Linux commands that would come to your rescue when things get sticky is the man command. The man command displays the online manual for the ‘command’ specified along with the word man. It is sort of like the help menu. You can get information about any of the command, its function, the options associated with it etc. By using the man command:

This documentation provided for any Linux command by the man command is called ‘man pages’.

Here are some more Linux commands that you should know:

rm: This command removes files and directories.

cp: This command copies files and directories.

mv: This command moves files and folders between directories.

mkdir: This command makes a new folder in your working directory.

cal: This command shows calendar on you Terminal.

nano: This command is a command line text editor.

sudo: This command gives you the super user privileges.

If you are willing to learn more about Linux command line tools related to various system processes, hardware, users, network etc. here’s a useful cheatsheet.

There are hundreds of Linux commands out there. But, I would advise you to first try out these commands on your own system and gather a basic idea of how they work. You could also refer to the man pages of each command in order to gain more knowledge about them. We shall keep discussing these commands in greater detail in upcoming articles.

ඔයාලත් මේ පොස්ට් එකට කැමති නම් අපිට මෙතනින් ගිහින් පොඩි Support එකක් දෙන්න ඈ...

No comments:

Post a Comment

හ්ම්ම්ම්ම් ඔන්න එහෙනම් යාලුවනේ යන්න කලින් පොඩි අදහසක් දීලා අපිව පොඩ්ඩක් උස්සලා තිබ්බොත් හොඳයි නේද? ඒක එහෙමයි කියලා මගේ බ්ලොගයේ තියන් වැරදි අඩුපාඩු කියන්නේ නැතුව යන්න එපා. හැබැයි නිකන්ම ඇවිත් යන්නේ නැතුව පොඩි අදහසක් දීලා යන්න හොඳේ...

Twitter Delicious Facebook Digg Stumbleupon Favorites More

Design by Free WordPress Themes | Re Designed by Dilhan Padeniya - Premium Blogger Themes | Dil Computers Review