Marcus Node Bits: Doing stuff in the terminal is not scary at all

Posted by Marcus Hammarberg on February 5, 2014
Stats
I'm writing down some of the things I've picked up when I started to learn about NodeExpress and Mongo. Here are all the post in the series:
This post is about the terminal and how I got to use it more and more, with just a couple of simple commands.

I'm writing down some of the things I've picked up when I started to learn about NodeExpress and Mongo. Here are all the post in the series:
This post is about the terminal and how I got to use it more and more, with just a couple of simple commands.

I'm a Microsoft developer and is used with Visual Studio. Very nice, very integrated environment with shiny buttons, menus or key shortcuts to execute.

The terminal (yes, I'm on OS X - but embrace the CMD if you're on Windows) windows was a lonely void space for me. But I've now embraced it. And after awhile I picked up a small number of commands that got me around.

This is what I do when I start a new node project:

  • clear - to get rid of all the stuff in the window when I start. I like my terminal nice and clean. 
  • pwd - to know which directory I'm in. And it has nothing to do with passwords, it's "present working directory"
  • cd ~/Projects/NodeStuff - to get to my Node directory in my Project-directory, where I've stored all the Node stuff
  • mkdir TheNewProject - to create a new folder for "the new project"
  • cd TheNewProject - to get into TheNewProject-directory
  • mkdir test - to create a test directory
  • touch package.json - to create a package.json file. See this post for more on that file and it's awesome capabilities. 
  • sublime . - to open the current with sublime text 2. You can of course open it in another editor too.  

Until that point I've only been in the terminal window. This takes me about 10 - 20 seconds to do, depending on how long it takes for me to find the "~"-button on my keyboard (ALT+^-button on Swedish keyboards, remember that Marcus!).

Oh yeah, I'm running the terminal in a window that covers the screen from top to bottom and about half the window in size. And I'm using the slick Pro-profile that gives it a nice transparent look. 


Published by Marcus Hammarberg on Last updated