Introduction  to Linux and Basic Linux Commands

Introduction to Linux and Basic Linux Commands

What is Linux?

Linux is an open-source unix like operating system-based family on the linux kernel,and the OS kernel first published on 17 sept 1991 by Linus Torvalds.Linux is not a Unix derivative.It was written from scratch.

Linux distribution is the linux kernel and a collection of software together,create an OS,many of which are provided by GNU project.

Linux Features:

  1. Open source

  2. Secure

  3. Simplified updates for all installed software

  4. Light weight

  5. Multi-User,Multi-task

Linux Distribution:

There are on average six hundred Linux distributors providing different features. Here, we'll discuss about some of the popular Linux distros.

  1. Ubuntu

  2. Linux Mint

  3. Debian

  4. CentOS

  5. Fedora

  6. RedHat Enterprise

  7. Open SUSE

  8. kali Linux

Architecture Of Linux :

File System Hierarchy for Linux

/root - It is home directory for root user.

/home - It is home directory for other users.

/boot - It contains bootable files for Linux.

/etc - It contains all configuration files.

/usr - By default software are installed in this directory.

/bin - It's contains commands used by all users.

/sbin - It's contains commands used by only root user.

/opt - Optional application software packages.

/dev - Essential device files.This include terminal devices,USB or any device attached to the system.

Linux Commands:

pwd : Used to diplay the full path of your current working directory.

ls -a : Used to display a list of all files and directories in the current directory,including hidden files and directories.

cat : Create and add content - cat > filename,cat >>filename

Add two files content to another one - cat file1 fil2 > file3

touch :

  • Create empty file - touch file1

  • Create mulitiple files - touch file1 file2 file3

  • Change all time stamp- touch file1

  • Check timestamp - stat file1

  • Change specific time - touch -a file1

  • Change modify time - touch -m file1

mkdir : Create directory,create directory inside directory.

CP : Copy a file - cp file1 file2.

mv : To move and rename a file.

rmdir : remove directory.

echo : Print a message - echo "Hello"

Thanks for reading!!!!!