A very important tool any computer nerd should know is the Linux command line. Today we'll be going over simple but affective Linux commands that every computer nerd should be aware of. 😁
Starting with
-
pwdwill print the name of the current/working directory.
-
ls&ls -lawill provide details and list the contents of the current working directory.
-
cdcommand is used for moving up down directories.
-
touchcan be used for creating new empty files.
-
catwill display the contents of a file. This file contains nothing, so let's add some data by using a text editor.
-
nanois a small text editor, that can be used for editing texts of file.
Press Ctrl+Oto save, thenCtrl+Xto exit
We can then use catonce again to check if the edits were saved.
- You can also extract specific information from a file using the
grepcommand.
- You can use
mkdirto create a new directory for transferring files.
-
mvcan be used for moving files from a directory into another.mv *.txt ~/Desktopwill move all files that end with the .txt extension into the desktop directory.
-
cpcan be used for copying files into another directory.
- Last but not least, the
rm, which can be used for removing files from the disk.
Thanks for reading
Kenji
Top comments (0)