Beginners Guide to Basic Commands for the Linux Terminal

Introduction on How to Copy, Rename, Edit, Delete Files and More

So you're thinking of picking up a Linux distro and trying it out? Great idea! But do you know how to use the Linux terminal?

Of course all Linux distros these days come with a fancy graphic user interface. In some ways, they're almost identical to Windows. Underneath the hood, though, Linux is still a text driven operating system - and you'll run into
 many of the same basic commands that people were using fifteen years ago. This can be a nightmare for a true beginner.

After you're up and running, you may have to dive into the terminal to do a few things manually. Rather than blindly follow the directions that you find on forums, read up on the commands a bit. Always know what you're doing before you type it in.

Pretend to Be the Administrator

One big difference between Linux and Windows is the way user accounts operate. Even if you are the only account on the machine, you are not the root user - and you don't have access to do a lot of administrative tasks. To do so, you need to enter the root password.

When you're using the terminal, you preface most commands with the command 'sudo'. This tells the terminal that you want to perform this command as the root account - and it will then prompt you for the root password.

Example: sudo gedit /etc/apache2/httpd.conf

Edit a Text File

Another thing you'll often have to do when working with things in the terminal is edit text files. 'gedit' is the command to open the standard text-editing program - gedit. It is a lot like Notepad in Windows. Typing 'gedit filename' will open up 'filename' in a new window of gedit.

If you're trying to tinker with your computers configuration, you're probably going to be editing some configuration files owned by the root user. In order to edit those, you'll need to use the previous command (sudo) along with gedit.

So, in the following example, you are telling the terminal to open up '/etc/odbc.ini' as the root user. If you didn't use 'sudo' in the command, you wouldn't be able to save the file - because you don't have the proper permissions to.

Example: sudo gedit /etc/odbc.ini

Copy, Rename, and Move

Related information