Intro to Linux and CLI
This lesson is building on top of previous lesson and you should already have:
- linux environment,
- github account,
- forked demo repository from https://github.com/eliska-chalupova/DSIB01demo,
- local clone of forked repository.
This lesson guides you through the basics of file systems and the command line interface (cli). If you have stored files on a computer at all and recognize the word “file” and either “directory” or “folder” (two common words for the same thing), you’re ready for this lesson.
Table of content
- Why to learn shell?
- Gentle introduction
- Getting help
- Navigating Files and Directories
- Interacting with Files
- Scripting
- Exercise
Summary
Commands
ls
: list a content of a directorycd
: change current working directorypwd
: print current working directoryman
: look up the manual page for a particular commandmkdir
: create a directoryrmdir
: remove and empty directorycp
: copy a file or directorymv
: move a file or directoryrm
: remove a fileecho
: print a message to the screen
Concepts
- relative path: a file or directory location relative to where we currently are in the file system
- absolute path: a file or directory location in relation to the root of the file system
- use
Tab
key to autocomplete paths - the Linux command line does not have an undo feature - perform destructive actions carefully
References
https://ryanstutorials.net/linuxtutorial/
https://btholt.github.io/complete-intro-to-linux-and-the-cli/
https://swcarpentry.github.io/shell-novice/