Posts tagged ‘Linux’

The linux terminal for beginners

As I have used linux for quiet some time and having more experience with the console, the ways I use and control the system changes. Now and then I happen to use the console and as I do it more and more I start to like it. Especially since I the machine I use for linux is a laptop and not having a mouse to control, then it is nice to control everything with hotkeys and the console.

If you want to get startet using linux via the terminal, here is some easy commands you should know:

  • sudo
    runs a command as root (Super User Do). E.g. “sudo gedit” will open up Gedit as root. Whereas normal open from the gnome menu or similar opens the Gedit without root privileges.
  • ls
    lists the items of the current working directory
  • cd
    changes directory where you currently is working from. As argument you can give the exact part or go with a relative path
  • mv
    move a file from one place to another. it is alsoe used for renaming a file.
  • cp
    will copy a file from one destination to another.
  • unzip
    is used to unpack zipped packeges
  • tar
    is used for gzipped packages

The commands above are all very useful for basic file handling. To explorer the full posibilites of the commands use the command “man [command]” og try “[command] -help”. The man command will open up the manual for the given command. The -help will just show a shorter help message with basic options. Try it out and see what happens. But dont do anything as root unless you know exactly what you are doing and what will happen, you can end up doing harm to your OS installition.

For a little more advanced stuff, you can install/uninstall and run programs from the command line. Some programs are run directly in the terminal and some will open up another window for the programs gui (graphic user interface).To do this you will need some of the following commands:

  • apt-get
    is the a command line tool used for adding/removing programs. A parameter is required, for install you will need to enter “apt-get install” followed by the name of the package you want to install, and “apt-get remove” followed by the name of the package to uninstall.
    The apt-get tool will search for the packages in the repositories added in the sources list, this can get complicated and you can search information on this on you own. I recommend taking a look at the man page for this, “man apt-get”.
  • [name of program]
    will run the given program. You will of course need to know the name of the program you want to run. So, if you want to run the gedit (the standard text editor that comes with ubuntu) you can simply enter “gedit” and the program will show up. You can give the program an optional argument where the argument(s) is the name of a file you want to edit. You can put as many files as you want, but that is specific for this program. E.g “gedit file.txt”. Other programs will have other arguments. Every command is actally programs that run with or without arguments.

Sometimes when you work with you OS or want to customize something or change something you will need to edit certain system files that require root privileges. This is where it comes in handy to know some basic command line stuff. Say you need to edit the file /usr/foo/bar.txt for some reason but your user do not have writing access to the file. Then you will need to do something like this in you terminal:

sudo gedit /usr/foo/bar.txt

This will open the file in gedit and you will be able to save your changes. Very useful and easy to do once you get the touch with the terminal. It wont take long once you start doing it on a regular basis.

The Ubuntu Adventure

Some days ago I was recovering my Windows XP system on my laptop, but something went wrong during the installation process and the windows boot loader was non existent. Then I searched the net for some solution for this, but the solutions I found didn’t really work well. So I came up with this home made solution. Put some Linux distribution onto the computer and trash Microsoft Windows. So I did.

When I bought my first computer (year 2001) it had Microsoft’s Windows ME pre-installed, at that time I didn’t know anything but basics about computers, which was what I had learned in school (most of it by myself due my curious mind). Thus I didn’t know anything but Windows systems, I didn’t even know anything else existed.

Then I started in high school and learned a lot about computers from my roommate. I got to know that there is something called OS (Operating System) and that windows was not the only desktop OS. I tried some Linux distribution, but I never really got the idea, I was too far down the road of Windows systems to understand this system, that seemed so strange to me. Occasionally I have been trying different Linux distributions since, but never got the feel.

What kept me away from Linux has mostly been hardware driver troubles and the fact that most games is only developed for windows. The wireless network drivers has been hard to configure and that, especially, kept me away.

Now that I installed Ubuntu(Ubuntu is a linux distribution), I had no problems with anything. Everything worked out of the box. So I am gonna stick with this. Applications doesn’t work for both windows and Linux, but some has been compiled to both systems, e.g. Mozilla Firefox and OpenOffice.org, which both are part of the ubuntu package.

Most importantly to note about this conversion, is that most Linux distributions are free. Actually, you have to look hard to find one that isn’t. And there is so much software for linux that is free. In windows I had some programs that I have used a lot and they dont exists for linux. But doing a little search( only a little search, it takes no more) and you have found an application that does the exact same job for you in Linux.

Conclusion

If you have any kind of troubles with Windows, just install Ubuntu, it works out of the box, and probably wont cause any problems if you work with it as a home desktop for internet browsing and office packages.

Just install it. In fact, you can now install Ubuntu as an application on your Windows desktop, so you have no longer any excuses not to try it it out :)

Note: I will keep posting about my ubuntu experiences when something comes up.