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! π»β¨