Linux Basics

Hey buddy i am using Linux as my OS . this notes containing the basics of linux commands , service , tools , configurations & many more.....

Linux Filesystem

In kali linux there are different files in " / " root directory each of them contains different types of files..


 β€’ /bin      # basic programs (ls, cd, cat, etc.)
 β€’ /sbin    # system programs (fdisk, mkfs, sysctl, etc)
 β€’ /etc     # configuration files like "paswd, shadow , hosts, crontab"
 β€’ /tmp     # temporary files (typically deleted on boot)
 β€’ /usr/bin   # applications (apt, ncat, nmap, etc.)
 β€’ /usr/share   # application support and data files

There are many other directory present as well , but these are some of basics and important directory that we should look before move in.

Basic Linux Commands

Its important that we know basics commands of linux because 95% of the time we spend in terminal or shell .

i am running as root, so i didn't user sudo before any command. if you are using low priv account make sure to use sudo.

Man page

  • man page is a manual for any command we used, we can read about their switches and descriptions about that commands eg. ( man ls )

Listing Files

Moving Around

Creating Directory

  • while making directory remember linux is case sensitive.

Finding Files in kali system

  • which

  • locate

  • find

    • Find is very use-full command when it comes to finding file with different parameters, read man page for find command.

Managing kali Services

  • kali comes with default Pre-installed services such as ssh , http, mysql etc.

  • we can use this services according with our's need.

SSH Service

  • we can use systemctl or service command for running and stopping the services.

example

HTTP Service

  • it can be run as systemctl or service command.

  • same goes to enable and disable.

  • HTTP Service is a web server that loads at port 80 on our local-host IP its dir is /var/www/html where it host.

  • apache is a webserver that comes pre-installed in kali so we are using apache , we can user nginx or python as well.

  • we can use it as a web-server for downloading files at Victum Machine.

example

Searching, Installing, and removing Tools

apt update

  • apt update command will update the list of available packages, including information related to their versions, descriptions, etc so that we can upgrade the system.

apt upgrade

  • After the APT database has been updated, we can upgrade the installed packages and core system to the latest versions using the apt upgrade command.

apt-cache and apt show

  • The apt-cache search command displays much of the information stored in the internal cached package database.

  • apt show display the information of the package

example

apt install

  • apt install will install the package

apt-remove --purge

dpkg

  • dpkg used to install offline package

misc commands

Searching, Installing, and Removing tools

Last updated