Search This Blog

  • ()
  • ()
Show more
HomeTutorials

Linux Commands Explained

Linux Commands Explained There are many different commands you can enter to configure and interact with linux. These commands can be entered...

Linux Commands Explained
There are many different commands you can enter to configure and interact with linux.
These commands can be entered at the shell prompt, or command (line) prompt. If you use linux with a GUI, look for the shell program icon. If you have no GUI installed you should be looking at the prompt, and if you log in remotely you will be at the prompt.

There are two types of commands, shell commands and linux commands.

Shell Commands
Shell commands are part of the shell program. There are several different shells (C shell, bash shell, bourne shell etc) to choose from, and each will have a variation of the shell commands built in. The commands vary between shells, but each shell is the same across different linux distros.

Linux Commands
Linux commands are not part of the shell. Each one is a seperate executable program, probably written in the C programming language.
These executables are stored in various directories set up for binary files, such as /bin and /usr/bin. The location of these directories can be defined with the $PATH variable so the shells know where to find them. These commands vary between different linux distrubutions, and remain the same whichever shell you are using.

The Command Prompt
What your prompt looks like will depend on the shell you use (bash, borne, csh etc), and the settings you have for that shell.
I use a bash shell, and have the prompt set up to look like this......

[root@cirrus home]#
This shows me I am logged in as root, to the computer called cirrus, and I am in a folder called home.
TIP: To see the full path of the folder 'home', use the pwd command.

Your prompt is bound to look different, so for the purpose of this section I will just use the > to represent the prompt.

>
Linux Commands
Some linux commands are very simple and need nothing more than the command itself.

For example the command ls (list) will simply list the names of the directories and files in the current directory...

>ls
files/
images/
index.txt
>
In this instance ls shows there are two directories, called files and images, and a text file called index.

However you can often add options or parameters, which are usually added to the command after a '-'.

Adding the option -l will give you a long listing which includes the permissions, ownership, size, date/time, and name of the files and directories...

>ls -l
drwx------ 2 bob bob 4096 Aug 22 10:31 files/
drwx------ 3 bob bob 4096 Mar 19 11:17 images/
-rwx------ 1 bob bob 284 Mar 18 10:23 index.txt
>
Another example would be adding -a (ls -a) to list ALL the files in the current directory, including hidden files.
>ls -a
.hiddenfile
files/
images/
index.txt
>
This shows there is a hidden file (hidden files have a '.' before the filename) called '.hiddenfile', as well as the two directories and index file.

You can use more that one option at a time...

>ls -la would produce a long listing format of ALL (including hidden) directories and files in the current working directory.

There are many options for some linux commands, and the best place to find out about then all is the 'man' pages. These man pages show you how to format the command, and what options and parameters there are to use with each command.

Below is a list of commonly used commands with explanations aimed at Linux command prompt beginners.

Command
Description
cd Change directory
locate Find files
ls List information about file(s)
pwd Print Working Directory
Name

apple,2,Article,14,At home,13,Author,14,Beauty,1,Biography,2,blackberry,1,Business,6,Cars,5,Celebrity,13,conspiraci,15,Fashion,5,galaxy,1,Gallery,1,Games,11,google,1,Hair,1,Health amp; Fitness,2,Histori,11,Home,169,HOSTING,27,HTML,7,imac,1,Image,1,iphone,1,Itcyber,7,Kuran,31,Lajme,34,Life amp; Love,1,Makeup amp; Skincare,1,mobile,5,monitor,1,Movies,2,News,5,No category,5,Photography,6,PHP,30,Poezi,24,POEZI amp; TEKSTE,2,Post,14,PROGRAMMIM,46,Relationships,1,review,6,samsung,1,Seo,7,Softvare,4,Sport,5,Sports,7,Stars,5,Tag,7,Tags,7,Tech,30,Teknologji,37,THEMES,3,Tutorials,191,Video,47,Videos,4,Vip News,2,Webhosting,67,WordPress,7,World,13,
ltr
item
Cr337: Linux Commands Explained
Linux Commands Explained
Cr337
https://cr337.blogspot.com/2016/03/linux-commands-explained.html
https://cr337.blogspot.com/
http://cr337.blogspot.com/
http://cr337.blogspot.com/2016/03/linux-commands-explained.html
true
5516280490839897951
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS CONTENT IS PREMIUM Please share to unlock Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy