Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 1.05 KB

File metadata and controls

21 lines (14 loc) · 1.05 KB

Linux and the Command Line

Linux is an operating system that is accessible via the command line in the terminal window in VS Code.

Some common command-line arguments we may use include:

  • cd, for changing our current directory (folder)
  • cp, for copying files and directories
  • ls, for listing files in a directory
  • mkdir, for making a directory
  • smv, for moving (renaming) files and directories
  • rm, for removing (deleting) files
  • rmdir, for removing (deleting) directories

The most commonly used is ls which will list all the files in the current directory or directory. Go ahead and type ls into the terminal window and hit enter. You’ll see all the files in the current folder.

Another useful command is mv, where you can move a file from one file to another. For example, you could use this command to rename Hello.c (notice the uppercase H) to hello.c by typing mv Hello.c hello.c.

You can also create folders. You can type mkdir pset1 to create a directory called pset1.

You can then use cd pset1 to change your current directory to pset1.