Dangerous command in linux.


Linux’s terminal commands are powerful, and  the best part is Linux won’t ask you for confirmation if you run a command that won’t break your system. It’s not uncommon to see trolls online recommending new Linux users run these commands as a joke.

deadly linuxWhat started as a joke could end up being a deadly trap door for them

Here are few of the examples .1. rm -rf / – Deletes Everything!

2. : ( ) {  :  |   : & } ; :-It practically duplicates itself usually known as fork bomb.

3. mkfs.ext4 /dev/sda1 – Formats a Hard Drive.

4. command > /dev/sda – Writes Directly to a Hard Drive.

5. dd if=/dev/random of=/dev/sda – Writes Junk Onto a Hard Drive.

6. mv ~ /dev/null – Moves Your Home Directory to a Black Hole.

7. wget http://example.com/something -O – | sh – Downloads and Runs a Script.

Being said that some commands will only be dangerous if they’re prefixed with sudo on Ubuntu – they won’t work otherwise. On other Linux distributions, most commands must be run as root.

Advertisements

Basics.


Tux, the Linux penguin
Tux, the Linux penguin (Photo credit: Wikipedia)
tcsh and sh shell windows on a Mac OS X desktop..
tcsh and sh shell windows on a Mac OS X desktop.

Linux 

The various flavours of Linux are Ubuntu, Puppy Linux, fedora, etc. are the various flavours of Linux.

As to begin with what exactly is Linux, let’s keep it in a short and simple by saying Linux is a derivative of UNIX.

Which of course was an open source OS.

So what exactly is a Unix OS how does it work and what are its backgrounds as one may ask …no wonder there are many books written in a descriptive manner giving a deep insight about the topic.

Given as a matter of time and discussion no one really has enough time to go through this stuff and make really good use of it .Let alone the point of shortlisting the actual stuff from those that are written for the sake of reading.

Therefore we made the matter short and simple by giving few points to help you get up and running, and yes of course get your facts cleared about the subject.

Brief background on the Linux /Unix OS.

The Unix OS system can be broken down into three main parts

1. The scheduler.

2. The file system.

3.  The shell.

1. The scheduler

The UNIX scheduler is a program that helps in allowing more than one person to use the computer at the same time.

The scheduler helps in sharing every piece of the available resources to different users at a same period of time.For e.g. three users a, b, c are logged into the UNIX system at the same instance of time. The UNIX system will take the respective programs the users wants to run from the system disk, and allocates it to the computer’s memory. In this way the programs are converted to processes.

The scheduler does the work of keeping the processes running in accordance to the time it’s being used, and prioritize it accordingly for computational purposes.

2. The File system

In its simplest form, a file system is a collection of files on a stored device, usually a disk.The file system is further categorised into directories; they are considered as “folders” that keep the things in order …kinda tabbed.

This procedure keeps the things simple for the CPU to search and get the required files.

3. The Shell

The shell is considered as the command interpreter. It’s a program that sits between you and system, forming a shell around the computer, trying to perform various operations depending upon what you type in.

The Shell is user independent, as for every user there is a dedicated shell for it to operate

Top 5 Linux Distros for beginners – 2012


There are plenty of Linux Distros out there but there’s only very few that is truly for beginners. So I have picked 5 distros that suit the category. You might be curious about the factors that I considered when picking the Top 5. Well, out of the box support is very important in picking beginner distros. Other factors include: User friendly UI, easy installation and great online support. The Distros below are well-known for excelling in those areas.

1. Ubuntu 12.04 LTS

Ubuntu is the #1 and the most popular distro out there. Even though Linux Mint appeals more to new users Ubuntu has a rigorous release cycle and tends to have more features implemented in each release. Ubuntu does not come with a load of software and codecs pre-installed like Linux Mint. So new users may have trouble playing certain media formats and may require a few command line installations but due to the excellent community support they can be sorted out within minutes.

