Command line in 10 slides or less

 

What is the commandline?

 

Neat tool for giving your computer instructions.

Your computer has a name, its not just a 'computer'

$ hostname

Give it some instructions

Make a new folder directory --> mkdir

 

Enter into that directory --> cd

 

Create a new blank file in that directory --> touch "filename".extension

 

List all items in that directory --> ls

More on navigation

When lost in terminal world, type this --> pwd

 

 If you want to get out of where you are --> cd .. 

 

Displaying contents of a file

Display content of any file(opens different screen) --> less "filename"

 

 Display content(this is inline)--> more "filename"

 

Concatenate files and output them --> cat "filename".

 

Moving, copying and renaming stuff

Copy a file --> cp "filename" destination

 

Renaming a file --> mv "oldname" "newname"

 

Physically move a directory --> mv "currentlocation" "destination"

 

 

 

Deleting files and directories

Delete a file --> rm "filename"


Delete a directory --> rm -rf "directoryname"




That's all folks!

Commandline basics in 10 slides or less

By Alvin Kato

Commandline basics in 10 slides or less

Basic unix commands for beginners

  • 145