A Complete Beginner’s Guide To Hacking: Operating Systems

This post is part of the series A Complete Beginner’s Guide To Hacking

Why it matters

Different Operating Systems (OSs) are suited to very different things in programming – the differences between are much more significant than when using them for other applications. Therefore it is very important to be aware of the main differences between them and what your options actually are. Below are a few notes of importance on the 3 main systems – Windows, Linux, and Apple – this is of course nowhere near complete information, but just some notes to help you understand. What OS is preferable is a very controversial topic and they all have dedicated fans around the world who will argue passionately for their opinions on the matter. I recommend further research on your own – whether asking around in person or online communities to see what it is relevant to your case.

Ultimately the decision is up to you but it is important to at least understand that there are significant differences and before starting to write any code you should identify whether or not you are doing it in the ‘ideal’ context or not.

Windows

  • Less support available for developers working in Windows – the Command Line Interface uses a different language to others, and the versions of programs and packages you use will be rarely made or supported for Windows for example.
  • Lots of environment settings have to be changed in order to allow your programs access to the internet in order to use things like web APIs.
  • It is becoming increasingly common for new “internet of things” software to use internet connected objects to focus on development or hacking in Windows as they are designed to try and appeal to new hackers who will commonly have this as their default OS
  • Efforts are being made to make it more hacker friendly.

Linux

  • Linux isn’t actually one operating system, it’s the name for a whole, huge range of them although the most common (and easiest for beginners) is probably Ubuntu and Fedora
  • They are all open source – that means that they aren’t owned privately and made and sold for profit like Windows or Apple but instead are run by not-for-profit organisations who allow anyone to edit and work on them – this means that they are made by developers for developers and if you find a problem then there are dedicated, voluntary communities out there who work through them. This probably makes the Linux systems the friendliest for hackers.
  • Most computers don’t come with it pre-installed and so you will have to carry out installation yourself which can be a bit messy (see Virtual Machines and Partitioning later in this post)

Apple

  • Like Linux, Apple is much more friendly to developers than Windows, although unlike Linux it isn’t open source. It still has large communities dedicated to developer support but if there is a bug in the system then people are reliant upon Apple to release updates to fix it.
  • It has the obvious downside of costing a lot of money and reliancy upon buying the relevant Mac computers – and once you have that you are then stuck inside and reliant upon the closed system which can escalate in costs. But this is obviously not such a big problem if you are already using a Mac anyway.

So when you know what OS you have and, what its limits are and what you need – you then need to decide what to do about it. You may be happy with the OS you are already using but you may also want to use a different one – you do not necessarily need to buy a new computer or replace your old OS to do this. Instead, you can use Virtual Machines (VMs) or partitioning.

Virtual Machines

This is when you run a software inside your OS that runs another OS inside it. The software pretends it is another computer inside your existing computer.

When you run the software it will open up a blank computer that you will have to install or run an OS in. You can do this by either saving an OS on a disk (good old CD-ROMs are still around) or on a flash drive – they take up a lot of memory so make sure to leave enough time to both download and install these, it isn’t something to try and do in a hurry.

When you are then running an OS inside your VM it will look like you have a 2nd desktop inside your original desktop. However, those 2 different screens cannot see each other and will behave completely independently as if they are separate computers. This means if you save something in one then you cannot access it in the other without sharing it online back and forth between the two. This also includes software – your new VM will need to have all your necessary software installed into it separately, doesn’t matter if it’s already on your original OS.

Additionally you will find that running VMs will make everything slower – they are very large pieces of software. When you start up your VM you can decide how much memory it can “borrow” off of your original OS for running and saving things into – depending on the settings, generally when you shut that VM down then it will be returned to the original OS.

The most common free Virtual Machine is Virtual Box but there are others out there for free too, and sometimes it can be worthwhile paying for those like VMWare – it will depend on case by case, research and ask around for what is best in your specific situation.

Partitioning

So when you start up your computer you will probably find that you are loading up your default OS on the one drive of your hard disk (different OSs call their drives different names e.g. C: in Windows). However you can split the disk into more drives and load different OSs onto them – this is called partitioning.

There are two very important things to know about doing this – firstly your overall hard drive space is limited by your computer’s technical specifications, you are not inventing new space out of nowhere, instead you have to decide how much you are going to take away from your existing OS in order to give over to a new one. The less space one has, the slower things will run and the less memory you have to save things onto. The different OSs cannot “see” each other and do not share the same memory space – they are treated as if they are different computers but unlike a VM you cannot even see them both simultaneously – you will have to restart your computer every time you want to switch over.

Secondly, partitioning can be very messy. With a VM you can treat it a bit like running any other software – if it goes wrong then all you’ve lost is whatever was in the VM but the rest of your computer is generally all good. With partitioning you are playing around with your whole computer and risk damaging or losing things inside either or both operating systems – it is recommended to back up everything possible before doing this just in case.

The major benefits are of course being able to run both OSs more efficiently and quickly than if using VMs – you aren’t using loads of space running the actual VM software. This is not always the best option for complete beginners if they are just learning to use basic code but can sometimes be a necessity if you are needing to frequently use the benefits of multiple OSs – it is sometimes better to partition and become familiar with your new OS than wait until you really have to use it.

How To Partition

This isn’t as easy as just installing a VM software and running through it – there are loads of different ways to partition. It depends hugely upon the specifics of the situation.

The OSs that you want will have packages called installers that setup the OS. As with VMs you will download them onto a disc and then switch your computer off and start it back up with the disc inside. This is because if it saved into a file inside your exisiting OS then you cannot reach it when starting up outside that OS where you want to put your new one.

Often you will find that lots of Linux distributions have step by step guides that will walk you through the process and arrange the partitioning process itself for you. If you find that doesn’t work for you then you can manually partition the space using tools such as GParted – a good intro to that here.

So bootloaders are programs that load the OS when the device is switched on. You will then need to manually make sure the bootloaders load into the new partitioned space.

Windows doesn’t design its systems for multibooting and so doesn’t provide a separate bootloader – if you try and install Linux into a manually partitioned space on a Windows machine then the automatic Windows start up will just ignore the existence of the Linux OS.

However most Linux systems happily have bootloaders so if you are looking to use Linux as one of your OSs then you can install one of these – if using Windows also then just put that in the first, or primary, partition. Most commonly Linux bootloaders are based around the GRUB bootloader so look into them first as there is a lot of support for them

Apple systems generally come with Apple Boot Camp that safely allows you to partition and even put Windows in as well as Linux.

Mount points are the directories (folders) that the new systems are allocated to and if you are manually partitioning then you will need to understand and specify this. How the files and directories are described depend on the OS – for example in Windows you might say “C:\Users” but in Linux “\home” so be aware of this!

Then finally you can restart your computer with the relevant OS on a disc and try the installer in the manually created partition.

Unfortunately there are so many variables involved with doing this that you may find it will take several attempts to get fully working partitions and even then you will have to be careful of things like updates to the OSs that can throw things off kilter later on.

NEXT: Writing Code

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s