• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

dirb Command Examples in Linux

by Deepika

The “dirb” command in Linux is a command-line tool used for web application directory enumeration. It is commonly used to discover hidden files and directories on a web server by brute forcing the directory names. The tool works by sending HTTP requests to a web server with a list of directory names and analyzing the responses to determine if the directories exist.

The basic syntax of the command is:

# dirb [options] [URL] [wordlist]

where:

URL is the target web server
wordlist is a file containing a list of directory names to try
options are various switches to customize the behavior of the tool

For example, “dirb http://example.com /usr/share/dirb/wordlists/common.txt” will perform directory enumeration on the target “example.com” using the common.txt wordlist.

dirb Command Examples

1. Scan a webserver using the default wordlist:

# dirb https://example.org

2. Scan a webserver using a custom wordlist:

# dirb https://example.org path/to/wordlist.txt

3. Scan a webserver non-recursively:

# dirb https://example.org -r

4. Scan a webserver using a specified user-agent and cookie for HTTP-requests:

# dirb https://example.org -a user_agent_string -c cookie_string

Filed Under: Linux

Some more articles you might also be interested in …

  1. “git extras” Command Examples
  2. “go mod” Command Examples
  3. wget V/s curl
  4. binwalk Command Examples in Linux
  5. LVM VG Metadata Corruption with ‘Checksum error’
  6. bat Command Examples in Linux
  7. iftop Command Examples in Linux
  8. “git mr” Command Examples
  9. make Command Examples in Linux
  10. gunicorn Command Examples

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright