base command of linux



 

i m very happy and honor to tell you sth about linux shell,linux shell is easy to learn ,

      as a beginner,you just need to know these commands as below:

      

 ls 

 ls -l

 ls -a

 cd mydir

 cd ..

 whoami

 cd ../..

 cd ../../..

 cd ~/love/you/

 mkdir mydir

 touch myfile.txt

 pwd 



 

to extend this,please know:

 

ls :    list the files and directories under current directory;

 

ls -l : list the files and directories under current directory,and show more infomations

        about them,such as created time,size,etc...        

        

ls -a : list all the files and directories under current directory,include those hidden files 

        and directories,you know ,just as windows,some files and directories are hiddened in linux

 

cd mydirName: it means in current directory,there must be a directory named "mydir",

              if you want to open it ,use this command.

              and if no directory named "mydir" ,the linux terminal will tell you some infomations

              on the screen,such as below:

              wow,there are no such a directory.maybe you input a error name,plese check...

 

cd .. : if you want to go to the father directory of the current directory,use this ,for exeample,

        if you are located in ~/01/02/03 now,and you want to go to ~/01/02,then you use this command. 

        may be you have a question is that what is the "~" means,actually it is a path of current user,

        because a computer can have many users,and they have there own account,but they have the same 

        top path , that is "/home",we can not miss the "/",because it is the root,just like a root

        of a tree,every path's t highest father is the "/",we use the /home/username to show the 

        path of a user,such as "/home/tom","/home/baby","/home/jerry8801","/home/imthemosthandsome", 

        and "~" is the abbreviation of them , instead of the very long path,"~" is  more easy to use; 

        for example, if current user is tom,so "~" means "/home/tom" or "/home/tom/",

        the last "/" in linux shell may or may not exist,there are no difference. 

        

whoami: it means who am i ,the command tell you who is the current user.

 

cd ../.. : go to father's father's directory

 

cd ../../..:go to father's father's father's directory

 

cd ~/love/you/: if current user is tom ,so the command means open the path of "/home/tom/love/you" 

 

mkdir mydir: make a new directory named "mydir" ,for example,mkdir mimi,mkdir pp.kk,mkdir du999,

             mkdir pp.kk will make a directory named "pp.kk",its not a file ,but a directory,

             you can use "cd pp.kk" to enter the directory.

 

touch  myfile.txt: make a new file mamed "myfile.txt",of course ,any file suffix name is ok,

                   for example,touch my.txt,touch you.h ,touch baby.kk,touch lulu.lala,

                   touch iloveyou.py,touch 10087.cpp,touch hello.c ,etc...

 

pwd: show the current path where you are  located in now ,for example,if you are in ~/i/love/you ,

     and when you input the command and press enter,the terminal will return some info to you

     as below:

     /home/baby/i/love/you

    


 

of course,dont forget to press enter after input any command in the linux shell,

when you press enter,the comuputer will run your command,if you dont press enter ,

the computer will wait for 2000 years.

and what is "linux shell",or what is "terminal",ok ,it is a playground which not only

afford you a place to input your command,but also return command results to you.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值