cd- change directory (move into a folder)cd [folder_path]- Use
cd ..to go up one folder level
ls- list files and folders in the current directorypwd- print working directory (shows the full path to your current folder)touch- create a new empty filetouch [filename]
rm- remove (delete) a filerm [filename]- Be careful — you can never get these files back!
mv- move or rename a filemv [source] [destination]- Use to rename:
mv oldname.txt newname.txt
cp- copy a filecp [source] [destination]- Keeps the original file and makes a copy!
cat- show the contents of a filecat [filename]
nano- open a simple text editor to write or edit a filenano [filename]- Will create a new file or open an existing one, depending on the filename you use
- Use
Ctrl + X->y->Enterto save and close
grep- search for text inside a filegrep [word_to_find] [filename]- Use
*to search all files in a folder:grep word *
This module will teach you the basics of using Linux, specifically on the command line. The command line (also called the terminal or shell) is a way to control your computer by typing instructions instead of clicking on buttons. You type a command, press Enter, and the computer follows your instructions — like opening a file, moving something, or searching for a word. It might look plain, but it's a powerful tool!
If you ever forget a command you've learned, check out the Cheat Sheet below!
Resources
Challenges
30-Day Scoreboard:
This scoreboard reflects solves for challenges in this module after the module launched in this dojo.
| Rank | Hacker | Badges | Score |