This article is meant to give you a basic idea about Linux command line codes . By reading this you will learn how to navigate through Linux directories , create a directory or file as well as some common methodologies used in Linux .Because I use Windows I am going to show you the Linux commands by opening ?Ubuntu on Windows?.
Clear the terminal screen:
cleans the terminal .
See the location of the pointer :
Show contents of folder :
Move to specific folder :
In the above scenario I used pwd,ls and cd to illustrate how we can move from from one folder to another.
Move to root:
Seeing the contents of a folder :
Show all files (hidden also):
See all files and also details :
ls -lls -l provides us with details about the contents of the folder
In the privilege section of the owner section we can see that drwxr is written it means :
first letter is ?-?for File, d for Directory, l for Link
r ? read
w ? The file can be modified (write/delete/edit)
x ? execute
Changing permissions of a file or folder is a different topic altogether .We will skip that in this article.
make a new directory
rm -r directoryName rm nameOfFile rmdir directoryNamecreated and deleed a directory
rm -r is used when the directory is not empty.
make a file
Open with an editor :
(I will open the file using vscode)
being in the same directory as file you want to open type:
another important thing you want is the use of tab button. when writing long filenames press tab and it will suggest names that exist in the directory.
see contents of a text file in the terminal :
this helps when you need to look inside a small file.to see larger files use :
quit pressing ?q?.
Renaming a file :
mv f.txt newNamerename
copy a file :
cp newName.txt copied.txtnew file is created with the same contents of the old one
locating a file/folder:
it outputs the path .
see what commands you used upto 500 :
update Ubuntu :
sudo apt-get updateit didnt work the first time
sudo means super user do .
See network information :
ping a website :
see own os information :
See system usage data :
See disk space :
Install software :
sudo apt-get install Name
sudo apt-get remove Name
Restart computer :
Shutdown Computer : (try anyone)
sudo shutdown -h nowsudo poweroff
This is by no means a comprehensive tutorial . My target was to introduce you to the commands that will start you off . For further reading you can explore here .
Share your opinions . 🙂 and please leave a clap or 50 😛 🙂