Learning Linux
-
Hello guys....if i want to learn linux....what version is best to start? and is there any difference between syntaxes ?
-
Yes, many differences. Each Linux distro is a full operating system itself. You don't really lean Linux itself, you learn the individual distros. Linux is a family of operating systems, not really an OS itself. So CentOS is like Windows, Linux is not.
For most cases, you would start by learning Red Hat Enterprise Linux (RHEL) and CentOS which are the same product under two names. One is free and one is not. But they are identical and both made by Red Hat.
-
I'd start with Ubuntu since it is the most common desktop Linux environment. The GUI will help you get around until you get used to the terminal.
-
This guide to learning Linux covers what to learn and why...
https://mangolassi.it/topic/7825/sam-learning-linux-system-administration
-
This post is deleted! -
@IRJ said in Learning Linux:
I'd start with Ubuntu since it is the most common desktop Linux environment. The GUI will help you get around until you get used to the terminal.
https://mangolassi.it/topic/7826/linux-desktop-for-learning-linux-system-administration
I advise against using GUIs, when the goal is learning. They become a crutch and actually make it harder. It's a key reason why so many Windows Admins never really learn how things work, they get used to easy graphical tools and "get by" without learning how to really do things and while they might learn how to get the job done, they become dependent and often lose the deep learning that would normally be expected.
But unlike in the Windows world where it is considered marginally acceptable to be hobbled by a GUI dependency, in the UNIX world using a GUI is literally considered the same as not knowing how to admin the system. So all of the GUI learning is wasted and non-transferable in a business setting. So if the goal is learning for career, rather than just learning for fun, I'd avoid a GUI from the beginning. Just assume it doesn't exist, because no enterprise server will ever have one and no interview will accept "I used a GUI" as an answer to how something is done.
Ubuntu is not as well documented, supported or as easy to use as the bigger business class systems as well. If the goal is to learn to support desktops, yes, Ubuntu might be best. But for learning for career, it will make things unnecessarily hard and complex at the time when you want things as simple as possible.
-
Debian-based Ubuntu is more common to find in households and even some small businesses. A company I worked for built their entire proprietary product for monitoring Cisco equipment on Ubuntu. However, RPM builds like CentOS are what enterprises use, and would probably serve you better long-run. It's good to know both, and there are plenty of similarities, but there are also a ton of differences.
-
CentOS is 100% free and the minimum install is perfect for learning. It is small, light and has no GUI and nothing "extra" to get in the way or be confusing. It is also the most popular OS for business (most popular, period, more than any other Linux, any other UNIX or even Windows.) Even Linux jobs that are not RHEL/CentOS generally look for or accept RHEL/CentOS experience. It also has the best professional ecosystem and set of resources for learning. And the official documentation is very complete and helpful.
-
I can't remember where I got this. It might have been from @scottalanmiller but this breaks down the Linux file structure for you. Good reference info.
=============================================================
/ – Root
- Every single file and directory starts from the root directory.
- Only root user has write privilege under this directory.
- Please note that /root is root user’s home directory, which is not same as /.
/bin – User Binaries
- Contains binary executables.
- Common linux commands you need to use in single-user modes are located under this directory.
- Commands used by all the users of the system are located here.
- For example: ps, ls, ping, grep, cp.
/sbin – System Binaries
- Just like /bin, /sbin also contains binary executables.
- But, the linux commands located under this directory are used typically by system aministrator, for system maintenance purpose.
- For example: iptables, reboot, fdisk, ifconfig, swapon
/etc – Configuration Files
- Contains configuration files required by all programs.
- This also contains startup and shutdown shell scripts used to start/stop individual programs.
- For example: /etc/resolv.conf, /etc/logrotate.conf
/dev – Device Files
- Contains device files.
- These include terminal devices, usb, or any device attached to the system.
- For example: /dev/tty1, /dev/usbmon0
/proc – Process Information
- Contains information about system process.
- This is a pseudo filesystem contains information about running process. For example: /proc/{pid} directory contains information about the process with that particular pid.
- This is a virtual filesystem with text information about system resources. For example: /proc/uptime
/var – Variable Files
- var stands for variable files.
- Content of the files that are expected to grow can be found under this directory.
- This includes — system log files (/var/log); packages and database files (/var/lib); emails (/var/mail); print queues (/var/spool); lock files (/var/lock); temp files needed across reboots (/var/tmp);
/tmp – Temporary Files
- Directory that contains temporary files created by system and users.
- Files under this directory are deleted when system is rebooted.
/usr – User Programs
- Contains binaries, libraries, documentation, and source-code for second level programs.
- /usr/bin contains binary files for user programs. If you can’t find a user binary under /bin, look under /usr/bin. For example: at, awk, cc, less, scp
- /usr/sbin contains binary files for system administrators. If you can’t find a system binary under /sbin, look under /usr/sbin. For example: atd, cron, sshd, useradd, userdel
- /usr/lib contains libraries for /usr/bin and /usr/sbin
- /usr/local contains users programs that you install from source. For example, when you install apache from source, it goes under /usr/local/apache2
/home – Home Directories
- Home directories for all users to store their personal files.
- For example: /home/john, /home/nikita
/boot – Boot Loader Files
- Contains boot loader related files.
- Kernel initrd, vmlinux, grub files are located under /boot
- For example: initrd.img-2.6.32-24-generic, vmlinuz-2.6.32-24-generic
/lib – System Libraries
- Contains library files that supports the binaries located under /bin and /sbin
- Library filenames are either ld* or lib*.so.*
- For example: ld-2.11.1.so, libncurses.so.5.7
/opt – Optional add-on Applications
- opt stands for optional.
- Contains add-on applications from individual vendors.
- add-on applications should be installed under either /opt/ or /opt/ sub-directory.
/mnt – Mount Directory
- Temporary mount directory where sysadmins can mount filesystems.
/media – Removable Media Devices
- Temporary mount directory for removable devices.
- For examples, /media/cdrom for CD-ROM; /media/floppy for floppy drives; /media/cdrecorder for CD writer
/srv – Service Data
- srv stands for service.
- Contains server specific services related data.
- For example, /srv/cvs contains CVS related data.
=============================================================
-
@scottalanmiller said in Learning Linux:
CentOS is 100% free and the minimum install is perfect for learning. It is small, light and has no GUI and nothing "extra" to get in the way or be confusing. It is also the most popular OS for business (most popular, period, more than any other Linux, any other UNIX or even Windows.) Even Linux jobs that are not RHEL/CentOS generally look for or accept RHEL/CentOS experience. It also has the best professional ecosystem and set of resources for learning. And the official documentation is very complete and helpful.
I swear, I'm getting to the point that I know most of what you're going to say in response to questions before you do.
-
I would recommend CentOS as well. Most businesses seem to be looking for that.
-
thanks guys....most of all i want to use terminal and command line......is there any difference between the terminal syntax in ubunto or centos ?
-
@poorizad said in Learning Linux:
thanks guys....most of all i want to use terminal and command line......is there any difference between the terminal syntax in ubunto or centos ?
Not in the syntax, no. In some commands, yes. Both CentOS and Ubuntu by default use the BASH shell and it is BASH syntax that you will be learning and using. Nothing guarantees that all Linux OSes will use BASH either by default or at all, but BASH is tightly associated with Linux and it is very rare to find someone using anything else, at least by default.
-
@poorizad said in Learning Linux:
thanks guys....most of all i want to use terminal and command line......is there any difference between the terminal syntax in ubunto or centos ?
When you talk about Linux, in a business sense, they don't care if you know desktop environments. Linux in business is CLI (Command-Line Interface). That's the real meat to Linux, metaphorically speaking. If it was literally the real meat to Linux, @scottalanmiller would be in trouble...
-
@poorizad said in Learning Linux:
thanks guys....most of all i want to use terminal and command line......is there any difference between the terminal syntax in ubunto or centos ?
Pretty much all distros use Bash, so you will be good to go there.
-
How has your project to learn Linux been going?