• 3) bg,fg,jobs
  • Linux: This Book Includes 4 Manuscripts. The Underground Bible to the unix operating System with Tools On Security and Kali Hacking to Understand Computer Programming, Data Science and Command Line




    Download 6,34 Mb.
    Pdf ko'rish
    bet166/203
    Sana10.01.2024
    Hajmi6,34 Mb.
    #134102
    1   ...   162   163   164   165   166   167   168   169   ...   203
    Bog'liq
    Linux This Book Includes 4 Manuscripts The Underground Bible

    Built-in Shell Commands
    Before entering into a deep discussion about the built-in commands it is
    important to know that these built-in commands cannot be used as variable
    names. Variables are an important functionality of shell programming that
    helps to define things.
    Linux provides a command called type that will let you cross-check
    whether a command is a built-in command or not.


    The command works as follows:
    type echo
    The output is as follows:
    echo is a built-in shell 
    Another example,
    type trump
    The output is as follows:
    Trump is not a built-in shell
    Also, remember that two dots that is (••) is used to determine the successful
    working or execution of the script. Here are the in-built commands we are
    going to discuss in detail.
    1) Alias
    Normally Linux commands are a little trickier to type. I suppose you have
    to type echo every time it may be difficult. For this reason, you can use an
    alias to give shortcut for a command.
    Below we describe the command that needs to be entered to make alias
    work.
    example@ linuxwar : Alias groupecho
    However, it should be remembered that aliases work only until the shell
    environment is open. That is if the shell is exited there is no way to access it
    again. Also, the alias functions are stored in the bashrc directory of the user
    environment. Aliases are an easy way to increase productivity. Hackers use
    a lot of aliases to make deciphering the script a lot trickier. 
    2) Unalias


    As you might have guessed already unalias is used to delete the alias
    systems that are present. By using this command, you can delete any alias
    command that you have created before.
    Below is the command that will let us understand how it works:
    example@ linuxwar : unalias groupecho
    You can also use -a to delete all the aliases that are present at once.
    However, as we said before ending a shell environment will delete all the
    aliases that are present but using unalias. will help you to delete things
    while you are still scripting.
    3) bg,fg,jobs
    A lot of shellcode is done in interactive mode. Sometimes when you are
    trying to exploit a system you need to perform various tasks at once. These
    tasks are called jobs in Linux terms. So for everyone's convenience jobs are
    divided into two types. The first one is a foreground job where we can see
    the procedure that is going on. The classic example of foreground jobs is
    the installation of system programs. You can't handle other jobs while doing
    foreground jobs. 
    Solely, for this reason, background jobs are developed. Background jobs
    can help things run in the background. Hackers should be well aware of this
    because they are ought to work with multiple processes. 
    Below are the commands for the job functionalities:
    example@ linuxwar : bg job 1
    example@ linuxwar : fg job2
    example@ linuxwar : view jobs
    4) cd
    Cd is the classic Linux shell command that is famous for its huge usage.
    When performing tasks users usually are thrown into the root directory by


    the shell. Huge usage of root directory can make it scattered and messy. For
    this reason, Linux users use CD to change their directory and perform
    actions. 
    Below is the command for the change directory:
    example@ linuxwar : cd /etc/read

    Download 6,34 Mb.
    1   ...   162   163   164   165   166   167   168   169   ...   203




    Download 6,34 Mb.
    Pdf ko'rish

    Bosh sahifa
    Aloqalar

        Bosh sahifa



    Linux: This Book Includes 4 Manuscripts. The Underground Bible to the unix operating System with Tools On Security and Kali Hacking to Understand Computer Programming, Data Science and Command Line

    Download 6,34 Mb.
    Pdf ko'rish