Learn basic linux command on Xubuntu [PART 2]

Learn basic linux command on Xubuntu

In this part 2 of the tutorial we will learn more about basic linux command, this tutorial is meant for beginners learning linux command, please check part 1 if you haven't already.

Creating new directory
You can use the mkdir command to create new directory on linux, mkdir takes one parameter which is the name of the folder/directory that you wish to make.
mkdir [directory-name]
Example:
mkdir mydata
mkdir private-pictures
mkdir nakedgirlphotos
NOTE: you can also add -v parameter to show message for each directory created.

Deleting directory
To delete a directory you can use rmdir command, note that only an empty directory can be deleted.
rmdir [directory-name]
Example:
rmdir mydata
rmdir private-pictures
rmdir nakedgirlphotos

Copying file and directory (copy-paste)
To copy files or directories from one place to another, you can use the cp command, the cp command takes at least two parameter which is the file/directory name to be move and the new location.
cp [source] [destination]
Example:
cp data.txt /home/myusername/Pictures/
cp dirty-picture.jpg Documents
cp images /home/myusername/Documents/

Moving file and directory (cut-paste)
You can use the mv command to move file or directory from one place to another, moving means the file or directory in the original location is no longer exist because it already move to another location. So it's different from copying the file/directory, think of it like cut and paste.
mv [source] [destination]
Example:
mv data.txt /home/myusername/Documents/
mv nakedwoman.jpg Pictures/
mv images /home/myusername/Pictures/

Hope this tutorial can help someone learning basic linux command, comment down below if you need more tutorial like this.

Share this

Previous
Next Post »