![]() ![]() That’s it–you’re done with practice! If you commit to doing most things from the command line from here on out, these commands will become second nature to you. Navigate back out of the test directory. ![]() ![]() Open your newly created file in VSCode and make some changes, save the file, and close it.Create a new directory in your home directory with the name test.If you can’t recall how to open a terminal, scroll up for a reminder. Let’s practice creating files and directories and deleting them! You’ll need to enter the commands for the steps below in your terminal. Think about how you could create these files with the commands and put it into practice! As an example, a basic website might have a main index.html file, a CSS stylesheet file called style.css, and a folder for images. With your newly discovered CLI super powers, practice creating a folder and a few files using the mkdir, touch, and cd commands introduced in the previous step. Setup (Follow instructions in Download files section only, this is all you need as you have the required software already).There you will find a full complement of lessons on using the CLI, but for now just focus on completing the following lessons: Visit The Unix Shell course designed by the Software Carpentry Foundation. If you don’t have MacOS, or any version of Linux installed, please return to the operating system installation guide. If you did our previous installation lesson, you should already have Linux installed in dual-boot or a virtual machine. Note: Many of these resources assume you’re using a Mac or Linux environment. Use the command line to open a file or folder in a program.Use the command line to rename or destroy a directory and a file.Use the command line to create a new directory and a new file.Use the command line to navigate directories and display directory contents.Open the command line on your computer.This section contains a general overview of topics that you will learn in this lesson. As part of the bigger picture, you may well be using the command line on a daily basis in your career as a software developer, making it an indispensable skill in your toolset. Additionally, you will primarily be using Git within the command line (more on this later). You will be making heavy use of the command line throughout this curriculum, and the upcoming installations project will need you to install many different software programs using the command line. And remember if you are using a newer Mac the % is the the same as $ Why learn this now? This tells you to type the command in your terminal, but don’t enter the $. Often guides and instructions for using the terminal will indicate commands by putting the symbol first, like $ whoami. This symbol - called the prompt - indicates that the terminal is waiting for you to enter a command. On Linux and older Macs the line will end with $ and on newer Macs the line will end with %. The window that opens will be mostly blank, with the exception of some text that will vary based on your operating system. Press Cmd + Space to open Spotlight, and search for “Terminal”. You can also use Spotlight search to open Terminal. MacOS: Open your Applications > Utilities folder and find “Terminal”. You can also open the terminal by pressing Ctrl + Alt + T on your keyboard. Linux: Open the programs menu and search for “Terminal”. So don’t let the prospect of using the command line for the first time intimidate you. The commands you will learn in this lesson are very straightforward. You’ll soon see that this isn’t as difficult as you may think. In this introductory lesson to the command line, you’ll learn how to navigate around your computer and how to manipulate files and directories (also known as folders) directly from the comfort of the command line. It has a syntax of its own to learn, but since you’ll be entering the same commands dozens of times, you’ll quickly pick up the commands you need most. The command line is like our base of operations, from which we can launch other programs and interact with them. While there’s no need for you to reenact the scene above, working with the command line is a critical skill for you to learn as a developer. That blank screen or window with a prompt and blinking cursor is the command line interface (CLI), where you’re able to enter commands that your computer will run for you. We have this image of developers staring intently at a black screen with white or green text flashing across as they wildly enter incomprehensible commands to hack into the corporate mainframe (no doubt while guzzling soda and wiping neon orange Cheetos dust off their keyboard). Feeling scared of the command line? You’re not alone. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |