Basic Linux Commands

Hello, friends. before we start using Linux (Ubuntu,Lubuntu or any other Linux flavor) it is very important that to discus some of the command which are to be used in Linux. So here, are some of the very common and useful Linux commands which will help you to manage the Linux/DSpace/Koha etc effectively. which are very very essential to know, because while operating any Linux OS, we require some of the commands.

First and far most you have to know where these command has to be executed after installing Linux. we have to start  terminal where we execute all commands in Linux. To start terminal you can either

 Go to ---->Main menu--->Terminal OR simply press the keys together

 Ctrl+Alt+T ---> Terminal

NB: All the commands are executed in small letters, unless and until it is given in capital letters.

When you start terminal you may see a window like this

mahesh@mahesh-Lenovo-v110-151KB:~$ (Yours will be different) Here we have to execute commands first we have to come to root for that we use 
1) sudo su 

mahesh@mahesh-Lenovo-v110-151KB:~$ sudo su
(It will ask password provide your system password) then you will reach at

root@mahesh-Lenovo-V110-15IKB:/home/mahesh# 
you are now in root. having admin power or you have all privileges

2) clear  It will clear all the data from the screen not deleting any file.

root@mahesh-Lenovo-V110-15IKB:/home/mahesh# clear

3) ls  :List It will show all the files and directories inside the directories

root@mahesh-Lenovo-V110-15IKB:/home/mahesh# ls
Desktop  Documents  Downloads  examples.desktop  header.png  Music  Pictures  Public  Templates  Videos
  4) man : It will show manual. sometime you don't know what to do. you can see manual by this command

root@mahesh-Lenovo-V110-15IKB:/home/mahesh# man
What manual page do you want? (It shows this message)

5) pwd :To know in which directory you are currently working

 root@mahesh-Lenovo-V110-15IKB:/home/mahesh# pwd
/home/mahesh (It will show like this)

6) cd : To change dierectory. suppose I want to go to Downloads directory I will execute like this

root@mahesh-Lenovo-V110-15IKB:/home/mahesh# cd Downloads

root@mahesh-Lenovo-V110-15IKB:/home/mahesh/Downloads# (you will reach at Downloads directory) 
 
7) cd ..      To go back to the previous directory
  
root@mahesh-Lenovo-V110-15IKB:/home/mahesh/Downloads# cd ..

root@mahesh-Lenovo-V110-15IKB:/home/mahesh# (you will reach at mahesh dierectory again)

8) mkdir : To make a directory (suppose i want to create a directory called ilibrarian, simply execute cmd like this)
  
root@mahesh-Lenovo-V110-15IKB:/home/mahesh# mkdir /ilibrarian
(It will create directory but will not show unless you see with cmd)

9) cp  : To copy ( if you want to copy any file into a  directory we use this cmd)

root@mahesh-Lenovo-V110-15IKB:/home/mahesh# cp header.png /usr/share/koha/opac/htdocs/opac-tmpl/bootstrap/images 

(here I am copying an image named header.png to the /usr/share/koha/opac/htdocs/opac-tmpl/bootstrap/images)

10) mv  : To move ( if you want to copy any file into a directory we use this cmd)

root@mahesh-Lenovo-V110-15IKB:/home/mahesh# mv header.png /usr/share/koha/opac/htdocs/opac-tmpl/bootstrap/images 

(here I am moving an image named header.png to the /usr/share/koha/opac/htdocs/opac-tmpl/bootstrap/images)

11) rm  : To remove ( if you want to remove any file into a directory we use this cmd)

root@mahesh-Lenovo-V110-15IKB:/home/mahesh# rm header.png /usr/share/koha/opac/htdocs/opac-tmpl/bootstrap/images

(here I am removing an image named header.png to the /usr/share/koha/opac/htdocs/opac-tmpl/bootstrap/images)

12) rm -r -f /mahesh : (Delete entire directory)
                OR
      rm mahesh -R

13) apt-get install  : To install packages

14) wget   : To download packages

15) chmod  : To change permission

root@mahesh-Lenovo-V110-15IKB:/home/mahesh# chmod 777 /mahesh

(777 is a permission that gives full privileges )

16) reboot   : To restart system
      OR
      init 6 

 Thank You.......
 
Reference:

0 Komentar