Linux Commnads for Beginners: Basic linux commnads






The goal of this article is to help introduce new users to the basic linux commands. After reading this article you will have an understanding of how the Linux system is structured, where files and directories are located making it easier for you to navigate around, giving you a better idea of how your systems works. We'll then move on to some basic Linux navigation, copy, showing your files and directories, etc.Whether you're new to Linux or are looking into getting some type of certificate, you'll need to have some basic knowledge of the Shell, the Kernel, the Terminal, and FHS, among others. There's actually quite a bit of other things you'll need to know, but let's start with the basics.

The Kernel


The Kernel is what controls everything on a system; think of it as the heart of Linux. It performs tasks that create and maintain the Linux environment. The Kernel receives instructions from the shell and engages the appropriate hardware (processors, memory, disks, enforces security, etc.). It is a bridge between applications and the actual data processing done at the hardware level.

linux kernel

The Shell


The shell is the interface between you and Linux. We issue commands through the command line interface which is interpreted and passed on to the kernel for processing. When we log onto the computer the shell will automatically start. It will then monitor the terminal for any commands.

basic linux commnads



There are a number of shells you can use, each differing slightly. Most Linux distros use Bourne-Again shell(bash) but support various others: Korn Shell, Bourne shell, C shell, etc. For all intensive purposes you can just stick with bash but I will show you how to change this if you want to. As you advance you can use shells to create scripts to automate tasks, making your daily routine all the more easier.

Filesystem Hierarchy Standard


Next important aspect is the FHS. Everything in Linux is either a file or a directory. The Filesystem Hierarchy Standard (FSH) is the way that these files and directories are structured. More importantly though is how they are structured. Looks intimidating at first glance but when you realize that there is a method to this madness, you will find it's so much simpler because everything is organized in the proper place and you can find where you want go much easier.

direcotry structure basic linux commnads

/ - The root directory. This is where your directory structure starts. Everything is housed under the root directory.basic linux commnads

/bin – Essential user command binaries used for general operations: Copy, show directory, etc. (ls, cp, and cat – we'll get to these commands soon)

/boot – Static files of the boot loader. Files here are necessary for a Linux system to start (Kernel & GTUB information)

/dev – Where the device files are located

/etc – Configuration files for all programs. Things like an apache web server, users & groups on your system, or printer configuration. Think of this as a control panel for Windows users. We will edit these text files later (These files should remain static and text based).

/home – Home directories for all the users to store personal files (i.e. /home/roman) –Windows equivalent of Documents & Settings.

/lib – Essential shared libraries and kernel modules

/media – Mount point for removable media

/mnt – Temporary mounted file systems

/opt - Add on application software packages – (i.e. Program files for windows users)

/sbin - Essential system binaries

/tmp – Programs write their temporary files here.

/usr – Multi-user utilities & Applications. It contains application source codes, documentation, & config files they use. It's the largest directory on the system.

/var – Variable data on a system. Data that will change as the system is running (Log files, backups, cache, etc.)

/root – Home directory for root

/proc – Virtual directory containing process information (system memory, hardware configuration, devices mounted, etc.)

The directories that I would be most concerned starting off are /etc, /home, /dev, /mnt. As your skills progress you'll venture off into other areas, but I started out in /etc 95 percent of the time. There are directories that extend, but we'll get those later.


Let's start with some Basic  Linux Commands


pwd – Print working directory will tell you what directory you are in.

basic linux commnads

Notice that I used pwd to tell me where I am & I used cd (change directory) to move into another folder.

cd – Change Directory.Can be used with “/” & then the folder you want to go to. For example,cd Desktop/ will take me to the directory.


basic linux commnads


ls – Lists files & directories that you are in.

It may help to use the ls command to list what files and directories exist in the directory you are in. It's vital to know the difference between ls & pwd. pwd tells you where are, ls tells you what you have to work with.


basic linux commnads

whoami – Tells you which user is logged in

basic linux commnads

touch - A command you can use to quickly create a file that you can also “touch” on existing files

basic linux commnads

rm – Removes the file for you

The Linux MAN Pages Project


man pages—abbreviation for "manual pages"—are the extensive documentation that comes preinstalled with almost all substantial UNIX-like operating systems, including Arch Linux. The command used to display them is man.

To read a man page, simply enter:
$ man page_name

Manuals are sorted into several sections. For a full listing see the section entitled "Sections of the manual pages" in man man-pages.

basic linux commnads

basic linux commnads

basic linux commnads

 

Save

Save

Save

Save

Save

Save

Save

Comments

Popular posts from this blog

How To Hack WIFI WPS pin With Kali Linux

World’s Fastest Camera Takes 5 Trillion Photos Per Second, Can Pause Moving Light

creak – Poison, Reset, Spoof, Redirect MITM Script