Learn Kali LinuxBeginner’s Roadmap to Ethical Hacking (2025) (3)

Basic Kali Linux Commands: A Beginner’s Guide for Ethical Hacking (Part -4)

Kali Linux commands: more, less, man, uptime, id, lsusb, lspci, ulimit, wc, and lsblk.


Whether you’re just starting out with Kali Linux or diving deeper into your cybersecurity journey, mastering essential commands is the key to working efficiently in the terminal. Kali Linux, a Debian-based system widely used for penetration testing and ethical hacking, offers a rich collection of commands that give you powerful control over your system.

In this friendly guide, we’ll explore 10 fundamental commands that every Kali Linux user should know: more, less, man, uptime, id, lsusb, lspci, ulimit, wc, and lsblk. We’ll explain each command with real-life examples and practical guidance so you can apply them immediately in your workflow.


πŸ” 1. more – View Content One Page at a Time

The more command lets you view the content of a file one screen at a time. This is super handy when you’re dealing with long configuration or log files.

πŸ“˜ Syntax:

more filename

βœ… Example:

more /etc/passwd

This will display the /etc/passwd file page-by-page. Press Space to go to the next page or q to quit.

πŸ“Œ Use Case:

When a log file is too big for cat, use more to scroll through comfortably.


πŸ“œ 2. less – A More Powerful Pager

less is similar to more, but with more features. You can scroll backward as well as forward. It doesn’t load the entire file at once, which makes it faster and more efficient.

πŸ“˜ Syntax:

less filename

βœ… Example:

less /var/log/syslog

Press Space to go forward, b to go back, /searchterm to search inside the file, and q to quit.

πŸ†š Why less is better than more:

  • Bidirectional navigation
  • Supports search
  • Loads faster

πŸ“– 3. man – The Manual Pages

Want to know how a command works? Use the man command to open the manual for it.

πŸ“˜ Syntax:

man commandname

βœ… Example:

man ls

This will open the manual for the ls command. Use arrow keys to navigate.

πŸŽ“ Pro Tip:

If you’re confused about any command, just type man before it. For example:

man grep

πŸ•’ 4. uptime – Check System Running Time

uptime shows how long the system has been running, along with the current time, number of users, and system load averages.

πŸ“˜ Syntax:

uptime

βœ… Example Output:

14:21:36 up 3 hours, 2 users, load average: 0.15, 0.10, 0.05
  • 3 hours: Time since the system was last rebooted
  • 2 users: Active sessions
  • Load average: System load over 1, 5, and 15 minutes

πŸ›  Use Case:

Use uptime during performance checks or troubleshooting.


πŸ‘€ 5. id – Get User and Group Info

The id command displays your user ID (UID), group ID (GID), and group memberships.

πŸ“˜ Syntax:

id

βœ… Example Output:

uid=1000(kali) gid=1000(kali) groups=1000(kali),27(sudo)

You can also check another user’s info:

id root

🎯 Why it matters:

Great for checking permissions or confirming whether you have sudo privileges.


πŸ”Œ 6. lsusb – List USB Devices

The lsusb command lists all USB buses and connected USB devices.

πŸ“˜ Syntax:

lsusb

βœ… Example Output:

Bus 001 Device 003: ID 1a2b:3c4d Kingston DataTraveler
Bus 001 Device 002: ID 0e0f:0002 VMware Virtual USB

πŸ’‘ Use Case:

Troubleshooting USB device issues or checking if a USB drive is detected.


πŸ’» 7. lspci – List PCI Devices

Use lspci to display all PCI buses and devices (like network cards, sound cards, etc.).

πŸ“˜ Syntax:

lspci

βœ… Example Output:

00:1f.2 SATA controller: Intel Corporation Device
00:02.0 VGA compatible controller: Intel Corporation HD Graphics

πŸ” Helpful For:

  • Finding your graphics or sound card model
  • Checking driver support for PCI hardware

🧱 8. ulimit – Control Shell Resource Limits

ulimit is used to control the resources available to the shell and processes started by it. You can limit memory usage, open files, CPU time, etc.

πŸ“˜ Syntax:

ulimit [option]

βœ… Example:

Check current file size limit:

ulimit -f

Set a limit on the size of files created:

ulimit -f 1000

This limits file size to 1000 blocks (~1MB).

⚠ Note:

You need to use ulimit carefullyβ€”misusing it can prevent certain operations.


πŸ”’ 9. wc – Word Count in a File

wc stands for word count, but it can also count lines and characters.

πŸ“˜ Syntax:

wc [options] filename

βœ… Example:

wc /etc/passwd

Output:

45  72 2048 /etc/passwd

This means:

  • 45 lines
  • 72 words
  • 2048 characters

Popular Options:

  • -l: count lines only
  • -w: count words
  • -c: count bytes
wc -l myfile.txt

πŸ’½ 10. lsblk – List Block Devices

lsblk displays information about all available or connected block devices (like hard drives, SSDs, USBs).

πŸ“˜ Syntax:

lsblk

βœ… Example Output:

NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda      8:0    0  100G  0 disk
β”œβ”€sda1   8:1    0   50G  0 part /
β”œβ”€sda2   8:2    0   50G  0 part /home

πŸ”§ Use Case:

Helpful when managing partitions or checking disk mounts.


🧠 Final Thoughts

These 10 Kali Linux commands are the foundation of any power user’s toolset. Whether you’re browsing logs, checking uptime, monitoring devices, or reading manuals, they help you get things done faster and smarter.

πŸ›‘ Why These Commands Matter in Kali Linux:

As a penetration tester or ethical hacker, you’ll often need to:

  • Read configuration files (more, less)
  • Understand system usage (uptime, ulimit)
  • Gather hardware info (lsusb, lspci, lsblk)
  • Learn tools in real-time (man)
  • Count data and audit logs (wc)
  • Check user info (id)

Mastering them will make your terminal experience smoother and more productive.


πŸš€ Keep Practicing!

Here’s a mini challenge for you:
Try running each of these commands on your Kali Linux terminal and explore their options using the man pages. For example:

man lsblk

You’ll be surprised how many advanced tricks each simple command offers!


If you enjoyed this guide, don’t forget to check out more tutorials and tech tips at hiranmoypati.com β€” your go-to place for learning ethical hacking, Linux, and tech in a beginner-friendly way.

Happy Hacking! πŸ’»βœ¨