Windows/Linux Useful Commands

There are hundreds of commands that are used in day-to-day Windows administration. Some Useful Commands to Be Run from the Windows Command Prompt are as follows:

S.No. Command Usage Description
1 tasklist tasklist Lists all the tasks that are currently active on the system (similar to what’s displayed in Task Manager).
2 tracert tracert < host name > Traces the routing path from your system to the target host.
3 ipconfig ipconfig /all Lists all network interfaces along with IP and MAC if assigned.
4 driverquery driverquery Lists all the device drivers currently installed on the system.
5 cipher cipher /w: Makes folder content unrecoverable by overwriting the deleted data.
6 assoc assoc Lists the associations between file extensions and their corresponding programs.

Beyond the common Linux commands (cd, ls, man, mkdir, rm, cp, date, time, cat, echo, vi and so on), below we listed out some of the commands that might be useful from a security perspective.

S.No. Command Usage Description
1 uname uname -a Returns the Linux kernel version and architecture details.
2 sudo sudo < command > Gives root privileges temporarily for running a command.
3 last last Gives details about when a particular user was last logged in.
4 diff diff < folder1 > < folder2 > Finds and prints differences in files present in two folders.
5 history history Prints a list of the commands that were previously fired from the terminal.
6 uptime uptime Returns the time duration for which the system has been running since the last boot, or start.
7 w w Prints details about users who have logged in with CPU usage.
8 crontab crontab -l For the current user, this command lists any scheduled jobs/tasks.
9 lsof lsof Lists files opened by the current user.
10 kill kill -9 < PID > Kills the process with the process ID passed in the argument.
You may also like:

Sarcastic Writer

Step by step hacking tutorials about wireless cracking, kali linux, metasploit, ethical hacking, seo tips and tricks, malware analysis and scanning.

Related Posts