Most Useful Commands For Parrot Security and Kali Linux

What is Linux shell 

A Linux shell is a command-line interpreter or shell that provides a traditional user interface for the Linux operating system and for Linux-like systems. The shell understands a plenty of shell commands and its option which change their action.There are many commands are used in linux there are following-

ls, pwd, cat, mv, cd, ..... etc

Example : ls -a

Explanation :- "ls" meaning that content in the current directory, and -a   is the parameter meaning "all"

About the “username@hostname:~$ "ls”

Example:- user2014@user-linux:~$ ls

user2014: the first element is your nickname. This is the user name under which you are logged and you. Indeed, remember: you can create multiple user accounts on Linux. It is generally advisable to generate a person who’s likely to use the computer.

" @ ": This symbol indicates nothing special. It's the symbol "at"
user-linux: that's the name of the computer on which you are working. In my case it is called user-linux, but I could give it any name during installation.
' : ' Again, this symbol does not mean anything special, it is a separator.
' ~ ': That's the folder where you currently are. You can navigate from folder to folder in the console and it is very useful that you always be reminded where you are before each command.the symbol' ~ ' means that you are in your home directory, socalled "home" under Linux; this is equivalent to the "My Documents" folder on Windows.
' ls ': is a command, show the contents of current directory.

' $Means you are currently using a user "normal" account with limited rights (he cannot change the most important system files). My account user2014 is a normal account with limited rights; As you can see, once we speak the same language as the command prompt, you understand what it means! "Welcome, you are user2014 at user-linux machine. You are currently in your home directory and have limited user rights. You are using a command “ls” to list the contents in current directory."


Example: root@user-linux:~# whoami

Explanation :- root : means user work as a super user @: This symbol indicates nothing special. It's the symbol "at"
' # ': means you are working in super user mode Whoami: ' whoami ' is a command ,

' # ' - Means you are in super user mode, that is to say that you are connected under the pseudonym "root." The root is the master who has the right to do everything on his computer user (even to destroy it!). We'll see how root in more detail later; yet we remain in a limited user account, so we do not risk doing bad things.

About “user>pwd” -

Explanation :- user> : is a customised command prompt.
pwd: pwd is a command, print working directory 

user2014 @ user-linux: ~ $ date
'when we Enter the date command in the terminal, terminal show the current date and time on the screen'

About Parameters :- Parameters are options that are written after the command. The command and parameters are separated by a space, like this: user2014 @ user-linux: ~ $ command parameters The parameters themselves can contain spaces, letters, numbers ... a bit of everything, really. There is no real rule on how the settings, but fortunately programmers have adopted a sort of "agreement" so that we can recognize the different types of parameters.
There are many several parameters commonlly used with the commands -
-a
-d
-l
-U

Example :-  ls -t (-t means "list by timestamps")
                     eject -t ( -t means "tray close")

Long parameters (several-letters) :- In the long parameters have more digit compare to the short parameters.
Example :- 
--all is a long parameter, meaning all contents or all things.
--version is a long parameter, meaning the version of the command For instance
--help is a long parameter, meaning get help for current command.

user2014@user-linux: ~ $ ls --all.

kali linux commands.jpg


As you can see above in the picture that, when we enter the ls --all command this command show the all files have in the desktop directory.

su –l : switch user
Example: user> su –l
(su: going to login as the "root super user", -l: is a parameter meaning “login”)

ls –l : (list long contents)
Example: user>ls –l
(ls: shows the contents of current directory. –l: is a parameter meaning “long list include access permissions, ownership and date & time.”) 

show the directory in kali.jpg

ls -a  :(list all content)
Example: user>ls –a
(ls: shows the contents of current directory. –a: is a parameter meaning “all contents” including hidden files.)
show the all files in the kali.jpg


rm –ri : (remove a directory and its contents)
Example: user>rm –ri NonEmptyDir
(rm: removes a file or a directoryri: is a parameter meaning remove a non-empty directory and its contents. NonEmptyDir is a directory name.)

w –s : show current process for each user 
Example: user>w -s 
(w: shows the shell working processes. –s: is a parameter meaning “summary ”)


show the current process of user in kali.jpg

usermod –l : modify an existing user account. 
Example: user>usermod –l oldname newname 
(usermod: modify an existing user account. –l: is a parameter meaning “login name change”)


What is Virtual Console?

Virtual Console means an interface where the input device and the output device designed to enable you to interact with your system. Linux has 7 virtual consoles, you can switch them using Ctrl+Alt+F1 through F7. 
Ctrl+Alt+F1~F6: switch virtual console 1~ virtual console 6 
Ctrl+Alt+F7: enter graphical desktop, which is default virtual console.

 There are some super User commands Super User Commands :-

  • su –l (su :- switch normal user to the super user, -l :- enter root password and login)
  • loginname (show the login name and show the "root")
  • exit (exit the super user mode to the normal user mode)
  • whoami (show the current user name)
  • hostname (show the current host name) 
login as root user in kali.jpg
  • sudo : allows a user with proper permissions to execute a command as another user, such as the superuser.
Examplesudo –v
(-v: refresh the authentication timeout, the next sudo command will not require a password.) 
sudo -k : (-k: expire the authentication timeout, the next sudo command will require a password.)