Did you know that you can manage all of your files and folders right from the command line, using applications like Gnome Terminal?\nHere are some of the basic commands that we use to manage directories (also known as folders) in Linux distributions.\nMove among folders\nIf you are using a file manager, you can switch between directories just by clicking on that folder. We use the \u2018cd\u2019 command that stands for change directory to achieve the same using the command line interface (CLI).\nWhen you open the Terminal app, you are in the home directory of the logged in user. You will notice something like this:\nswapnil@ubuntu: ~ $\nHere \u2018swapnil\u2019 is the logged in user, ubuntu is the hostname of the machine and \u2018~\u2019 denotes the home directory. \u00a0\nLet\u2019s say I want to go to the Downloads directory that's inside home. We run this command:\ncd \/home\/swapnil\/Downloads\/\nThis is what you see:\nswapnil@ubuntu:~\/Downloads $\nIt means you are now in the Downloads directory. If you want to see the content of that directory just run the \u2018ls\u2019 command.\nCreate directory\nWe use \u2018mkdir\u2019 (make directory) command to create new directories. If you simply run the mkdir command followed by the name of the new directory, the folder will be created in the current directory. If we run \u2018mkdir cio\u2019, a new directory named \u2018cio\u2019 will be created inside the 'Downloads' folder.\nIf we want to make nested directories such as \u2018Downloads\/cio\/stories then we use \u2018-p\u2019 option which creates parent and child directories along the path:\nmkdir -p \/home\/swapnil\/Downloads\/cio\/stories \nMove out of directory\nTo get out of the current directory and go back to home, just type \u2018cd\u2019 If you want to go back one directory, use \u2018cd ..\u2019. Say you are in the \u2018stories\u2019 directory and you want to move out of it and go to \u2018cio\u2019, just use \u2018cd ..\u2019 command.\nswapnil@ubuntu:~\/Downloads\/cio\/stories $ cd ..\u00a0\nYour directory will change to cio:\nswapnil@ubuntu:~\/Downloads\/cio $ \u00a0\nCopy and move directories\nThere are two commands for copying or moving directories: cp (stands for copy) and mv (stands for move). The copy command simply makes a copy of the folder to the new location, whereas the move command makes the copy of the folder to the new location and deletes it from the original location. Be extra careful when using the 'mv' command.\nTo copy a directory, use the cp command:\ncp -r \/path_of_current_folder \/path_of_destination\nLet\u2019s say we want to copy the \u2018stories\u2019 folder from home directory to another location. The command will be:\ncp -r \/home\/swapnil\/Documents\/cio\/stories \/media\/file\/\nThis command will make a copy of \u2018stories\u2019 folder in 'media\/file\/', which is a secondary hard drive of my system.\nIf you only want to move the contents of a folder, and not the whole folder, to another directory then use \u2018*\u2019 option. Let\u2019s say we want to copy all files saved in the 'stories; directory to a new folder, we will run this command:\ncp -r \/home\/swapnil\/Documents\/cio\/stories\/* \/media\/file\/stories\/\nIt will basically copy everything \u2018inside\u2019 the source folder to the destination folder.\nMove directories around\nThe move command (mv) works similar to the copy command (cp), the only difference being deletion of the source directory.\nLet\u2019s say I want to move the 'stories' folder from home directory to another location. The command will be:\nmv -r \/home\/swapnil\/Documents\/cio\/stories \/media\/file\/\nIf I want to move all the content of the \u2018stories\u2019 folder then I will use the \u2018*\u2019 option\nmv -r \/home\/swapnil\/Documents\/cio\/stories\/* \/media\/file\/stories\/\nHow to delete a directory\nIn Linux-based operating systems \u2018rm\u2019 is the command to remove or delete any file or folder.\u00a0\nWarning: Never run the 'rm -r' command without absolute path because it will delete everything in the current directory, which is basically your whole system.\nIf you want to remove the 'stories' directory with all of its content, the command is\nrm -r \/home\/swapnil\/Documents\/cio\/stories\nIf you want to keep the 'stories' folder but want to delete all of its content, the command is:\nrm -r \/home\/swapnil\/Documents\/cio\/stories\/*\nThose are some of the basics of using command line to manage your directories on Linux based distributions. If you have any questions, feel free to ask in the comments below.