EDIT: Ubuntu 12.04 LTS was released in April and I only have great things to say about it. Unity is now VERY stable and polished. There have been significant improvements to the interface since 11.04. So I highly recommend that you try out 12.04 if you have not used unity since 11.04.

http://www.ubuntu.com/

Ubuntu 11.04 review (unity)

2. Linux Mint 13

Linux Mint is known as the second most popular Linux distribution simply because of its user friendliness. It comes with loads of software carefully picked by the team, media codecs and drivers. The distro works so well out of the box you will not be spending any time trouble shooting. The Distro focuses on what is best for its users and provides what the mainstream Linux users demand (most of the time). Linux Mint 13 comes in 2 editions. The Cinnamon edition includes a modern Gnome 3 desktop with a familiar and traditional layout. The MATE edition comes with a Gnome 2 desktop. Compared to the cinnamon edition, the MATE edition is more stable but is quite boring. Cinnamon is a fairly new desktop that is being developed by the mint team.

Linux mint is based on Canonical’s Ubuntu.

How to install faience Gnome-Shell theme and icon theme.

http://www.linuxmint.com/

3. Pin-guy OS 12.04 LTS

Pinguy OS is an Ubuntu based distribution that comes with A LOT of software pre-installed. It is great for users who want to explore the extensive software that Linux has to offer. It is also very convenient because it includes almost all the software that a user may require. Pinguy OS is a fairly new distro but it is gaining popularity quickly. Pinguy OS includes two Docks by default and the overall look of the desktop leans toward OS X. Pinguy OS 12.04 includes a customized gnome-shell.

http://pinguyos.com/

Pinguy OS 11.04 review

4. Zorin OS

Zorin OS is optimized for users who are transitioning From windows. It looks quite similar to Windows 7 and comes with “zorin look changer” that can make your desktop look similar to older Windows versions and Mac OS X. Zorin OS also offers four premium versions (Ultimate, Business, Multimedia, Gaming) which are available upon donating. There is also a free version that does not come with as much software pre-installed.

http://zorin-os.com/

5. Peppermint OS 3

Peppermint OS a very light distro that comes with LXDE desktop environment. LXDE is very simple to use and many will find it to be a straightforward DE. The OS boots up quite fast which makes it ideal for older computers or netbooks. Peppermint OS 3 is based on Lubuntu 12.04. It includes an elegant theme by default and includes media-codecs out of the box.

10 fundamental differences between Linux and Windows…


 

Image representing Microsoft as depicted in Cr...

Tux, the Linux penguin
Tux, the Linux penguin (Photo credit: Wikipedia)

 

#1: Full access vs. no access

 

Having access to the source code is probably the single most significant difference between Linux and Windows. The fact that Linux belongs to the GNU Public License ensures that users (of all sorts) can access (and alter) the code to the very kernel that serves as the foundation of the Linux operating system. You want to peer at the Windows code? Good luck. Unless you are a member of a very select (and elite, to many) group, you will never lay eyes on code making up the Windows operating system.

 

You can look at this from both sides of the fence. Some say giving the public access to the code opens the operating system (and the software that runs on top of it) to malicious developers who will take advantage of any weakness they find. Others say that having full access to the code helps bring about faster improvements and bug fixes to keep those malicious developers from being able to bring the system down. I have, on occasion, dipped into the code of one Linux application or another, and when all was said and done, was happy with the results. Could I have done that with a closed-source Windows application? No.

 

#2: Licensing freedom vs. licensing restrictions

 

Along with access comes the difference between the licenses. I’m sure that every IT professional could go on and on about licensing of PC software. But let’s just look at the key aspect of the licenses (without getting into legalese). With a Linux GPL-licensed operating system, you are free to modify that software and use and even republish or sell it (so long as you make the code available). Also, with the GPL, you can download a single copy of a Linux distribution (or application) and install it on as many machines as you like. With the Microsoft license, you can do none of the above. You are bound to the number of licenses you purchase, so if you purchase 10 licenses, you can legally install that operating system (or application) on only 10 machines.

 

#3: Online peer support vs. paid help-desk support

 

This is one issue where most companies turn their backs on Linux. But it’s really not necessary. With Linux, you have the support of a huge community via forums, online search, and plenty of dedicated Web sites. And of course, if you feel the need, you can purchase support contracts from some of the bigger Linux companies (Red Hat and Novell for instance).

 

However, when you use the peer support inherent in Linux, you do fall prey to time. You could have an issue with something, send out e-mail to a mailing list or post on a forum, and within 10 minutes be flooded with suggestions. Or these suggestions could take hours of days to come in. It seems all up to chance sometimes. Still, generally speaking, most problems with Linux have been encountered and documented. So chances are good you’ll find your solution fairly quickly.

 

On the other side of the coin is support for Windows. Yes, you can go the same route with Microsoft and depend upon your peers for solutions. There are just as many help sites/lists/forums for Windows as there are for Linux. And you can purchase support from Microsoft itself. Most corporate higher-ups easily fall victim to the safety net that having a support contract brings. But most higher-ups haven’t had to depend up on said support contract. Of the various people I know who have used either a Linux paid support contract or a Microsoft paid support contract, I can’t say one was more pleased than the other. This of course begs the question “Why do so many say that Microsoft support is superior to Linux paid support?”

 

#4: Full vs. partial hardware support

 

One issue that is slowly becoming nonexistent is hardware support. Years ago, if you wanted to install Linux on a machine you had to make sure you hand-picked each piece of hardware or your installation would not work 100 percent. I can remember, back in 1997-ish, trying to figure out why I couldn’t get Caldera Linux or Red Hat Linux to see my modem. After much looking around, I found I was the proud owner of a Winmodem. So I had to go out and purchase an US Robotics external modem because that was the one modem I knew would work. This is not so much the case now. You can grab a PC (or laptop) and most likely get one or more Linux distributions to install and work nearly 100 percent. But there are still some exceptions. For instance, hibernate/suspend remains a problem with many laptops, although it has come a long way.

 

With Windows, you know that almost every piece of hardware will work with the operating system. Of course, there are times (and I have experienced this over and over) when you will wind up spending much of the day searching for the correct drivers for that piece of hardware you no longer have the install disk for. But you can go out and buy that 10-cent Ethernet card and know it’ll work on your machine (so long as you have, or can find, the drivers). You also can rest assured that when you purchase that insanely powerful graphics card, you will probably be able to take full advantage of its power.

 

#5: Command line vs. no command line

 

No matter how far the Linux operating system has come and how amazing the desktop environment becomes, the command line will always be an invaluable tool for administration purposes. Nothing will ever replace my favorite text-based editor, ssh, and any given command-line tool. I can’t imagine administering a Linux machine without the command line. But for the end user — not so much. You could use a Linux machine for years and never touch the command line. Same with Windows. You can still use the command line with Windows, but not nearly to the extent as with Linux. And Microsoft tends to obfuscate the command prompt from users. Without going to Run and entering cmd (or command, or whichever it is these days), the user won’t even know the command-line tool exists. And if a user does get the Windows command line up and running, how useful is it really?

 

#6: Centralized vs. decentralized application installation

 

The heading for this point might have thrown you for a loop. But let’s think about this for a second. With Linux you have (with nearly every distribution) a centralized location where you can search for, add, or remove software. I’m talking about package management systems, such as Synaptic. With Synaptic, you can open up one tool, search for an application (or group of applications), and install that application without having to do any Web searching (or purchasing).

 

Windows has nothing like this. With Windows, you must know where to find the software you want to install, download the software (or put the CD into your machine), and run setup.exe or install.exe with a simple double-click. For many years, it was thought that installing applications on Windows was far easier than on Linux. And for many years, that thought was right on target. Not so much now. Installation under Linux is simple, painless, and centralized.

 

#7: Flexibility vs. rigidity

 

I always compare Linux (especially the desktop) and Windows to a room where the floor and ceiling are either movable or not. With Linux, you have a room where the floor and ceiling can be raised or lowered, at will, as high or low as you want to make them. With Windows, that floor and ceiling are immovable. You can’t go further than Microsoft has deemed it necessary to go.

 

Take, for instance, the desktop. Unless you are willing to pay for and install a third-party application that can alter the desktop appearance, with Windows you are stuck with what Microsoft has declared is the ideal desktop for you. With Linux, you can pretty much make your desktop look and feel exactly how you want/need. You can have as much or as little on your desktop as you want. From simple flat Fluxbox to a full-blown 3D Capiz experience, the Linux desktop is as flexible an environment as there is on a computer.

 

#8: Fanboys vs. corporate types

 

I wanted to add this because even though Linux has reached well beyond its school-project roots, Linux users tend to be soapbox-dwelling fanatics who are quick to spout off about why you should be choosing Linux over Windows. I am guilty of this on a daily basis (I try hard to recruit new fanboys/girls), and it’s a badge I wear proudly. Of course, this is seen as less than professional by some. After all, why would something worthy of a corporate environment have or need cheerleaders? Shouldn’t the software sell itself? Because of the open source nature of Linux, it has to make do without the help of the marketing budgets and deep pockets of Microsoft. With that comes the need for fans to help spread the word. And word of mouth is the best friend of Linux.

 

Some see the fanaticism as the same college-level hoorah that keeps Linux in the basements for LUG meetings and science projects. But I beg to differ. Another company, thanks to the phenomenon of a simple music player and phone, has fallen into the same fan-boy fanaticism, and yet that company’s image has not been besmirched because of that fanaticism. Windows does not have these same fans. Instead, Windows has a league of paper-certified administrators who believe the hype when they hear the misrepresented market share numbers reassuring them they will be employable until the end of time.

 

#9: Automated vs. nonautomated removable media

 

I remember the days of old when you had to mount your floppy to use it and unmount it to remove it. Well, those times are drawing to a close — but not completely. One issue that plagues new Linux users is how removable media is used. The idea of having to manually “mount” a CD drive to access the contents of a CD is completely foreign to new users. There is a reason this is the way it is. Because Linux has always been a multiuser platform, it was thought that forcing a user to mount a media to use it would keep the user’s files from being overwritten by another user. Think about it: On a multiuser system, if everyone had instant access to a disk that had been inserted, what would stop them from deleting or overwriting a file you had just added to the media? Things have now evolved to the point where Linux subsystems are set up so that you can use a removable device in the same way you use them in Windows. But it’s not the norm. And besides, who doesn’t want to manually edit the /etc/fstab fle?

 

#10: Multilayered run levels vs. a single-layered run level

 

I couldn’t figure out how best to title this point, so I went with a description. What I’m talking about is Linux’ inherent ability to stop at different run levels. With this, you can work from either the command line (run level 3) or the GUI (run level 5). This can really save your socks when X Windows is fubared and you need to figure out the problem. You can do this by booting into run level 3, logging in as root, and finding/fixing the problem.

 

With Windows, you’re lucky to get to a command line via safe mode — and then you may or may not have the tools you need to fix the problem. In Linux, even in run level 3, you can still get and install a tool to help you out (hello apt-get install APPLICATION via the command line). Having different run levels is helpful in another way. Say the machine in question is a Web or mail server. You want to give it all the memory you have, so you don’t want the machine to boot into run level 5. However, there are times when you do want the GUI for administrative purposes (even though you can fully administer a Linux server from the command line). Because you can run the startxcommand from the command line at run level 3, you can still start-up X Windows and have your GUI as well. With Windows, you are stuck at the Graphical run level unless you hit a serious problem.

 

Your call…