Skip to content

Instantly share code, notes, and snippets.

@imralpharvin
Last active September 13, 2020 20:24
Show Gist options
  • Select an option

  • Save imralpharvin/996fac6cd2925836d475cb5118d1a875 to your computer and use it in GitHub Desktop.

Select an option

Save imralpharvin/996fac6cd2925836d475cb5118d1a875 to your computer and use it in GitHub Desktop.
bash notes

Linux bash commands

User administration

su -

Super user Goes to directory root

su

Goes to home directory

Network Administration

ping

Ifconfig

File Management

ls

List directory contents

pwd

Print current directory

cd

Change directory

mv

Move files

rm 

Remove files

mkdir

Make directories

rmdir

Remove empty directories

cat

Concatenate files

chmod perm filename

Change mode, file permission

Archive Files

tar

GNU tape archiver

gzip/gunzip(decompress)

GNU compression program

bzip2/bunzip2(decompress)

Block-sorting file compressor

Useful

man

manual/help

hostname

Print name of local host

whoami

Print login name

Process Control

any_command &

Run any command in the background

ps

List current processes

kill PID

Kill process (PID)

./

Run a program

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment