Wednesday, February 12, 2014

15 Popular Linux Commands with Examples

No comments:


In this tuturial i will present you my absolute top 15 linux commands.

As an addition to the wonderfull tutorial of Justin http://community.linuxmint.com/tutorial/view/100

will this tutorial introduce totally new command's. The reason: Because knowing these commands will make your life a whole lot easier!

I am also showing examples on how to use the command as well.

Let's get started!

-------------------------------------------------------------------------------------------------------------------------------------------------

# 1: cd

The "Change Directory" command enables you to navigate to another directory.

The cd command is THE most important command there is in linux i think. As the command suggests, it enables the user to change / jump to a directory.

Example: cd Downloads
Example: cd /etc/
Example: cd .. (Directory up!)


note: Afther you have typed cd and entering the first or two letters of the directory you can press the TAB key to autocomplete the directory! so... cd  Do (press tabkey) will autocomplete it to Downloads. i use this a lot <-- p="">
#2: man

The man command shows the users the "manual" of the command. In some situation you might need to get more information about the command you are using. The man command shows you this information about the command.

Example: man cp

This will open up the "cp" manual document for us in the shell. The manual shows us the parameters available for the commands.

note: To close the manual simply press "Q".



#3: ls

In the absolute top 15 there's no way the ls command is missing. On the third place, the ls command. The ls command is used to list the files/directories within a directory.

Example: ls

It shows us the directories available.



#4: cp

The cp command is available for us to "Copy" things. This might be usefull for duplicating files f.e.

Example: cp file file2

note: file is on this case the file the user wants to be copied... file2 is the name of the copied file. It's that simple.



#5 mv

The mv command is used for "Move" operations. The mv commands enables the users to move a file/directory to a specified location.

Example: mv /home/bas/Desktop/bla /home/bas/Desktop/fiets


note: the first part of the command is the file that has to be moved. The second part (after the whitespace) is the target directory. Make sure you type in the full path using this command!



#6 mkdir

This command is used to "make" directories, NOT Files.. (thit is possible with another command which i will bring up later in this tutorial)

Example: mkdir testdirectory

note: The name of the directory is case sensitive which means that Testdirectory is a complete different directory as testdirectory.



#7 rmdir

When you are able to make directories, you also want to know how to remove them. Removing directories is done by the rmdir command and belongs to the absolute basic commands in shell bashing.

Example: rmdir fiets

note: When the directory is not empty the command will prompt an error message:

