Terminal Basics: Your First Step as a Developer
Learn to use the terminal from zero: move between folders, create, copy and delete files, search text, combine commands with pipes, permissions and your first script. Practice in a Linux terminal inside your browser and meet the Windows equivalents.
Badge do curso Terminal Basics Conclua todas as aulas para ganhá-lo.
Conteúdo do curso
Getting started
3 aulasWhat is the terminal?
What the terminal is, why developers use it, how to open it on Linux, macOS and Windows, and your first command.
Your first commands
echo, date, whoami, hostname and uname, how to clear the screen, the history, Tab completion, canceling with Ctrl+C and what to do with errors.
Anatomy of a command and how to get help
The parts of a command (name, options and arguments), why spaces and quotes matter, and how to read the help with --help, man, type and which.
Moving around the file system
3 aulasFolders and paths: where am I?
How files are organized on Linux, what a path is, the difference between absolute and relative paths, and the /, ~, . and .. shortcuts you'll use all the time.
See what's there: ls and tree
List a folder's contents with ls, see hidden files, the long format with sizes and dates, sort by date and see the whole tree with tree.
Moving around with cd
Change folders with cd: go in, go up with .., go home with ~, go back to the previous folder with cd -, use Tab and handle names with spaces.
Files and folders
4 aulasCreating folders and files
Create folders with mkdir (and many at once with -p and braces), create empty files with touch, write a line with echo and >, and pick good names.
Copying, moving and renaming
Copy files with cp, copy whole folders with cp -r, move and rename with mv, and how not to overwrite files by accident with -i.
Deleting carefully: rm and rmdir
Delete files with rm, empty folders with rmdir and whole folders with rm -r. Why there's no trash can, how to ask for confirmation with -i and the commands you should never run.
Wildcards: many files at once
Use *, ? and [ ] to work with many files in one go: list, copy, move and delete by extension or pattern, and check first with echo.
Reading, editing and searching
3 aulasReading files: cat, less, head, tail and wc
Show file contents with cat, read long files with less, see the beginning or the end with head and tail, and count lines and words with wc.
Editing files with nano
Open, edit and save files without leaving the terminal with nano, its most important shortcuts, and what to do if you end up inside vim by accident.
Finding text and files: grep and find
Find lines containing a word with grep (ignoring case, with line numbers, counting or across whole folders) and find files by name or type with find.
Combining commands
2 aulasRedirections: saving output to files
A command's three streams (input, output and errors) and how to redirect them: > to save, >> to append, 2> for errors, 2>&1 to merge everything, /dev/null to discard and < to read from a file.
Pipes: joining commands with |
Connect one command's output to another's input with |, sort with sort, remove duplicates with uniq, cut columns with cut and chain commands with ;, && and ||.
Next steps
3 aulasVariables, the PATH and shortcuts with alias
What environment variables like HOME, USER and PATH are, how to create your own, the difference between double and single quotes, why command not found happens and how to create shortcuts with alias and ~/.bashrc.
Permissions, sudo and your first script
Read the rwx permissions in ls -l, change them with chmod, use sudo responsibly and write your first bash script: shebang, chmod +x, ./script.sh and arguments.
The terminal on Windows (and what's next)
PowerShell, CMD, WSL and Git Bash: what each one is, the PowerShell equivalents of the commands you learned, a PowerShell terminal to practice in and how to get Windows ready for the next courses.