Best intro to Linux?

  • Thread starter Thread starter APM
  • Start date Start date

APM

APM

Associate
Joined
9 Nov 2011
Posts
1,460
Location
Wales
So I have my VM set up and I'm going to install a Linux image today.

I am a total beginner and I want to gain employable skills in a Linux/Unix environment.

I hear Fedora is a good place to start as it is an introduction to Red Hat.

I am not time limited nor do I have any great urges to conquer the world nor save humanity from mediocrity etc.

I just want a good place to start in the world of Linux so I can play about at my leisure and maybe learn something that could be useful to someone else down the line too.

Thanks
 
Thanks,

could you enlarge on that a bit please?

I should also add that I'm considering moving away from Windows totally and having a permanent Linux OS for my regular home set up too.

Can't say I like what I hear about the new and improved Windows 10.

From what I can gather Mint is a good distro for that.
 
If you want employable skills using Linux then don't practice on Fedora.. It just isn't used in production environments.

Another +1 for CentOS :)

Can't comment on desktop as I only use Windows for desktop purposes.
 
CentOS is basically RHEL debranded so things on there are identical to RHEL in the majority of cases. I wouldn't run it as a home desktop though as it is aimed more as a enterprise server OS and emphasizes stability over being a good desktop experience.

For a home desktop use something like Mint.

These are two very different requirements ... really run a desktop and then put CentOS in a VM to learn from (also noting that CentOS 6 and 7 (and the equivalent RHELs) are very different beasts)
 
Just remember that learning desktop linux skills doesn't necessarily gain you linux employability.

I would first get you to concentrate on understanding the core linux bases concentrating on Debian / RedHat in the first instance

ie dpkg (debian) / rpm (redhat) package management
https://en.wikipedia.org/wiki/List_of_software_package_management_systems#Linux_distributions

https://en.wikipedia.org/wiki/List_...s#/media/File:Linux_Distribution_Timeline.svg

https://en.wikipedia.org/wiki/List_of_Linux_distributions

Let's take Linux mint as an example which is a derivative of Ubuntu and Ubuntu itself is based on Debian. So what is Linux mint ? It's ultimately debian based ie has dpkg management. If you know how debian works you'll know how all the derivatives work.

I would also install mint as your daily desktop driver and start getting used to installing packages from the command line using apt (advanced interface to dpkg) / dpkg. Yes there's a software centre and maybe synaptic to make this easier for you but that obfuscates what's really happening in the background ie the calls to apt / dpkg.

System/software and service configuration files are found in /etc - learn this inside out. Learn how to stop and start services from the commandline

Once confident with package management you can quite easily start using the same skills against RH based systems using yum / rpm

Please also learn how to use Vagrant - bring up a virtual instance of centos when you're confident with mint. Finally if you also have docker on your CV you'll be highly employable

Good luck
 
Are dpkg and rpm branches of the same tree or are they completely separate entities?

Completely different forms of package management.

Consider linux comprising of the following mandatory common cores

kernel branch of choice decided by the distro
glibc branch of choice decided by the distro

This forms the core but in order to run programs you would need to

(a) Compile programs for the version of glibc that you're running (tedious and time consuming - how we did it in the old days prior to package management)

or

(b) Use a package manager to install pre-compiled programs (usually pre-compiled by your distro provider) specifically for your version of glibc.

The end result is the same but a package manager has the additional benefit of resolving dependencies required for your program (ie auto installing other programs that are needed for your software to install and run).

Once you have an understanding of how to install packages try installing them from source (option a) for more experience
 
I'd probably say start with Debian and then move to CentOS - atleast personally I found Debian a little more intuitive as a move from other OSes and made it a bit easier to understand other flavours of *nix transitionally.

In terms of Linux skills that have a significant impact employment wise you really need quite a few years of experience and some courses under your belt.
 
I wouldn't agree ... :) ... personally I come from a *nix background before Linux and I found Debian a lot less intuitive than other flavours, (I started in Linux with Slackware before going to SuSE and then on to CentOS).
 
If you come from a previous *nix background then yeah Debian won't necessarily come over as the most intuitive but if you come from Windows, etc. IMO its an easier half-way step than jumping into something based off RH, etc.
 
