junior-ctf/tutorials/command_line.md

1.1 KiB

Introduction

The command line interface is run in a terminal (or prompt). It is the direct interface with your computer. There you are able to do the same things are you are able in a graphic interface such as visiting a folder, reading and writing files.

But the command line interface allows you access to a number of other programs which are really useful in a developer's every day life or while participating in CTFs. You should not be an expert, but with little knowledge of the command line you will already be able to do a number of things faster and quicker.

Terminals in Linux and OSX are quite similar, if you run Windows, things are a bit different.

Understanding paths

TODO

Basic command line

  • List the files in the current folder: ls
  • See where you are: pwd
  • See who you are: whoami
  • Go in a folder: cd INSERT_HERE_THE_NAME_OF_YOUR_FOLDER
  • Go in the parent folder: cd ..
  • Go to your home directory: cd ~ or cd
  • Print a file in the terminal: cat THE_NAME_OF_YOUR_FILE
  • Copy a file: cp YOUR_FILE YOUR_DESTINATION

Run programs in command line

TODO