• Basic Commands in Linux
  • /root The home directory of the all-powerful root user /etc




    Download 7,3 Mb.
    Pdf ko'rish
    bet28/115
    Sana27.11.2023
    Hajmi7,3 Mb.
    #106243
    1   ...   24   25   26   27   28   29   30   31   ...   115
    Bog'liq
    linuxbasicsforhackers

    /root
    The home directory of the all-powerful root user
    /etc
    Generally contains the Linux configuration files—files that con-
    trol when and how programs start up
    /home
    The user’s home directory
    /mnt
    Where other filesystems are attached or mounted to the 
    filesystem
    /media
    Where CDs and USB devices are usually attached or mounted 
    to the filesystem
    /bin
    Where application binaries (the equivalent of executables in 
    Microsoft Windows or applications in macOS) reside
    /lib
    Where you’ll find libraries (shared programs that are similar to 
    Windows DLLs)
    We’ll spend more time with these key directories throughout this book. 
    Understanding these first-level directories is important to navigating through 
    the filesystem from the command line.
    It’s also important to know before you start that you should not log in 
    as root when performing routine tasks, because anyone who hacks your 
    system (yes, hackers sometimes get hacked) when you’re logged in as root 
    would immediately gain root privileges and thus “own” your system. Log in 
    as a regular user when starting regular applications, browsing the web, run-
    ning tools like Wireshark, and so on. For the practice you’ll do in this book, 
    staying logged in as root should be fine.
    Basic Commands in Linux
    To begin, let’s look at some basic commands that will help you get up and 
    running in Linux.


    6
    Chapter 1
    Finding Yourself with pwd
    Unlike when you’re working in a graphical user interface (GUI) environ-
    ment like Windows or macOS, the command line in Linux does not always 
    make it apparent which directory you’re presently in. To navigate to a new 
    directory, you usually need to know where you are currently. The present 
    working directory (or print working directory) command, 
    pwd
    , returns your 
    location within the directory structure.
    Enter 
    pwd
    in your terminal to see where you are:
    kali >pwd
    /root
    In this case, Linux returned 
    /root
    , telling me I’m in the root user’s 
    directory. And because you logged in as root when you started Linux, you 
    should be in the root user’s directory, too, which is one level below the top 
    of the filesystem structure (/).
    If you’re in another directory, 
    pwd
    will return that directory name 
    instead.

    Download 7,3 Mb.
    1   ...   24   25   26   27   28   29   30   31   ...   115




    Download 7,3 Mb.
    Pdf ko'rish

    Bosh sahifa
    Aloqalar

        Bosh sahifa



    /root The home directory of the all-powerful root user /etc

    Download 7,3 Mb.
    Pdf ko'rish