pilux.net Home

Hardware Information

lscpu: See CPU information.
lsblk: See information about block devices.
lspci -tv: Show PCI devices in a tree-like diagram.
lsusb -tv: Display USB devices in a tree-like diagram.
lshw: List hardware configuration information.
cat /proc/cpuinfo: Show detailed CPU information.
cat /proc/meminfo: View detailed system memory information.
free -h: Display free and used memory.
hdparm -i /dev/sda: Display disk data information.
badblocks -s /dev/sda: Test for unreadable blocks on the device/disk.
fsck /dev/sda: Run a disk check on an unmounted disk or partition.

Searching

find / -name example.txt: Find files and directories that match the specified pattern in a specified location.
grep 'hello' filename.txt: Search for a specific pattern in a file with grep.
locate updatedb: Locate all files and directories related to a particular name.
awk '/pattern/ { print $0 }' filename: Print all lines matching a pattern in a file.
sed 's/original/replacement/' filename: Find and replace text in a specified file.

Directory Navigation

pwd: Show the directory you are currently working in.
cd /path/to/folder: Change directory to specified path.
cd ..: Move up one directory level.
cd -: Change to the previous directory.
dirs: Show current directory stack.

File Permissions

chmod 777 /path/to/file: Assign full permission to everyone.
chmod 755 /path/to/file: Assign standard file permissions.
chown user:group /path/to/file: Change file ownership.
chgrp group /path/to/file: Change file group.

Packages

apt install package_name: Install APT package.
yum install package_name: Install YUM package.
dpkg -i package.deb: Install .deb package.
rpm -i package.rpm: Install .rpm package.
snap install package_name: Install Snap package.

Processes

ps: List active processes.
pstree: Show processes in tree diagram.
top: See all running processes.
kill: Terminate a process.
bg: Resume stopped process in background.
fg: Bring process to foreground.

System Information

uname -a: See kernel information.
uptime: Display system uptime.
hostname: View system hostname.
date: See current date.
whoami: See current user.
finger: Show user information.

Network

ip address show: List IP addresses.
ping: Ping remote host.
netstat -an: Show active ports.
dig: Show DNS information.
nslookup: Receive domain name information.

Users and Groups

id: See user identity.
whoami: See current user.
useradd: Create new user.
groupadd: Create new group.
passwd: Change password.

SSH

ssh: Connect to host securely.
ssh-keygen: Generate SSH keys.
scp: Securely copy files.
sftp: Secure file transfer.

File Compression

tar cf archive.tar folder: Archive files.
tar xf archive.tar: Extract archived files.
gzip file: Compress/decompress .gz files.
bzip2 file: Compress/decompress .bz2 files.

Keyboard Shortcuts

Ctrl + C: Kill process.
Ctrl + Z: Stop process.
Ctrl + Y: Paste clipboard contents.
Ctrl + R: Recall last command.
clear: Clear terminal screen.
man command: Show manual for command.