^

Command Line Hints

Article 128 in Linux

2021-03-08 17:22:19 from bugfish
Command Line Hints
Linux / Hints
Last Review on: 2022-05-21 07:53:17 | Hits: 504

Find a String inside Files
grep -rnw '/path/to/somewhere/' -e 'pattern'

Find File in Folder Structure
find ./ -name card.php

Display Linux System Informations
uname

Display Kernel Releases Informations
uname -r

Display Systems uptime and load average
uptime

Show the systems hostname
hostname

Display IP-Adress of System
hostname -i

Show System Reboot History
last reboot

Display current date and time
date

Change or Query the system Clock
timedatectl

Display the current Calender Month and Day
cal

Display current logged in Users to the System
w

Display Informations about user who you are logged in as
whoami

Display Informations about a user
finger USERNAMEHERE

Change the current work directory
cd

See Bootup Messages
dmesg

Display informations about CPU
cat /proc/cpuinfo

Display Informations about Memory
cat /proc/meminfo

Display Informations about System Hardware Configuration
lshw

Display Block Devices Related Informations
lsblk

Display free and used Memory on the System (-m for MB)
free -m

Display PCI Devices in Diagram
lspsi -tv

Display USB Devices in Diagram
lsusb-tv

Display Hardware informations from BIOS
dmidecode

Display Informations about disk data (select right device)
hdparm -i /dev/xda

Start read speed test on device XDA
hdparm -tT /dev/xda

Test for corrupted Blocks on Disk
badblocks -s /dev/xda

Show Active Processs
ps

Searches for the ID of Process 'telnet'
ps aux | grep telnet

Displays Memory Map of Processes
pmap

Display all running processes like a task manager
top

Terminate a Process with an ID
kill IDHERE

Kill a processes named apache2
killall apache2

Visualize Processes in a Tree
pstree

Display Free Space on Mounted Systems
df -h

Display Free Inodes on Filesystems
df -i

Show Disk Partitions, sizes and types
fdisk -l

Display disk usage in the current directory in human readable format
du -sh

Display Details of the active user
id

Show the last login in the system
last

Show who is logged into the system now
who

Add the group admin
groupadd admin

Add the user sam
adduser sam

Deletes the user sam
deluser sam

I do not guarantee the reliability of the information given here, the code described on this page is executed at your own risk and in the event of damage or other unforeseeable consequences I am in no way responsible or liable.
Currently 1 Upvotes!
captcha image
System - 2021-06-18 02:19:36
We appreciate comments on our site!
Theme
Switch: 161 | Arrive: 224
This Website is using Session Cookies for Site Functionality and AWStats.