• admin@embedclogic.com

Basic Commands for Linux kernel(Ubuntu)

Linux is a family of open source operating systems which use the Linux kernel. Linux kernel was first developed by Linus Torvalds that’s why it is known as Linux. Now it is the most popular Operating system and is heavily adopted in industries.

Linux is mostly available in package distribution and this distribution has a Linux kernel and supported software and libraries from GNU which provides the license for Linux software. There are many distributions available in the market in which Ubuntu, Debian, Fedora, and Linux are famous distributions.

As I said Linux distributions are open sources means Users need not pay to get distributions. You can get direct access to the Linux kernel and do the modification, write new software and can launch your own distribution but before that, your distribution must be approved by GNU.

Shell OR terminal

Shell is a term used in Linux for a User interface. In Linux shell may be graphical or command line interface(CLI).CLI is basically using the text method for input and output.BASH(Borne Against Shell) is the most popular shell for GNU projects.Have a look on below snippet of linux shell –

Linux Bash Shell
man – command for on terminal reference manual

man command is used for reference manual of Linux command.

pwd – To know the present working directory

pwd command is used to know the present working directory. As you can see in below snippet your current working directory is embedclogic(embedclogic is sub-directory of home).

ls – show all contents in working directory.

ls command is use to show all the contents in working directory.

See below snippet for options

ls -l is used to print all details like permission, user, administrator, size and time of file creation.

chmod – change the file permission

Command is used to give read(r),write(w),execute(x) permission to user(u) ,group(g),others(o).

  1. u=rwx=111=7
  2. g=rwx=111=7
  3. o=rwx=111=7

if you give 777 permission then it means user, member of group and others have permission to read, write and execute.see below example snippet.

We can also use ‘+’ or ‘-‘ to add permission or remove permission. see last command examples in below snippet –

mkdir – create new directory.

This command is use to create new directory.see below snippet –

rmdir – remove empty directory.
rm -r – remove non-empty directory.

remove non-empty directory.see below snippet for examples-

apt-get – Command line argument for package handling
Command  Description
apt-get install <package-name>To install the software package
apt-get update Will search updates for all installed packages from the server.
apt-get upgrade will upgrade installed package
apt-get remove <package-name> To remove installed software package

I have explained here very basic commands for Ubuntu distribution. Although it is not sufficient yet it will be helpful if you are starting your Linux journey.