Useful Linux Commands-1
I compiled useful linux commands
System
| Command | Description |
| uname -a | Displays system information |
| uname -r | Displays kernel version |
| uptime | Gives a one-line display the current time, how long the system has been running, how many users are currently logged on, the system load averages for the past 1, 5, and 15 minutes |
| hostname | Displays the system host name |
| last reboot | Display last reboot times |
| date | Displays the system date and time |
| cal | Display the calendar for this month, with today highlighted |
| w | Displays a list of logged on users and their processes as shown below |
| whoami | Displays the name of the user who runs the command |
| finger itech | Display information about the user itech |
Hardware
| Command | Description |
| dmesg | Displays the kernel messages |
| cat /proc/cpuinfo | Displays information about the processor |
| cat /proc/meminfo | Displays information about memory (RAM) |
| cat /proc/interrupts | Displays CPU kernel system interrupt list |
| lshw | Dispays the system’s hardware configuration information |
| lsblk | Display the disk partition table |
| free -m | Display the amount of memory in megabytes |
| lspci -tv | Lists PCI devices |
| lsusb -tv | Lists USB devices |
| dmidecode | Displays BIOS hardware information |
| hdparm -i /dev/sda | Informs about disk |
| hdparm -tT /dev/sda | Displays the reading speed test for the used disk |
| badblocks -s /dev/sda | Checks HDD for bad sectors |
Users
| Command | Description |
| id | Displays the user id information |
| last | Displays a list of all users logged in (and out) since that file was created |
| who | Print information about users who are currently logged in |
| groupadd | Adds a new group in the system |
| useradd | Adds a new user in the sysem |
| userdel | Deletes a user account and all associated files |
| usermod | Modifies a user account |
