Top 50 Commands for Beginners on Kali Linux

mv: Moves or renames files or directories.

  • Uses: mv file.txt new_location/, mv oldname.txt newname.txt (rename).

file: Determines file type (e.g., text, executable, image).

  • Example: file important_file
  1. cat: Concatenates and displays file content to the standard output.
    • Example: cat readme.txt

less: Views file content one screen at a time, allowing scrolling (better for large files than cat).

head: Displays the beginning (first 10 lines) of a file.

tail: Displays the end (last 10 lines) of a file.

  • Uses: tail -f logfile.log (monitors the file in real-time).

apt update: Downloads package lists from repositories (essential before installing/upgrading).

apt upgrade: Installs the newest versions of all currently installed packages.

apt install: Installs new software packages.

  • Example: apt install vlc

apt remove: Removes an installed package.

dpkg -i: Installs a local .deb package file.

service: Manages system services (start, stop, restart, check status).

  • Example: service apache2 start

ps aux: Displays currently running processes (detailed snapshot).

top: Displays running processes in real-time (interactive system monitor).

kill: Sends a signal (usually termination) to a process by its Process ID (PID).

  • Example: kill 1234

bg: Resumes a suspended job and runs it in the background.

fg: Brings a background job back to the foreground.

sudo: Executes a command with root (super-user) privileges.

  • Example: sudo apt update

su: Switches the current user to another user, often root.

passwd: Changes a user’s password.