You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
Now that you can navigate the filesystem, it is time to learn how to create, copy, move, rename, and delete files and directories. These are the fundamental operations you will use every day.
touch newfile.txt # create an empty file
touch file1.txt file2.txt # create multiple files
touch -m existingfile.txt # update modification time only
echo "Hello, Linux" > hello.txt # create/overwrite file with content
echo "Another line" >> hello.txt # append to file
cat > notes.txt # type content, then Ctrl+D to save
| Editor | Description | Install |
|---|---|---|
| nano | Simple, beginner-friendly terminal editor | Usually pre-installed |
| vim | Powerful, modal editor (steep learning curve) | sudo apt install vim |
| vi | Older version of vim, always available | Pre-installed on all systems |
nano notes.txt # open in nano (Ctrl+O to save, Ctrl+X to exit)
vim notes.txt # open in vim (i to insert, Esc then :wq to save and quit)
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.