rmdir: failed to remove `fiets': Directory not empty


So make sure it's completely empty before removing it.



#8 touch

Now we know how to make directories and deleting them, i now want to use the touch command. The touch command is used to make files.

Example: touch vogel

This will create the file vogel for us in the directory.



#9 rm

The rm command stand for remove. The rm command is used in order the delete files instead of directories.

Example: rm vogel

note: To remove files you must have the right permission bits set on the specific file.



#10 tar

Sometimes you have to archive files. Archiving files is a way to pack a set of files to one single file. The operation is done by the tar command.

Example: tar -cvf test.tar test (Creating a tar file from directory or file test)

Example: tar -xvf test.tar myexctractfolder (Extracts the particular tar file in the current working directory)

In the example i used parameters. These parameters are telling the tar command how to behave and how to execute.  After the parameters i entered the name of the file which is test.tar. The second part is the source directory/file of the tar file. In this situation a directory called test.



#11 pwd

Sometimes you really wonder where you are in the system. PWD is the solution for that problem.

PWD stands for Path Working Directory.

Example: pwd



#12 ifconfig

ifconfig is a command showing you information about the ethernet adapters on your system. It contains very usefull information like gateway, ip,  and packet statistics. For the average user this command is rarely used, but i think it's worth knowing it.

Example: ifconfig

note: To gain information about the wireless adapters on your system type iwconfig.



#13 locate

Locate is an extremely fast seaching command. It shows the directories or files each on a new line.

Example: locate syslog

Example: locate syslog | more (Piping structure used to invert the data from locate to the more command)

note: Some keywords returns enormous ammounts of hits. Use MORE to  (see example)  clear things up a bit.



#14 ping

Ping is used as a network diagnostic command by professionals. Ping offers information about the network we are on and if the other system responds to us. In cases of troubleshooting network related problems, ping can do a great job to determine the domain of the problem.

Example: ping www.google.com

The command returns the interval and % of loss during the test.

note: You can stop ping bij pressing crtl-c at the same time.



#15 chmod

The chmod command. The chmod command comes from "Change Mode" back to the unix times. It's a great command to restrict access to directories or files. But before i show you an example on how to use it, some theory.

Chmod is qiet an advanced command to use. So therefore you really need to understand how it works.
chmod works with so called persmission bits. These bits can be set to a certain level of restrictions.

We have the following bits available:

7 full
6 read and write
5 read and execute
4 read only
3 write and execute
2 write only
1 execute only
0 none
source: http://en.wikipedia.org/wiki/Chmod



The bits shown above are the permissions for a particular group or class.

Files or directories contain four classes:

1st: The owner itself
2nd: Member of the file group
3rd: Others
4th: All of the above

To set the right permission bits the a particular group or class it is very important to select to right amount of permission bits.

for example, i will create a file and protect this file for being modified by anyone else besides me. Also will i protect the file for being deleted.

This is how i do it: chmod 400 mijndagboek

In this command i gave up the 4 bit in the "members of the group" 0 to others and 0 to all.

Now not even me is able to delete the file anymore without using the sudo command.

But.. there is more. The classes i talked about earlier are devided into three seperate like actions.. those are:

Read
Write
Execute
In order to add very specific restrictions to a file or folder you can use a trick to do that. I will show you how.

If we want to restrict access to a file without knowing the exact bit number we can do the following.

RWX = 7 Which is the permission bit of Read, Write, and Execture together.

Seperating these bits gives us the following values individually:

Read = 4 bits.
Write = 2 bits.
Exec = 1 bit.


So we have 3 groups to take care of (the first group which is the owner is optional in chmod)

[membersgroupbit],[others],[alloftheabove]

if we want to give everyone, and i mean everyone access to the directory i can do:

chmod 777 mijndagboek

[read=4+Write=2+Execute=1=7],[read=4+Write=2+Execute=1=7],[read=4+Write=2+Execute=1=7]

This is not good!

We want to restrict the access for the file offcourse so a better chmod would be:

chmod 700

[read=4+Write=2+Execute=1],[0][0]



--------------------------------------------------------------------------------------------------------------------

This is the end of the top 15 i made for you. I hope you enjoyed it, and hopefully even learned something as well.

i wish you all good luck mastering linux.


Gsv Pics |Gsv Vids | Techno zip| Divine Thought | For The Sake of Us | Gsv Films |Admin YouTube Videos

Tuesday, February 4, 2014

Satya Nadella CEO-Microsoft- Email to Employees

No comments:

Today is a very humbling day for me. It reminds me of my very first day at Microsoft, 22 years ago. Like you, I had a choice about where to come to work. I came here because I believed Microsoft was the best company in the world. I saw then how clearly we empower people to do magical things with our creations and ultimately make the world a better place. I knew there was no better company to join if I wanted to make a difference. This is the very same inspiration that continues to drive me today.

It is an incredible honor for me to lead and serve this great company of ours. Steve and Bill have taken it from an idea to one of the greatest and most universally admired companies in the world. I’ve been fortunate to work closely with both Bill and Steve in my different roles at Microsoft, and as I step in as CEO, I’ve asked Bill to devote additional time to the company, focused on technology and products. I’m also looking forward to working with John Thompson as our new Chairman of the Board.

While we have seen great success, we are hungry to do more. Our industry does not respect tradition — it only respects innovation. This is a critical time for the industry and for Microsoft. Make no mistake, we are headed for greater places — as technology evolves and we evolve with and ahead of it. Our job is to ensure that Microsoft thrives in a mobile and cloud-first world.

As we start a new phase of our journey together, I wanted to share some background on myself and what inspires and motivates me.

Who am I?

I am 46. I’ve been married for 22 years and we have 3 kids. And like anyone else, a lot of what I do and how I think has been shaped by my family and my overall life experiences. Many who know me say I am also defined by my curiosity and thirst for learning. I buy more books than I can finish. I sign up for more online courses than I can complete. I fundamentally believe that if you are not learning new things, you stop doing great and useful things. So family, curiosity and hunger for knowledge all define me.

Why am I here?

I am here for the same reason I think most people join Microsoft — to change the world through technology that empowers people to do amazing things. I know it can sound hyperbolic — and yet it’s true. We have done it, we’re doing it today, and we are the team that will do it again.

I believe over the next decade computing will become even more ubiquitous and intelligence will become ambient. The coevolution of software and new hardware form factors will intermediate and digitize — many of the things we do and experience in business, life and our world. This will be made possible by an ever-growing network of connected devices, incredible computing capacity from the cloud, insights from big data, and intelligence from machine learning.

This is a software-powered world.

It will better connect us to our friends and families and help us see, express, and share our world in ways never before possible. It will enable businesses to engage customers in more meaningful ways.

I am here because we have unparalleled capability to make an impact.

Why are we here?

In our early history, our mission was about the PC on every desk and home, a goal we have mostly achieved in the developed world. Today we’re focused on a broader range of devices. While the deal is not yet complete, we will welcome to our family Nokia devices and services and the new mobile capabilities they bring us.

As we look forward, we must zero in on what Microsoft can uniquely contribute to the world. The opportunity ahead will require us to reimagine a lot of what we have done in the past for a mobile and cloud-first world, and do new things.

We are the only ones who can harness the power of software and deliver it through devices and services that truly empower every individual and every organization. We are the only company with history and continued focus in building platforms and ecosystems that create broad opportunity.

Qi Lu captured it well in a recent meeting when he said that Microsoft uniquely empowers people to "do more." This doesn’t mean that we need to do more things, but that the work we do empowers the world to do more of what they care about — get stuff done, have fun, communicate and accomplish great things. This is the core of who we are, and driving this core value in all that we do — be it the cloud or device experiences — is why we are here.

What do we do next?

To paraphrase a quote from Oscar Wilde — we need to believe in the impossible and remove the improbable.

This starts with clarity of purpose and sense of mission that will lead us to imagine the impossible and deliver it. We need to prioritize innovation that is centered on our core value of empowering users and organizations to “do more.” We have picked a set of high-value activities as part of our One Microsoft strategy. And with every service and device launch going forward we need to bring more innovation to bear around these scenarios.

Next, every one of us needs to do our best work, lead and help drive cultural change. We sometimes underestimate what we each can do to make things happen and overestimate what others need to do to move us forward. We must change this.

Finally, I truly believe that each of us must find meaning in our work. The best work happens when you know that it's not just work, but something that will improve other people's lives. This is the opportunity that drives each of us at this company.

Many companies aspire to change the world. But very few have all the elements required: talent, resources, and perseverance. Microsoft has proven that it has all three in abundance. And as the new CEO, I can’t ask for a better foundation.

Let’s build on this foundation together.

Satya

Gsv Pics |Gsv Vids | Techno zip| Divine Thought | For The Sake of Us | Gsv Films |Admin YouTube Videos

Recent Posts