Linux Server Command Line

Old 6 Comments on Linux Server Command Line 281

    The Server Ubuntu Linux interface can be intimidating. The reason for this is that the only way to administrate it is in a command line interface, with a blinking cursor, just like in command prompt or DOS. They do not give you anything you do not absolutely need, not even a Graphical User Interface- GUI (who needs a GUI?).

I installed an older version of Ubuntu Server in VirtualBox. I choose an older version just because I can (no particular reason). I told it that I spook English, live in the United States, and some other things, such as my keyboard format. It is not very hard to install and get the initial setup. You can even tell it what kind of server you want it to be (ex. Samba or LAMP [Linux, Apache, MySQL, and PHP] server). I created an account on it and logged in. One of the simplest commands to use is the “clear” command (equivalent to “cls” in command prompt); this will clear the screen of any text. You can also ping using the “ping’ command and the IP address just like in command prompt, except in command prompt it will stop after four pings while Linux will not stop until you press the control and c keys.

    You may be wondering what this mysterious “root” account is. This is part of the Linux is. If you have root privileges, then you can do anything(!!) to that computer. To take advantage of this you can use the “sudo” (superuser do) command along with any command that will require root privileges.

 

   The screenshot above may look scary, but it is quite simple. First is “sudo”, to tell the computer you want to use the command as a superuser; then is “apt-get” which means, roughly, to get a piece of software, and “install” to install it. Finally is the name of the software, in this case “alpine”. The computer then asks if you really want to install the software, answer “y” for yes (unless the answer is no). You do not need to pay an extreme amount of attention to all the text on the screen, just make sure there are no error messages. All this command was search for a piece of software called “alpine’ and install it. If you need alpine, you will need to figure it out.

 

     Since in Linux when first log in to your account you are thrown into your personal user folder, but it would be more cool to be in the root directory (root in Linux can also mean the upmost directory, like the C: ). To change where you are in the file system, use the “cd” command. To go to the root directory type “cd /”. To see what is in the root directory use the “ls” command. Type “ls –l”, this will give the more detailed version then just “ls”. Another cool command is “top”. This gives you a task manager like screen where you can kill processes by PID (Process Identifier). To quit top, press q.

 

 

      If you ever need help on a command type “man” and then the command that you need help with. You can then access the manpage on that command. I would recommend getting a book on Linux commands to help familiarize yourself with the commands, after all, this is only a taste of the functionality of the Linux server. A vast majority of Linux is free and open source; even Eli the Computer Guy (of whom I am a huge fan) says that everything is going over to Android (a Linux-based operating system).

Author

Related Articles

6 Comments

  1. Geek Brain July 3, 2014 at 6:45 am

    Hmmm… maybe there should be a new catch phrase “learn the CLI or die…” too dramatic?

    • Dane C July 3, 2014 at 9:07 pm

      Maybe not dramatic enough. 🙂

    • Kishan Rusia July 4, 2014 at 2:01 am

      “learn the CLI or die…”…nice one…

    • ebey July 4, 2014 at 10:17 am

      lol

  2. Jonathan Walker July 4, 2014 at 5:26 am

    The first time you create a simple script in Linux or Powershell, and see permissions for folders or user accounts for 100 users get changed, that is when you see the true automotive power of CLI.
    I encourage people to not fear CLI, it is probably easier to use than most would assume.

Leave a comment

Back to Top