Yeah for windows users I would strongly recommend mint / cinnamon but once you have a base install of ubuntu / debian it's easy to install additional desktop environments so that you can see which suits you best. (you can choose which one to use via the logon screen once installed)

A few popular ones

http://lifehacker.com/five-best-linux-desktop-environments-1648022755

apt search desktop
 
In hindsight if you want to really learn the inners of a Linux OS then maybe Arch is the best choice. It'll force you down the learning route of conf files and services.

However I warn you.... " Do not become an Arch Linux fanboi aka Linux Snob "

Dear God I recommended Arch .... what's wrong with me :rolleyes:
 
In hindsight if you want to really learn the inners of a Linux OS then maybe Arch is the best choice. It'll force you down the learning route of conf files and services.

However I warn you.... " Do not become an Arch Linux fanboi aka Linux Snob "

Dear God I recommended Arch .... what's wrong with me :rolleyes:

Nothing wrong with arch, I've been running it for a couple of years (used Mint prior to that).

The only problem with arch is the install is a PITA. Once it's installed the experience isn't really much different than Mint to be honest, other than having less installed by default and a CLI package manager rather than GUI one. Day to day I don't notice the difference to be honest. The only reason I switched is a preference for a rolling release distro.
 
Nothing wrong with arch, I've been running it for a couple of years (used Mint prior to that).

Didn't say there's anything wrong with Arch just the users ;)

As you mentioned installation can be a PITA but I look at that as a great learning opportunity. Problem is that new users who go through the pain gain a lot of knowledge which somehow goes to their heads - so much so that short sightedness sets in and they look no further - bordering arrogance imho.

Great documentation - yes it needs to be as this is a very much hands on OS.

.... but please get your heads out of your *** and understand that your short linux journey doesn't mean you're God's gift to it.
 
.... but please get your heads out of your *** and understand that your short linux journey doesn't mean you're God's gift to it.

There is always a bigger fish when it comes to *nix heh.

I'm fairly conversant with Linux - familiar with coding/recompiling kernel, etc. can create complex bash, perl, etc. scripts (couple of examples below) in my sleep but I wouldn't consider it to give me any real employability these days in the field - you really need to know your stuff to get even half a chance in a role where real Linux knowledge is essential.

Code:
#!/usr/bin/perl
# file: loadmatchsettings.pl

#use strict << encourages sloppy programming habits imo :P

use IO::Socket::INET;

$crlf="\r\n";

$TMip=$ARGV[0];;
$TMport=$ARGV[1];
$TMpass=$ARGV[2];
$TMmatch=$ARGV[3];


sub str2ord {
	my $out;
	my $LOOP_COUNT=length(@_[0]);
	for ($count=0; $count <= $LOOP_COUNT; $count++ ){
		$out.="[".ord(substr(@_[0],$count,1))."]";
	}
	return $out;
}

sub int2byte4 {
        my $inval=@_[0];
        my $out .= chr($inval & 255);
        $out .= chr(($inval >> 8) & 255);
        $out .= chr(($inval >> 16) & 255);
        $out .= chr(($inval >> 24) & 255);

        return $out;
}

sub bytes2int {
        my $inval=@_[0];

        $byte1 = ord(substr($inval,0,1));
        $byte2 = ord(substr($inval,1,1));
        $byte3 = ord(substr($inval,2,1));
        $byte4 = ord(substr($inval,3,1)); # doesn't seem to throw up an error i$

        return ($byte1 | ($byte2 << 8) | ($byte3 << 16) | ($byte4 << 24));
}


$sock=IO::Socket::INET->new(PeerAddr => $TMip,PeerPort => $TMport,Proto => 'tcp');
die "Socket creation failed with: $!\n" unless $sock;

$auth="<?xml version=".chr(34)."1.0".chr(34)."?>";
$auth .="<methodCall>";
$auth .="<methodName>Authenticate</methodName>";
$auth .="<params>";
$auth .="<param><value><string>Admin</string></value></param>";
$auth .="<param><value><string>".$TMpass."</string></value></param>";
$auth .="</params>";
$auth .="</methodCall>";

$match="<?xml version=".chr(34)."1.0".chr(34)."?>";
$match .="<methodCall>";
$match .="<methodName>LoadMatchSettings</methodName>";
$match .="<params>";
$match .="<param><value><string>".$TMmatch."</string></value></param>";
$match .="</params>";
$match .="</methodCall>";

$authheader = int2byte4(length($auth)).chr(255).chr(255).chr(255).chr(255);
$matchheader = int2byte4(length($match)).chr(255).chr(255).chr(255).chr(255);

$sock->print($authheader.$auth);
$sock->print($matchheader.$match);

close($sock);

Bit of bash stuff - scripting but still

Code:
#! /bin/sh
cd /home/gs1/tmnf

read password < "password.txt"

if [ -n "$1" ]; then
	filename=$1
	filename=${filename##*/}
	exttype=${filename##*Challenge.}
	if [ -f "GameData/Tracks/Challenges/My Challenges/$filename" ]; then
		echo map already exists
		if [ -f "GameData/Tracks/Challenges/My Challenges/$filename.pass" ]; then
			read passwordval < "GameData/Tracks/Challenges/My Challenges/$filename.pass"
			if [ "$2" != "$passwordval" ]; then
				echo "This track already exists and you don't have the password to overwrite it"
				exit
			fi
		fi
	fi

	cp -f $1 "GameData/Tracks/Challenges/My Challenges/$filename"

	if [ "$exttype" = "Gbx" ]; then
		echo ADDING MAP $filename...
		fileforsize=GameData/Tracks/Challenges/My\ Challenges/$filename
		echo Uploaded $(stat -c%s "$fileforsize") Bytes
		./validation.pl "$fileforsize" > "$fileforsize.val"
		wait
		read validation < "$fileforsize.val"
		if [ -z "$validation" ]; then
			echo CUSTOM MAP FAILED VALIDATION
			echo FILE ERASED
			echo "if you can't complete it how do you expect anyone else to?"
			rm GameData/Tracks/Challenges/My\ Challenges/$filename
			rm GameData/Tracks/Challenges/My\ Challenges/$filename.val
			exit
		fi
		if [ -n "$2" ]; then
			echo $2 > "$fileforsize.pass"
		fi
		echo map ident: $validation
	else
		echo FILE ERASED
		echo uploading $exttype is not permitted
		rm GameData/Tracks/Challenges/My\ Challenges/$filename
		exit
	fi
else
	echo NO MAP SPECIFIED
	echo REBUILDING MAP LIST
fi

cd GameData/Tracks

# slight problem here if there aren't any .Gbx files already in the folder
ls Challenges/My\ Challenges/*.Gbx > ../../~maplist.tmp
cd ../..

cat NationsCustom.scr > ~NationsCustom.tmp
cat ~maplist.tmp |while read line; do echo -e "\t<challenge>\n\t\t<file>${line}</file>" >> ~NationsCustom.tmp;read validation < "GameData/Tracks/${line}.val" ;echo -e "\t\t<ident>$validation</ident>\n\t</challenge>" >> ~NationsCustom.tmp; done
echo "</playlist>" >> ~NationsCustom.tmp

cp -f ~NationsCustom.tmp GameData/Tracks/MatchSettings/Nations/NationsCustom.txt

rm ~maplist.tmp
rm ~NationsCustom.tmp

if [ -n "$filename" ]; then
	./serversay.pl 127.0.0.1 25001 $password "\$w\$o\$f00New map added: $filename"
fi

./loadmatchsettings.pl 127.0.0.1 25001 $password MatchSettings/Nations/NationsCustom.txt

echo map uploaded and added to map list
 
@Rroff

spoiler 1 : why not `cat xml | nc host port` instead ?

spoiler 2 : slap across your wrists for storing passwords in a file and having them visible under running process lists :o

.... yes knowing this stuff doesn't give employability. Years of experience with some of the quirks in the trade helps a lot.

Funny thing is that once you've got in you'll find that all you'll be doing is noddy stuff like this.
 
Back
Top Bottom