Thursday, May 26, 2016

Introduction To Basic Terminal Commands For Linux


In this tutorial you will lrn to uselinux terminal. You will lrn to navigate on theterminal, lrn to crte andremove filnd much more. Most of this commands also works onMac Os Xand powershell on .
What Is Terminal ?Basically you are rding this tutorial because you are new to linux or want to lrn using terminal to navigate. Before youget startedyou must have linuxinstalledorrunningvirtually on your computer. I would recommenddownloadingfedora or ubuntu (If you have trouble installing ubuntu lve a comment below and i will post a tutorial).
Commands To RememberThis are some of commands you must remember which will help you to use terminal more sily.
ls- it will list all files and folder in yourcurrent directory
ls -lit will give detailtlisting ofall files and folders
ls -ait will list all files and folder in your current directory including hidden files (files and folders that begin with period)
pwdwill print your working directory or simply your current directory
Navigating In TerminalHere i may refer folder as directory so dont get confused. This is the term we use in linux for folders.

- stands for change directory. we use follow by path address to navigate ro that folder.
Eg: Desktopwill makedesktopas my current directory.
/will make root as you current directory
~will make home as your current directory
Typing alone is same as ~ and it will make home as your current directory
..will makeparent directoryi.e directory above your current directory
../../will take you two folder up
Crting Files And Foldermkdir- we use mkdir follow by path or folder name to crte a directory
Eg mkdir car will crte directory car in your current directory
to crte folder recursively i.e folder inside folder inside folder we use -p flag
Egmkdir -pvehicles/car/truck will crte directory vehicles in your current directory which have car inside it and car has directorytruckin it.

touch - we use touch follow by file name to crte empty file.
Removing Files And Foldersrmdir- we use rmdir follow by path to to remove any directory. This will not work if folder you are trying to remove has something in it.
rm -rto remove file recursively which can not be removed by rmdir
rm- We use this command toremove filesFeedbackI guess thats enough for today. I know this is little confusing but practice and you will be a terminal pro. Lve a comment below if you have any trouble. You may also like to rd below articles.

No comments:

Post a Comment