This guide will show you the basics of navigating around Linux. I will go over the basic commands needed to navigate and use Linux. This guide is for beginners. If you are at an advanced level this might not be of much use to you.
Watch my video to see me using these commands on a terminal. Subscribe to my youtube channel to see more content like this.
Manual command
man (command)
The “man” command is short for manual. The man command opens up a manual for the command typed in after ‘man’.
example: ‘man ls’ shows all the list command manual (ls=list command)
see below

Help command
(command) --help
The help command is similar to the man command with a little less detail (normally). The help command prints information about that command onto your terminal.
example: ls –help

Use the man and help command to get more information on the rest of these. This is not everything.
Print working directory
pwd
The pwd command writes the full pathname of current working directory. It basically tells you where you are.

Kali Linux 2020.4 tells you where you are sitting in a directory. However, not all shells/terminals will. You will need this command.
Who am I
whoami
This command tells you which user you are. So after hacking and gaining access to system it is important to know what user you are. To then determine what access you have, or don’t have.

List comand
ls
ls command is used to list files and directories. ls command comes with so many arguments and different features. You can sort files and directories by date, size, able to check hidden files, permissions and so on.

Change directory
cd
The cd (“change directory”) command is used to change the current directory. It is one of the most basic and frequently used commands when working in Linux. Each time you interact with a command prompt, you are working within a directory.

Cat (display)
Cat is short for concatenate. This command shows the content of one or more files without having to open the file for editing.
cat

View (views the file in vim)
vi
Starts in read-only mode. You will be protected from writing files.

mkdir (make directory)
The mkdir command creates a directory (folder).
mkdir

Remove directory
rmdir
The rmdir command will remove an empty directory.
Moves files to specified destination
mv lol.txt lol

mv is a command that moves one or more files or directories from one place to another.
Locate (serves to find files)
locate
Locate is a Linux utility which serves to find files on filesystems. It searches through a prebuilt database of files generated by the update command.

Echo
echo hello > hello.txt
In Linux, echo is a command that outputs the strings it is being passed as arugments.

Copy command
cp hello.txt Downloads/

Cp is a command for copying files and directories
Remove
rm hello.txt

rm is a basic command in Linux used to remove object such as computer files, directories, and symbolic links from file systems and also special files such as device nodes, pipes and sockets.
History command (shows previous commands you have used)
history
Shows all the previous commands you have used. Very useful. Saves you typing them all out again.
Also pressing the up key cycles through these commands.

Permissions and access
chmod 777
chmod +rwx

Chmod is the command and system call which is used to change the access permissions of file systems objects. It is also used to change special flag mode. The request is filtered by the unmask. The name is an abbreviation of change mode.
Installations
Alot to talk about when it comes to installations on Linux, I will make a blog and video about installations.
apt-get install
update/upgrade good commands to run semi-regularly
apt-get update
apt-get upgrade
If you are not sitting in sudo/root you might need to be for these commands. It is important you run these commands often.
Run apt–get update to update all your package lists, followed by apt–get upgrade to update all your installed software to the latest versions.
Cleaning commands
You should run these commands once in a while.
apt-get clean
apt-get autoclean
apt-get autoremove
Summary and info
I have not included every single command in this guide. So watch my
youtube video where I show all these commands and more. No service
commands or network commands have been shown in this guide.
Alternatively, google “Linux commands” to find some information and guides.
You will need practice. Practice makes perfect. The more you use Linux, the better you will at using the system.
Books I Recommend:
The Web Applications Hackers Handbook: https://amzn.to/3riZC0y
Hack Five Bash bunny: https://amzn.to/3oS148L
Hands on Hacking: https://amzn.to/3aQRkGT
No comments:
Post a Comment