Basic Terminal Usage - Cheat Sheet to make the command line EASY

LearnCode.academy · Beginner ·🛠️ AI Tools & Apps ·12y ago
Skills: Linux & CLI90%

Key Takeaways

Provides a cheat sheet for basic terminal usage and command line navigation

Full Transcript

all right a big part of being a web developer these days is using the terminal uh the terminal is something that creative and visual people kind of avoid uh in a lot of ways because it kind of there's no instruction manual there's no buttons to it and you it it feels like it's hard to wrap your mind around what all the terminal is we're going to break that down to a very low level it's very simple it's just a few basic commands uh to be really comfortable in the terminal so we're going to do that today and this will hopefully really help you out if you need to open it you've never opened it before you're going to go applications uh utilities and then terminal and there it is and I'll drag terminal onto my doc so it's saved there um and here we are at our terminal and by default it's going to open us up to our Tilda directory which is our users's home directory let's get into our first command our first command is LS um and if you're on Windows that's going to be dir for the most part these commands are going to be the same uh but this is really a Mac Linux um tutorial you may have to Google you know what the commands are but the principles are all exactly the same so here we go LS you can see this is my home directory for my user um and so LS is going to show me my list of all the files and the folders the next command we're going to use is CD CD is change directory I can go CD space pictures and LS and you can see this is my pictures directory for my home users I don't really have any pictures just my my photo library and my photo booth Library um and then I can also go CD do dot which is going to go up a level into my previous directory so now I'm back to my user directory uh a hot key that you can do is command K Apple K which clears out your terminal uh which is very useful command um you can see so I'm back to my home directory um you can also go CD forward slash which is going to take me to my root directory which is the same as just going Macintosh h D you can see that's this applications Library System blah blah blah that I'm now at my root directory so I can go back to my user directory or I can go there the long way which is CD space users cmn there we go I'm back at my cmn my home login directory so if I want to go to multiple directories at a time I can go CD space code I know I have a code directory sandbox I have a Sandbox directory test I just went into a up a level to code up a level to sandbox up a level to test I just went into that folder and if I hit LS I have one folder here called another folder so let's go ahead and make another directory here it's mkdir make directory mkdir yet another folder so if I hit LS there we go yet another folder um I'm actually going to open this test folder that I'm in right now so you can see I made yet another folder let's make another one and again there we go and again so now I have three folders in here um if I want to remove a folder I can RM and again oh it's a it's a full directory so I have to use RMR which is recursive and again there we go so if I want to actually remove a file I can just use RM for remove um or I can use RM R which will remove recursively anything inside of that entire directory so we're almost out of commands I know you're probably freaking out that this is all the terminal is it's LS it's CD it's make directory and it's RM that's pretty much it I'll get to show you a couple cool commands here but let's do one more and that is touch that will create a file for me so I touched index.html why put it under there I have no idea so I touched index.html that made a blank file called index.html I can open index.html and it will open it in whatever my default program for that is which in this case is Chrome so I get an empty page I can open index.html and if I do- a and then in these quotes I can put a program name it does it is case sensitive so I can't do lowercase Sublime Text I have to do uppercase Sublime upper case text and there we go here's my index.html so I can just kind of go I'm a web page save it close it so now if I open index HTML I'm a web page there we go um and I can also open it up in Sublime Text again and there it is I can edit it and save it this is actually pretty convenient uh I I'm using all the time now open commands from the command line because it's really conven vent uh one thing you'll notice I'm doing is when I hit the up and down arrows it goes through all my previous commands another thing that's very very very useful uh because lots of times you'll just want to do a command over and over and over again and it's a lot easier to hit up um another thing you can do is open Dot that's going to open my current folder that I'm in which is test so if I hit open Dot it's going to open it in finder which is the default so let me show you again open Dot opens finder if you're ever in the com the command line and there's just something you want to do that's more convenient for you in in finder like say rename this yet another folders you know sometimes that's just easier for you to do in finder uh if you're not comfortable with a command line and you just want to open Dot I can also open Dot with application Sublime Text and that's going to take me to my whole folder you know so I got my whole folder viw now in Sublime Text very very useful I can do that in any other program I want um and so that's a great command gosh we're almost out of basic command line commands uh pretty much the only other thing that we're going to want to do let's see we've done RM so let me list I will open Dots so we can see this happen in action so I can RM index.html let's delete it there we go I can rm- R my yet another folder uh whoops it's just called yet it's yet another folder Z I renamed it and if you want to rename things let me touch index.html again there it's back so what I can do is I can rename it that's MV it's called it's for move uh but move is actually how you rename it I'm going to rename index.html to index 2html there we go it just got renamed I can rename another folder this folder there we go it just got renamed so the MV is your rename that's kind of counterintuitive to a lot of people but you're really not renaming the file you're moving the file to a different location uh as far as the command lines concerned you're moving it to a different URL or path so to speak uh so that's pretty much that I'll show you one more cool trick and we'll be done with this is at any point in time you can hit tab to autocomplete so if I wanted to open in if I just hit I in and hit tab it's going to autocomplete that for me ah that saves so many typos especially if you have complex file names so if I go open in index 2html there we go it opened it if I go open I can't do it on uh program names unfortunately uh but I was able to autocomplete that for there and then I can also open this I can just hit tab this folder a there we go this folder is now open in Sublime Text so that's pretty much the commands CD you can go cd/ to go to your root directory you can go cd/ Tilda to go to your user directory LS is going to show you your file names mkd iir and these will all be in the description uh as your cheat sheet make directory rename a file or should I say move a file um and remove a file uh which you have to do SLR for directories that's your intro to the terminal do it play around use some commands have fun and know that you don't have to be afraid of the terminal anymore thanks have a great day

