- 1 What is the Linux Kernel or Operating System and How to Check Kernel Version in Linux
- 1.1 What is Linux?
- 1.2 What is an Operating System?
- 1.3 Main Functions of an Operating System
- 1.4 Is Linux Operating System?
- 1.5 What is the Kernel in Linux?
- 1.6 Main Functions of Linux Kernel
- 1.7 How to Check Kernel Version in Linux?
- 1.8 Kernel Parameters in Linux Explained
- 1.9 How to Check Linux OS Version?
- 1.10 Conclusion
What is the Linux Kernel or Operating System and How to Check Kernel Version in Linux
Even though all Linux Enthusiasts are well aware of What is Linux Kernel but for those who are just starting their journey in the Linux World need to make things clear for their better understanding they need to know What is Linux Kernel. Before understanding the linux kernel one must be aware of What is Linux.
What is Linux?
Finnish Computer Programmer Linus Torvalds as part of his development project as a student of the University of Helsingfors he works towards eliminating drawbacks in UNIX Operating System and redefined and introduced solutions for reported issues in the UNIX Operating system to help users.
Around the early 90s developed an open-source MINIX operating system which was like UNIX or you can say another derived version of UNIX. Later it became famous with the name LINUX. For more details, you can have a look at What is Linux. Let us understand briefly What is an operating system.
What is an Operating System?
The operating system as the name suggests this is one of the most important programs to run a computer system or any device. For example to run mobile either you need Android or iOS.
It is supposed to keep running till the time you want to operate your computer system or mobile device. It stops only when the device or computer system gets shut down.
Let us understand what is the primary goal of a computer system or mobile device. It is to run the program to solve problems in an easier way right ?.
What is a computer then it is just a collection of the hardware’s capable to solve problems using their computing resources like Processor, Memory, I/O Devices.
So you can say “Operating system is an extended software system which manages hardware resources to solve problems.”
Main Functions of an Operating System
So as mentioned above Operating System is a collection of software to manage hardware to solve problems. Let us see what are the main functions an operating system performs.
Process Management Functions
Memory Management Functions
Device Management Functions
Is Linux Operating System?
Yes absolutely. Linux is 100% is one of the most popular multiuser multitasking operating systems. In a real sense, it is an enhanced version of the UNIX Operating System. It is widely used across all environments. The most important aspect of Linux is being Open Source which means anyone can download and modify as per their standard and can release their own version of Linux.
There are plenty of distros derived from Linux and one of the world`s most popular Linux operating system companies used the same path and they have released their professional version of Linux is Red Hat.
They have a full-fledge development environment with the name Fedora and their professional enterprise version of Linux is Red Hat Enterprise Linux popularly known as RHEL.
Many other Linux distros derived from RHEL like CentOS and Oracle Linux and now Rocky Linux by one of the main people from CentOS.
Linux is made up of files and folders. Everything in Linux is a file. Even devices are also represented as files.
What is the Kernel in Linux?
So now we have a fair idea of what is linux and also what is an operating system and we have seen that Linux is an Operating system. So now we can say all the operating system services provided are via Kernel.
Main Functions of Linux Kernel
The kernel performs various operations and works as a user interface between hardware and programs.
- The kernel controls states of various processes like creation termination suspension.
- The kernel performs memory allocation to executing processes. For better process management it sends processes in secondary memory mainly known as swap memory.
- The kernel also schedules process execution to CPU. The kernel also permits processes to use devices like terminals, tape drives, disk drives, network devices, printers, etc.
- “Kernel is the heart of the operating system” and all services performed by Operating System are actually done by the kernel.
- So in layman’s terms, you can simply say “Kernel used in Linux Operating System is called Linux Kernel”.
How to Check Kernel Version in Linux?
uname command is really handy to find all kernel-related information. Please refer to the below outputs to understand in a better way.
$ uname --help Usage: uname [OPTION]... Print certain system information.With no OPTION, same as -s. -a, --all print all information, in the following order, except omit -p and -i if unknown: -s, --kernel-name print the kernel name -n, --nodename print the network node hostname -r, --kernel-release print the kernel release -v, --kernel-version print the kernel version -m, --machine print the machine hardware name -p, --processor print the processor type or "unknown" -i, --hardware-platform print the hardware platform or "unknown" -o, --operating-system print the operating system --help display this help and exit --version output version information and exit
Let’s see one by one with examples of what type of information you can have about Linux Kernel-Related information.
$ uname Linux $ uname -s Linux $ uname -n lnxsrv099 $ uname -r 2.6.32-754.29.2.el6.x86_64 $ uname -v #1 SMP Thu May 7 06:14:05 EDT 2020 $ uname -m x86_64 $ uname -p x86_64 $ uname -i x86_64 $ uname -o GNU/Linux
With -a switch, you can have all the information related to the kernel.
$ uname -a Linux lnxsrv099 2.6.32-754.29.2.el6.x86_64 #1 SMP Thu May 7 06:14:05 EDT 2020 x86_64 x86_64 x86_64 GNU/Linux
Kernel Parameters in Linux Explained
Most of the linux operating systems especially Red Hat or similar linux distros have kernel files located in the/etc directory with the file name as sysctl.conf. It manages everything in terms of resource allocation for processes, devices, etc.
You cat use either cat or more command to display the contains of sysctl.conf. It can be updated online and offline as well as per requirement. You need to have privileges to access this file as this is the highest crucial file in the Linux Operating System.
Sample Linux Kernel file is given below just for your reference. You can tune your Linux installations for various security and stability depending upon your requirements.
# cat /etc/sysctl.conf # Kernel sysctl configuration file for Red Hat Linux # For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and # sysctl.conf(5) for more details. # Controls source route verification net.ipv4.conf.default.rp_filter = 1 # Controls the System Request debugging functionality of the kernel kernel.sysrq = 0 # Controls whether core dumps will append the PID to the core filename. # Useful for debugging multi-threaded applications. kernel.core_uses_pid = 1 # Controls IP packet forwarding net.ipv4.ip_forward = 0 # This parameter enables SYN flood protection net.ipv4.tcp_max_syn_backlog = 1280 # This parameter enables TCP SYN Flood protection net.ipv4.tcp_syncookies = 1 # This parameter disables IP Source Routing net.ipv4.conf.all.accept_source_route = 0 # This parameter disables the ability to send ICMP Redirects net.ipv4.conf.all.send_redirects = 0 # This parameter disables ICMP Redirect acceptance net.ipv4.conf.all.accept_redirects = 0 net.ipv4.conf.default.accept_redirects = 0 # This parameter enables IP Spoofing protection net.ipv4.conf.all.rp_filter = 1 # Additional security settings net.ipv4.conf.all.forwarding = 0 net.ipv4.conf.default.log_martians = 1 net.ipv4.conf.all.log_martians = 1 net.ipv4.icmp_echo_ignore_broadcasts = 1
How to Check Linux OS Version?
How to Check Linux OS version you can use the cat command to display the file which contains the linux version details. Please check below How to Check Linux OS Version in the below example.
$ cat /etc/redhat-release Red Hat Enterprise Linux Server release 6.10 (Santiago)
That`s it about what is the linux kernel and we have seen many things during this like what is linux and what is an operating system also is linux operating system and how to check linux OS version. We have tried to cover almost everything related to Linux Kernel and Linux Operating Systems. It is almost impossible to cover Linux Operating System and Linux Kernel in one blog post but we have tried our best to clear the basics related to Linux Operating System and Linux Kernel.
I hope beginners and even experienced Linux enthusiasts will find it relevant to clear some of your doubts related to the Linux Operating System and about Linux Kernel irrespective of various distros.
Please share your thoughts and opinion if we can enhance its readability by adding something extra to it.
If you like this request you to please subscribe to our blog and share as much as you can in your social circle and help this article reach the intended audience.