With the use of graphical interface in Linux, it had become more attractive and usable (even normal folks can use it with ease). But the real power of Linux isn’t in front but at back. The ability to execute series of vast simple or complex commands to perform certain operations is what makes it better than other OS. Oh! yeah Linux is mostly free and allows user to modify codes. It’s great because Microsoft or Apple won’t allow such privilege to user.
For controlling, monitoring distro’s underlying system, the command line remains indispensable. Using it, it’s easy to configure and control everything from basic system setup, including network, boot, auto mount to graphical apps.
So if you don’t know any commands, have look at some basic and mostly used commands :
1) Root privilege
Root means administrator (like in windows). By default, no user is granted root level permission and reason is ‘if user isn’t careful with what they are doing as root then it can cause some serious damage to system’. So no root privilege. The command ‘sudo‘ allows user to get briefly root level privilege for that session.
sudo -i // to login temporarily as root OR sudo <commands> <options>
2) Clear the console screen
When using console commands we all get lots of verbose and to clear it using ‘clear‘ will gives you a clean console to work on.
3) Listing and changing directory
To navigate through the drives, directory and file is done by ‘cd‘ and to get the basic permission grants and owner name of directory and files we can use ‘ls‘
ls // OR ls -l
4) Changing the permission
File / directory read / write or execute permission in Linux is strictly maintained. Usually user have read permission but to modify the permission level you can just use ‘chmod‘ after gaining root privilege.
chmod a+x filename.ext // OR chmod 755 directory
You may encounter Linux package with extension with ‘.tar’, ‘.tar.gz’ and ‘.tar.bz2’ . These are compressed file extension, which can be uncompressed by ‘tar‘ while ‘gzip‘ will help to compress the file .
tar xvf <filename> // AND gzip <filename>
Did you forgot where is the file you want now. Then ‘find‘ to transverse any specified directory, ‘locate‘ uses it’s updated database and ‘whereis‘ for finding there installed directory.
find <filename> //search in given directory only locate <directory> / <filename> // search given file or directory in whole system whereis <filename> //search and provide location of given filename regardless of extension
7) Understanding commands
One of the most important commands in Linux is ‘man‘. Because it will provide details on how to use with description of commands.
man sudo // OR man clear
8 ) View and stop process
While ‘top‘ will display you the list of process running, ‘kill‘ is used the running process.
top kill <pid>
9) Recall command history
Now this is one of interesting command. It recalls all the commands you have used in console so far. It shows commands used with line number.
10) Copy, move and remove
Copy, move and delete are the basic commands. We use ‘cp‘ for copying, ‘mv‘ for moving and ‘rm‘ for removing file or directory.
cp <filename> /directory1/directory2 mv <filename> /directory1/directory2 rm <filename> rm -r <directory>