DEV Community

Sudip Roy
Sudip Roy

Posted on

LINUX series (Part 1)

Introduction to UNIX

UNIX is an operating system developed by AT&T in 1969. UNIX is a multi-user, multi-process operating system.

Primarily there are two base versions of UNIX available:

  1. AT&T System V
  2. Berkeley Software Distribution (BSD).

Most of the UNIX versions are built using one of these versions.

Variants of UNIX

  1. Sun Solar UNIX
  2. IBM AIX
  3. Hewlett Packard HP-UX
  4. Red Hat Enterprise LINUX
  5. Fedora Core
  6. SUSE Linux
  7. Debian OS X
  8. Mac OS X
  9. KNOPPIX

10.Yellow Dog Linux
11.SCO OpenServer
12.SGI IRIX
13.FreeBSD
14.OpenBSD
15.NetBSD
16.OS/390 Unix
17.Plan 9

As you can see there are many available variants, and their implementation is also different, but the core commands and their functionalities remain the same. IEEE has created a standard called Portable Operating System Interface (POSIX) to standardize the UNIX OS. Though all the UNIX versions does not follow the POSIX standard completely, but most do adhere to the major principles outlined in the standard.

Currently UNIX development focuses on UNIX-based system called LINUX.
Two major groups of Linux distribution
1. .rpm based: .rpm stands for Red Hat Package Management
2. .deb based: .deb is the short form of Debian.

Basic commands:

  1. To find the version:
sudip@system1=:~$ cat /proc/version
Enter fullscreen mode Exit fullscreen mode

Or you can also use uname command

sudip@system1=:~$ uname -a
Enter fullscreen mode Exit fullscreen mode

-a is used to print all information
You can refer to the man page to see different options.

2.List the content of a directory:
This will list all the files and folders present in your current directory.

sudip@system1=:~$ ls
Enter fullscreen mode Exit fullscreen mode

3.To concatenate the files and print the standard output:
cat command can be used as

sudip@system1=:~$ cat fileName.txt
Enter fullscreen mode Exit fullscreen mode

Let me explain this a bit. Suppose the above-mentioned file fileName.txt contains your biodata. So, this cat command will print the contents of that file. You can also edit the file with the use of some inbuilt editors. That we will discuss later.
Remember we have used the same cat command to get the version information? Well, that was nothing, we were just printing the version information stared in this /proc/version location.

4.To find present working directory pwd is used:

sudip@system1=:~$ pwd
Enter fullscreen mode Exit fullscreen mode

5.Give information about login users use w:

sudip@system1=:~$ w
Enter fullscreen mode Exit fullscreen mode

6.Use hostname to find the name of the host:

sudip@system1=:~$ hostname
Enter fullscreen mode Exit fullscreen mode

Top comments (0)