12 Essential Linux Commands for Newbies

Basic Commands for Interacting with Files

Plush Linux Penguins

Kim Kulish / Getty Images

Command codes aren't essential for using a computer, but if you want to vastly improve your efficiency when using Linux knowing a few common codes will make your life much easier and productive.

Essential Linux Commands

Display a list of files with ls

  • The ls command displays the names of the files and directories in the current working directory. A number of options are available that allow you to specify what details about the files should be shown.

Change directory with cd

  • If you want to change the current working directory you would use the command cd. For example, cd correspondence would set the current working directory to correspondence, if it exists.

Copy a file with cp

  • The cp command allows you to copy a file and give the copy a new name. It is always a good idea to make a copy of a file before you change it in case you want to go back to the previous version.

Change a file name with mv

  • The mv command allows you to change the name of a file or move it to another directory or both. Files and whole directories can easily be moved even if they have a lot of content, since it requires only changing how things are linked to each other.

Create a new directory with mkdir

  • The mkdir command creates a new directory. Directories can be nested and are useful to organize large sets of files.

Delete a directory with rmdir 

List the content of a file with more

Locate files you are looking for with find

Learn more about a command with man

Change a process' priority with nice

Edit the contents of a file with emacs

Change your password with passwd

  • After you type passwd at the command prompt, it will ask you for your current password and the new one.

End your session with exit

  • The exit command will get you out of the current shell or session.