Original Description

Freak out no more...here's how to use the terminal/command line! Using the terminal is EASY, and more importantly, it's a HUGE part of being a web developer these days. If you avoid the terminal, it will only hold you back. This tutorial will teach you how to use the command line in a few easy steps. You'll be comfortable in no time. ls - list files cd {directory name} - change directory cd / - go to root (top) directory cd ~ - go to user home directory cd .. - go up a level mkdir {file name} - make a directory touch {filename} - create an empty file rm {filename} - remove a file rm -r {directory name} - remove a directory and all files within mv {filename} {new filename} - rename a file or folder open {filename} - open file in default program open {filename} -a "{program name}" - open file in specific application open . - open current directory HOT KEYS Command+k - clear the terminal screen Tab - autocomplete (if more than one files match, nothing happens, you will need to add more characters) Up/Down Arrows - previous commands -~-~~-~~~-~~-~- Also watch: "Responsive Design Tutorial - Tips for making web sites look great on any device" https://www.youtube.com/watch?v=fgOO9YUFlGI -~-~~-~~~-~~-~-
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from LearnCode.academy · LearnCode.academy · 33 of 60

1 Web Development Tutorial for Beginners (#1) - How to build webpages with HTML, CSS, Javascript
Web Development Tutorial for Beginners (#1) - How to build webpages with HTML, CSS, Javascript
LearnCode.academy
2 Web Development Tutorial for Beginners (#2) - Basic CSS - How to build a website with HTML & CSS
Web Development Tutorial for Beginners (#2) - Basic CSS - How to build a website with HTML & CSS
LearnCode.academy
3 How to create CSS Layouts - Web Development Tutorial for Beginners (#3) - with HTML & CSS
How to create CSS Layouts - Web Development Tutorial for Beginners (#3) - with HTML & CSS
LearnCode.academy
4 Bootstrap Tutorial For Beginners - Responsive Design with Bootstrap 3 - Responsive HTML, CSS
Bootstrap Tutorial For Beginners - Responsive Design with Bootstrap 3 - Responsive HTML, CSS
LearnCode.academy
5 Angularjs Tutorial for Beginners - learn Angular.js using UI-Router
Angularjs Tutorial for Beginners - learn Angular.js using UI-Router
LearnCode.academy
6 CSS Tutorial - Web Development Tutorial for Beginners (#5)
CSS Tutorial - Web Development Tutorial for Beginners (#5)
LearnCode.academy
7 Node.js tutorial for beginners - an introduction to Node.js with Express.js
Node.js tutorial for beginners - an introduction to Node.js with Express.js
LearnCode.academy
8 Github Tutorial For Beginners - Github Basics for Mac or Windows & Source Control Basics
Github Tutorial For Beginners - Github Basics for Mac or Windows & Source Control Basics
LearnCode.academy
9 Javascript Tutorial - Programming Tutorial for Beginners Pt 1
Javascript Tutorial - Programming Tutorial for Beginners Pt 1
LearnCode.academy
10 Javascript Tutorial - jQuery Tutorial for Beginners Pt 2
Javascript Tutorial - jQuery Tutorial for Beginners Pt 2
LearnCode.academy
11 AngularJS Directives Tutorial - Part 1 - Demystifying Angular Directives
AngularJS Directives Tutorial - Part 1 - Demystifying Angular Directives
LearnCode.academy
12 WATCH THIS IF YOU WANT TO BECOME A WEB DEVELOPER! - Web Development Career advice
WATCH THIS IF YOU WANT TO BECOME A WEB DEVELOPER! - Web Development Career advice
LearnCode.academy
13 YEOMAN TUTORIAL - Master Front-End Workflow with Yeoman, Grunt and Bower
YEOMAN TUTORIAL - Master Front-End Workflow with Yeoman, Grunt and Bower
LearnCode.academy
14 BOWER! - Streamline Web Workflow with Bower Package Manager
BOWER! - Streamline Web Workflow with Bower Package Manager
LearnCode.academy
15 Chrome DevTools for CSS - Better CSS Coding & CSS Debugging with Developer Tools
Chrome DevTools for CSS - Better CSS Coding & CSS Debugging with Developer Tools
LearnCode.academy
16 GITHUB ATOM - Why Atom.io will be your favorite Text Editor!
GITHUB ATOM - Why Atom.io will be your favorite Text Editor!
LearnCode.academy
17 GITHUB PULL REQUEST, Branching, Merging & Team Workflow
GITHUB PULL REQUEST, Branching, Merging & Team Workflow
LearnCode.academy
18 Pimp that Terminal - Add shortcuts and functions to your .bash_profile to simplify routine tasks
Pimp that Terminal - Add shortcuts and functions to your .bash_profile to simplify routine tasks
LearnCode.academy
19 jQuery Tutorial #3 - Writing Smarter, Better Code - jQuery Tutorial for Beginners
jQuery Tutorial #3 - Writing Smarter, Better Code - jQuery Tutorial for Beginners
LearnCode.academy
20 jQuery Tutorial #2 - Event Binding - jQuery Tutorial for Beginners
jQuery Tutorial #2 - Event Binding - jQuery Tutorial for Beginners
LearnCode.academy
21 jQuery Tutorial #1 - jQuery Tutorial for Beginners
jQuery Tutorial #1 - jQuery Tutorial for Beginners
LearnCode.academy
22 Node.js MongoDB Tutorial using Mongoose
Node.js MongoDB Tutorial using Mongoose
LearnCode.academy
23 Node.js tutorial for beginners 2014 - an introduction to Node.js with Express.js
Node.js tutorial for beginners 2014 - an introduction to Node.js with Express.js
LearnCode.academy
24 WEB DEVELOPMENT - SECRETS TO STARTING A CAREER in the Web Development Industry
WEB DEVELOPMENT - SECRETS TO STARTING A CAREER in the Web Development Industry
LearnCode.academy
25 jQuery Tutorial #4 - DOM Traversal with jQuery
jQuery Tutorial #4 - DOM Traversal with jQuery
LearnCode.academy
26 jQuery Tutorial #5 - Building a jQuery Tab Panel Widget
jQuery Tutorial #5 - Building a jQuery Tab Panel Widget
LearnCode.academy
27 jQuery Tutorial #6 - Building a jQuery Image Slider
jQuery Tutorial #6 - Building a jQuery Image Slider
LearnCode.academy
28 jQuery Ajax Tutorial #1 - Using AJAX & API's (jQuery Tutorial #7)
jQuery Ajax Tutorial #1 - Using AJAX & API's (jQuery Tutorial #7)
LearnCode.academy
29 jQuery Ajax Tutorial #2 - Posting data to backend (jQuery tutorial #8)
jQuery Ajax Tutorial #2 - Posting data to backend (jQuery tutorial #8)
LearnCode.academy
30 jQuery Ajax Tutorial #3 - Delegating Events & Mustache.js Templating (jQuery tutorial #9)
jQuery Ajax Tutorial #3 - Delegating Events & Mustache.js Templating (jQuery tutorial #9)
LearnCode.academy
31 jQuery Ajax Tutorial #4 - "Edit" modes & Better Mustache.js Templating (jQuery tutorial #9)
jQuery Ajax Tutorial #4 - "Edit" modes & Better Mustache.js Templating (jQuery tutorial #9)
LearnCode.academy
32 How to put your website online - how to FTP to a domain & upload files to a webhost
How to put your website online - how to FTP to a domain & upload files to a webhost
LearnCode.academy
Basic Terminal Usage - Cheat Sheet to make the command line EASY
Basic Terminal Usage - Cheat Sheet to make the command line EASY
LearnCode.academy
34 SSH Tutorial - Basic server administration with SSH
SSH Tutorial - Basic server administration with SSH
LearnCode.academy
35 Vagrant Tutorial - Running a VM For Your Local Development Environment
Vagrant Tutorial - Running a VM For Your Local Development Environment
LearnCode.academy
36 Sublime Text Favorite Packages and Workflow
Sublime Text Favorite Packages and Workflow
LearnCode.academy
37 What Makes Javascript Weird...and AWESOME - Pt 1
What Makes Javascript Weird...and AWESOME - Pt 1
LearnCode.academy
38 Javascript is Event-Driven - What makes Javascript Weird...and Awesome Pt 2
Javascript is Event-Driven - What makes Javascript Weird...and Awesome Pt 2
LearnCode.academy
39 Javascript Closures Tutorial - What makes Javascript Weird...and Awesome Pt 3
Javascript Closures Tutorial - What makes Javascript Weird...and Awesome Pt 3
LearnCode.academy
40 FREE REST API - Practice Developing Javascript AJAX Apps with this API
FREE REST API - Practice Developing Javascript AJAX Apps with this API
LearnCode.academy
41 Javascript Scope Tutorial - What Makes Javascript Weird...and Awesome Pt 4
Javascript Scope Tutorial - What Makes Javascript Weird...and Awesome Pt 4
LearnCode.academy
42 Javascript Context Tutorial - What makes Javascript Weird...and Awesome Pt5
Javascript Context Tutorial - What makes Javascript Weird...and Awesome Pt5
LearnCode.academy
43 Nginx Tutorial - Proxy to Express Application, Load Balancer, Static Cache Files
Nginx Tutorial - Proxy to Express Application, Load Balancer, Static Cache Files
LearnCode.academy
44 Live Reload Sublime, Chrome, Anything - Fast and easy with Live-Server
Live Reload Sublime, Chrome, Anything - Fast and easy with Live-Server
LearnCode.academy
45 Are you bad, good, better or best with Async JS? JS Tutorial: Callbacks, Promises, Generators
Are you bad, good, better or best with Async JS? JS Tutorial: Callbacks, Promises, Generators
LearnCode.academy
46 Javascript Generators - THEY CHANGE EVERYTHING - ES6 Generators Harmony Generators
Javascript Generators - THEY CHANGE EVERYTHING - ES6 Generators Harmony Generators
LearnCode.academy
47 Web Development Advice - Interview with Dev Tips
Web Development Advice - Interview with Dev Tips
LearnCode.academy
48 How the Internet Works for Developers - Pt 2 - Servers & Scaling
How the Internet Works for Developers - Pt 2 - Servers & Scaling
LearnCode.academy
49 How the Internet Works for Developers - Pt 1 - Overview & Frontend
How the Internet Works for Developers - Pt 1 - Overview & Frontend
LearnCode.academy
50 HAPROXY vs NGINX - 10,000 requests while killing servers
HAPROXY vs NGINX - 10,000 requests while killing servers
LearnCode.academy
51 Node.js Cluster - Boost Node App Performance & Stability with Clustering
Node.js Cluster - Boost Node App Performance & Stability with Clustering
LearnCode.academy
52 Web Dev Training with Treehouse
Web Dev Training with Treehouse
LearnCode.academy
53 What is Node.js Exactly? - a beginners introduction to Nodejs
What is Node.js Exactly? - a beginners introduction to Nodejs
LearnCode.academy
54 How to deploy node.js applications #1 - spin up a server
How to deploy node.js applications #1 - spin up a server
LearnCode.academy
55 Deploying node.js applications #2 - provision server & setup flightplan
Deploying node.js applications #2 - provision server & setup flightplan
LearnCode.academy
56 Deploying Node.js Applications - Deploy Node the right way - as an Upstart Service
Deploying Node.js Applications - Deploy Node the right way - as an Upstart Service
LearnCode.academy
57 Mobile Web Design - Coding Workflow For Mobile Websites
Mobile Web Design - Coding Workflow For Mobile Websites
LearnCode.academy
58 WHY YOU NEED A BUILD SYSTEM LIKE GRUNT, GULP, BRUNCH FOR YOUR WEBSITE
WHY YOU NEED A BUILD SYSTEM LIKE GRUNT, GULP, BRUNCH FOR YOUR WEBSITE
LearnCode.academy
59 GRUNT TUTORIAL - Grunt makes your web development better!
GRUNT TUTORIAL - Grunt makes your web development better!
LearnCode.academy
60 STOP USING FTP!  - How to Deploy with Flightplan over SSH
STOP USING FTP! - How to Deploy with Flightplan over SSH
LearnCode.academy

Related Reads

Up next
monday.com Automation: Fix Missing Emails in Seconds
Mastering monday
Watch →