50+ essential and practical commands of debian | linux commands cheat sheet

40+ essential and practical commands of debian | linux commands cheat sheet




50+ essential and practical commands of Debian | Linux Commands Cheat Sheet


Here, we’ve listed over 50 essential and practical commands for Debian-based Linux terminals. This post is designed to help those who are learning Linux or anyone who may have forgotten a command.




  • linux system commands

  • shutdown  now

turn off 

 

  • reboot

restart 

 

  • date

print date 

 

  • lshw

hardware information list

 

  • systemctl [status, start, restart, stop, enable, disable] service

manage services

 

  • uptime

print uptime

 

  • useradd [username]

create a new account

 

  • passwd [username]

add or change password

 

  • userdel [username]

remove a user

 

  • su [username]

switch user

 

  • sudo [command]

run command as root

 

  • who 

print current username





  • linux package management by apt

  • apt search [package]

find packages by name

 

  • apt install [package]

installing a package

 

  • apt reinstall [package]

reinstalling a package

 

  • apt remove [package]

remove a package

 

  • apt update

update package repository (etc/apt/sources.list)

 

  • apt upgrade
update packages

 

  • apt autoremove
remove useless dependencies

 

  • apt list

list of installed package

 

  • apt show [package]

show a package info






  • linux package management by dpkg

  • dpkg -i [package.deb]

install package

 

  • dpkg -r [package]

remove package

 

  • dpkg -s [package]

search package

 

  • dpkg –l

list of installed packages




  • linux file and directory commands

  • cd [directory] 

change directory

 

  • cd ../

moves a directory up

  • cp [source] [destination]

copy file

 

  • ls [directory]

list files

 

  • file [name]

checks a file type

 

  • mkdir [dir1]

make directory

 

  • pwd

print the current directory path

 

  • rm  [dir1]

deletes files from a directory

 

  • rmdir [name]

delete empty directories

 

  • mv [existing] [new]

move a file or folder

 

  • zip [file1.zip] [file2]

compresses one or multiple files

 

  • unzip [file1.zip]

extract a compressed file

 

  • rar [file]

make rar file

 

  • unrar [file.rar]

extract a rar file

 

  • nano or mousepad or gedit or vi [file]
text editor

 

  • find [name]
search in current directory (* for any ex: name*)

 

  • chmod [u=rwx, g=rwx, o=rwx] [file,directory]
change the permissions of files or directory[user,group,other] | [read,write,run]

 

  • chown newuser:newgroup [file,directory]
change the ownership of files or directories


 


  • linux network commands

  • wget or curl [url]

download  page content or file

 

  • ip link show

show network interfaces details

 

  • ip link set [interface] up

enable network interface

 

  • ip link set [interface] down

disable network interface

 

  • ip address show

show network interfaces ip address

  

  • ip link set [interface] name [newname]

change network interface name

 

  • ip address add [ip/subnet] dev [interface]

add new ip address from network interface

 

  • ip address del [ip/subnet] dev [interface]

delete ip address from network interface

 

  • ip route add default via [ip]

add default gateway

 

  • nslookup [domain]

convert domain to ip by dns server

 

  • nslookup [ip] 

convert ip to domain by dns server

 

  • ssh -p [port] [username]@[ip, domain]

make ssh connection

 

  • telnet [ip] [port]

make telnet connection

 

  • traceroute [ip, domain]

print routers between you and destination

 

  • ping  [ip, domain]

ping command

Comments

Popular

hack chrome dino game