{"id":21674,"date":"2026-11-17T19:26:00","date_gmt":"2026-11-17T16:26:00","guid":{"rendered":"https:\/\/sunucun.com.tr\/blog\/?p=21674"},"modified":"2026-11-17T19:26:00","modified_gmt":"2026-11-17T16:26:00","slug":"kali-linux-commands","status":"publish","type":"post","link":"https:\/\/sunucun.com.tr\/blog\/kali-linux-commands\/","title":{"rendered":"Kali Linux Commands: Basic Commands and Security Tools Guide"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_90 ez-toc-wrap-center counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/sunucun.com.tr\/blog\/kali-linux-commands\/#Important_Note_Authorised_Systems_Only\" >Important Note: Authorised Systems Only<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/sunucun.com.tr\/blog\/kali-linux-commands\/#Basic_File_and_Directory_Commands\" >Basic File and Directory Commands<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/sunucun.com.tr\/blog\/kali-linux-commands\/#User_Permission_and_System_Commands\" >User, Permission and System Commands<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/sunucun.com.tr\/blog\/kali-linux-commands\/#Package_Management_APT\" >Package Management (APT)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/sunucun.com.tr\/blog\/kali-linux-commands\/#Network_Commands\" >Network Commands<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/sunucun.com.tr\/blog\/kali-linux-commands\/#Basic_Commands_for_Common_Security_Tools\" >Basic Commands for Common Security Tools<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/sunucun.com.tr\/blog\/kali-linux-commands\/#Nmap_network_and_port_scanning\" >Nmap: network and port scanning<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/sunucun.com.tr\/blog\/kali-linux-commands\/#Wireshark_and_tcpdump_traffic_analysis\" >Wireshark and tcpdump: traffic analysis<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/sunucun.com.tr\/blog\/kali-linux-commands\/#Metasploit_Framework\" >Metasploit Framework<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/sunucun.com.tr\/blog\/kali-linux-commands\/#Web_tests\" >Web tests<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/sunucun.com.tr\/blog\/kali-linux-commands\/#Useful_Tips\" >Useful Tips<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/sunucun.com.tr\/blog\/kali-linux-commands\/#Frequently_Asked_Questions\" >Frequently Asked Questions<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/sunucun.com.tr\/blog\/kali-linux-commands\/#Do_Kali_Linux_commands_work_on_Ubuntu\" >Do Kali Linux commands work on Ubuntu?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/sunucun.com.tr\/blog\/kali-linux-commands\/#I_get_a_%E2%80%9Ccommand_not_found%E2%80%9D_error_What_should_I_do\" >I get a &#8220;command not found&#8221; error. What should I do?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/sunucun.com.tr\/blog\/kali-linux-commands\/#Whats_the_best_way_to_learn_the_commands\" >What&#8217;s the best way to learn the commands?<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<p><strong>Kali Linux commands<\/strong> are largely the same as those in other Linux distributions, because Kali is Debian-based. The difference is that Kali also runs security testing tools from the command line. In this guide you&#8217;ll find basic file and system commands, package management, network commands and the basic usage of common security tools, with examples.<\/p>\n<p>If you haven&#8217;t read what Kali Linux is yet, you can start with our article <a href=\"https:\/\/sunucun.com.tr\/blog\/what-is-kali-linux\/\">what is Kali Linux<\/a>.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Important_Note_Authorised_Systems_Only\"><\/span>Important Note: Authorised Systems Only<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Use the network and security tools below only on your own systems, in your own lab environment or on targets for which you have written permission. Unauthorised scanning and access attempts are crimes.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Basic_File_and_Directory_Commands\"><\/span>Basic File and Directory Commands<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<table>\n<thead>\n<tr>\n<th>Command<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>pwd<\/code><\/td>\n<td>Shows the current directory<\/td>\n<\/tr>\n<tr>\n<td><code>ls -la<\/code><\/td>\n<td>Lists directory contents in detail, including hidden files<\/td>\n<\/tr>\n<tr>\n<td><code>cd \/etc<\/code><\/td>\n<td>Changes directory<\/td>\n<\/tr>\n<tr>\n<td><code>mkdir lab<\/code><\/td>\n<td>Creates a new directory<\/td>\n<\/tr>\n<tr>\n<td><code>cp source target<\/code><\/td>\n<td>Copies a file (<code>-r<\/code> for directories)<\/td>\n<\/tr>\n<tr>\n<td><code>mv old new<\/code><\/td>\n<td>Moves or renames<\/td>\n<\/tr>\n<tr>\n<td><code>rm file<\/code><\/td>\n<td>Deletes (<code>-r<\/code> for directories; use with care)<\/td>\n<\/tr>\n<tr>\n<td><code>cat file<\/code><\/td>\n<td>Shows file contents<\/td>\n<\/tr>\n<tr>\n<td><code>less file<\/code><\/td>\n<td>Shows long files page by page<\/td>\n<\/tr>\n<tr>\n<td><code>nano file<\/code><\/td>\n<td>Opens the file in a terminal editor<\/td>\n<\/tr>\n<tr>\n<td><code>find \/ -name \"*.conf\"<\/code><\/td>\n<td>Searches for files<\/td>\n<\/tr>\n<tr>\n<td><code>grep -i \"word\" file<\/code><\/td>\n<td>Searches for text in a file<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><span class=\"ez-toc-section\" id=\"User_Permission_and_System_Commands\"><\/span>User, Permission and System Commands<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<table>\n<thead>\n<tr>\n<th>Command<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>whoami<\/code><\/td>\n<td>Shows the logged-in user<\/td>\n<\/tr>\n<tr>\n<td><code>sudo command<\/code><\/td>\n<td>Runs the command with administrator privileges<\/td>\n<\/tr>\n<tr>\n<td><code>sudo su<\/code><\/td>\n<td>Switches to the root user<\/td>\n<\/tr>\n<tr>\n<td><code>passwd<\/code><\/td>\n<td>Changes the password<\/td>\n<\/tr>\n<tr>\n<td><code>chmod 755 file<\/code><\/td>\n<td>Changes file permissions<\/td>\n<\/tr>\n<tr>\n<td><code>chown user:group file<\/code><\/td>\n<td>Changes file ownership<\/td>\n<\/tr>\n<tr>\n<td><code>uname -a<\/code><\/td>\n<td>Kernel and system information<\/td>\n<\/tr>\n<tr>\n<td><code>df -h<\/code> \/ <code>free -h<\/code><\/td>\n<td>Disk and memory usage<\/td>\n<\/tr>\n<tr>\n<td><code>top<\/code> or <code>htop<\/code><\/td>\n<td>Running processes and resource usage<\/td>\n<\/tr>\n<tr>\n<td><code>ps aux<\/code> \/ <code>kill PID<\/code><\/td>\n<td>Lists \/ terminates processes<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>In current Kali releases the default user isn&#8217;t root; tasks that need administrator rights are done with <code>sudo<\/code>.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Package_Management_APT\"><\/span>Package Management (APT)<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<pre><code>sudo apt update                 # updates the package list\nsudo apt full-upgrade -y        # upgrades the system\nsudo apt install package-name   # installs a package\nsudo apt remove package-name    # removes a package\napt search keyword              # searches for packages\nsudo apt autoremove             # removes unneeded packages<\/code><\/pre>\n<p>Since Kali is a rolling distribution, regular <code>apt update<\/code> and <code>full-upgrade<\/code> runs are recommended. Kali&#8217;s tool bundles can be installed together with metapackages such as <code>kali-linux-default<\/code> or <code>kali-tools-web<\/code>.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Network_Commands\"><\/span>Network Commands<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<table>\n<thead>\n<tr>\n<th>Command<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>ip a<\/code><\/td>\n<td>Network interfaces and IP addresses<\/td>\n<\/tr>\n<tr>\n<td><code>ip route<\/code><\/td>\n<td>Routing table and default gateway<\/td>\n<\/tr>\n<tr>\n<td><code>ping -c 4 example.com<\/code><\/td>\n<td>Connectivity test<\/td>\n<\/tr>\n<tr>\n<td><code>traceroute example.com<\/code><\/td>\n<td>The path packets take<\/td>\n<\/tr>\n<tr>\n<td><code>dig example.com<\/code><\/td>\n<td>DNS lookup<\/td>\n<\/tr>\n<tr>\n<td><code>ss -tulpn<\/code><\/td>\n<td>Listening ports and services<\/td>\n<\/tr>\n<tr>\n<td><code>curl -I https:\/\/example.com<\/code><\/td>\n<td>Shows HTTP headers<\/td>\n<\/tr>\n<tr>\n<td><code>sudo systemctl start ssh<\/code><\/td>\n<td>Starts the SSH service<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>For details on DNS lookup commands, see our guide <a href=\"https:\/\/sunucun.com.tr\/blog\/how-to-do-a-dns-lookup\/\">how to do a DNS lookup<\/a>.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Basic_Commands_for_Common_Security_Tools\"><\/span>Basic Commands for Common Security Tools<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"Nmap_network_and_port_scanning\"><\/span>Nmap: network and port scanning<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<pre><code>nmap 192.168.56.0\/24            # finds live hosts on the lab network\nnmap -sV 192.168.56.101         # open ports and service versions\nnmap -p 22,80,443 192.168.56.101  # scans specific ports<\/code><\/pre>\n<h3><span class=\"ez-toc-section\" id=\"Wireshark_and_tcpdump_traffic_analysis\"><\/span>Wireshark and tcpdump: traffic analysis<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<pre><code>sudo tcpdump -i eth0 port 80    # watches traffic on port 80\nwireshark &amp;                     # starts the graphical interface<\/code><\/pre>\n<h3><span class=\"ez-toc-section\" id=\"Metasploit_Framework\"><\/span>Metasploit Framework<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<pre><code>sudo msfdb init                 # prepares the database\nmsfconsole                      # opens the console\nsearch ms17-010                 # searches for modules (inside the console)<\/code><\/pre>\n<h3><span class=\"ez-toc-section\" id=\"Web_tests\"><\/span>Web tests<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<pre><code>nikto -h http:\/\/192.168.56.101  # scans a web server for known issues\nwhatweb http:\/\/192.168.56.101   # identifies the technologies used<\/code><\/pre>\n<p>The 192.168.56.x addresses in the examples represent VirtualBox&#8217;s host-only lab network, which only communicates with the host computer. Try these tools on test machines you set up yourself.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Useful_Tips\"><\/span>Useful Tips<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li>Use <code>man command<\/code> or <code>command --help<\/code> to see how any command works.<\/li>\n<li>The <strong>Tab<\/strong> key completes command and file names; <strong>Ctrl + R<\/strong> searches your command history.<\/li>\n<li><code>history<\/code> lists the commands you&#8217;ve run.<\/li>\n<li>Use <code>command &gt; result.txt<\/code> to save output to a file.<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Frequently_Asked_Questions\"><\/span>Frequently Asked Questions<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"Do_Kali_Linux_commands_work_on_Ubuntu\"><\/span>Do Kali Linux commands work on Ubuntu?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Almost all basic Linux commands are the same. Security tools need to be installed on Ubuntu separately.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"I_get_a_%E2%80%9Ccommand_not_found%E2%80%9D_error_What_should_I_do\"><\/span>I get a &#8220;command not found&#8221; error. What should I do?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>The tool may not be installed. Install it with <code>sudo apt install tool-name<\/code>, or find the right package name with <code>apt search<\/code>.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Whats_the_best_way_to_learn_the_commands\"><\/span>What&#8217;s the best way to learn the commands?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Setting up a lab in a virtual machine and trying the commands on your own test systems is the most lasting way to learn.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Kali Linux commands are largely the same as those in other Linux distributions, because Kali is Debian-based. The difference is that Kali also runs security testing tools from the command line. In this guide you&#8217;ll find basic file and system commands, package management, network commands and the basic usage of common security tools, with examples.&hellip;<\/p>\n","protected":false},"author":1,"featured_media":21675,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[1522],"tags":[],"class_list":["post-21674","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-isletim-sistemleri"],"_links":{"self":[{"href":"https:\/\/sunucun.com.tr\/blog\/wp-json\/wp\/v2\/posts\/21674","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sunucun.com.tr\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sunucun.com.tr\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sunucun.com.tr\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sunucun.com.tr\/blog\/wp-json\/wp\/v2\/comments?post=21674"}],"version-history":[{"count":1,"href":"https:\/\/sunucun.com.tr\/blog\/wp-json\/wp\/v2\/posts\/21674\/revisions"}],"predecessor-version":[{"id":21936,"href":"https:\/\/sunucun.com.tr\/blog\/wp-json\/wp\/v2\/posts\/21674\/revisions\/21936"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sunucun.com.tr\/blog\/wp-json\/wp\/v2\/media\/21675"}],"wp:attachment":[{"href":"https:\/\/sunucun.com.tr\/blog\/wp-json\/wp\/v2\/media?parent=21674"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sunucun.com.tr\/blog\/wp-json\/wp\/v2\/categories?post=21674"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sunucun.com.tr\/blog\/wp-json\/wp\/v2\/tags?post=21674"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}