Basic Linux commands

Basic Linux commands

COMMANDDESCRIPTIONWHY THE NAME?

man

Show help (the manual)

manual


which

Find out where a command is

which location?

--help

Find help on any command

help!

Ctrl+C

Stop the current program

logout

Exit the current login shell

passwd

Change your password

password

sudo

Execute a command as a superuser

super-user do

ssh

Create an SSH connection (a terminal) to a server

secure shell

cd

Change the current directory (folder)

change directory

ls

List files in a directory

list

mkdir

Make/create a new directory

make directory

pwd

Print current directory

print working directory

cp

Copy files and directories

copy

rm

Delete files and directories

remove

cat

Print the contents of a file

concatenate

chmod

Change the permissions of a file or directory

change mode

chown

Change the owner and group of a file or directory

change owner

diff

Show the difference between two files

difference

file

Show the type of a file

less

Browse the contents of a file

opposite of 'more'

locate

Find files with names matching a pattern

tail

Print the last few lines of a file

tail end (of something)

touch

Create a new file or update an existing one

apt

Install and manage packages in Ubuntu

Advanced Package Tool

curl

Get a web page or API

client URL

dig

Look up DNS information

domain information gather

ip addr

Show your network configuration

IP address

ping

Check to see if a server is alive

kill

Terminate a program (process)

top

Show the top processes

table of processes

ps

List running processes

processes

Ctrl+Z

Suspend a process

fg

Resume a process

foreground

jobs

Lists all active jobs (processes)

date

Show the current date and time

df

Show free disk space

disk free

du

Show disk space usage

disk used

shutdown

Halt or reboot your machine

uname

Print system information

UNIX name

uptime

Show how long the system has been running

Did you find this article valuable?

Support Arnav Singh by becoming a sponsor. Any amount is appreciated!