May 28, 2009, 3:20 am
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.
April 22, 2009, 2:29 pm
Recently I installed Ubuntu on my stationary computer. The CPU is a 64-bit thing and the Ubuntu I am used to is a 32-bit edition. So what would be the difference?
First off.. I was not noticing any differences. Everything is the same, anyway so it looks. One major reason to use the 64-bit edition is the possibility to use all 4 GB of memory that my computer has. I have been running Windows XP 32-bit edition on this computer since i got it 6-7 months ago. But 32-bit edition is limited to only use 3.2 of the memory(not sure about the exact number). Thus the full capacity of 4 GB was not used, which I, of course would like it to be. Then the last two months I have been trying out Windows Vista 64-bit edition. It runs perfectly.. except for a random BSOD(blue screen of death, a Microsoft phenomenon which crashes your pc
) now and then, caused by my graphic cards driver. In windows 64-bit you can install and run both 32-bit programs and 64-bit programs, without noticing any difference.
So I tried to install skype on my Ubuntu 8.10 64-bit edition. Downloaded it from the skype.com site and tried to install the package but was surprised that I got an error telling me that the architecture of my machine did not match the package I had just downloaded. I was surprised because I have been used to not care about the architecture of the applications I install when using windows. I did a quick search to find the proper package from the skype.com site but it wasn’t available. Too bad, I had to find another solution.
Since I already knew that skype is part of the medibuntu repository I added that to my sources list. Then I tryed to install skype from the terminal, the usual and easy way it works:
sudo apt-get install skype
And the skype was installed, pretty easy actually.. but confusing that you cannot find the right package from the skype site.
As for why this trick worked out the issue I don’t know. My guess would be that the ubuntu crew has compiled the packeges for both architectures. Perhaps I will figure this another time
.
Here is an article from the ubuntu help community that explains something about the different architectures https://help.ubuntu.com/community/32bit_and_64bit.
April 12, 2009, 4:20 pm
This afternoon, a boring sunday one of the them, its spring and sun is shining and I am watching TV. There is nothing better to watch than the Paris-Roubaix, which seems to be the sickest bicycle road race one can imagine. You have a bike, the tires are really thin like any other race bike and the race is on cobblestones and the terrain is rough. The distance is more than 250km. Then I wonder where the fun is in this. The bikes have no absorbations from the bumpy roads, so the shakings are really hard on the participants. Also, there are so many crashes, why would somebody risk broken bones and other injuries just to participate. It sure is painful to go through to the finish line, but so much for the prestige in a race like this?
Ok. I admit it, I never really understood any part of any bicycle road race on the professional level. All races seems to me, judged on the words of riders to the medias covering the races and the expressions on their faces during the race, to be very painful and no fun at all.
Based on the many hours that TV2 uses to show bicycle races, I think someone must be interested in this sport. Even though its a boring sport taking up to much time in my TV, it does have some tactical aspects to it, but its slow and they are sort of getting nowhere. So why do people watch this, follow the race every year and get excited about the race? And its not only this race, its also so many other races, each race going from one day up to as many as the three weeks tour de france lasts. Each day taking 5 hours. Seems to be waste of time.
I will conclude that though the TV2 set aside so much time for this sport, they are still worng in doing so. There are so much other sports that could be covered, which would be more excitiing to watch. But, who cares, you only watch tv when you are bored anyway, so the fact that whats inside the tv is boring too, shouldnt really consern me. I guess im just bored that I watch it.
March 24, 2009, 9:33 pm
As the administrator of a small network, I sometimes have to deal with users that mess up their network connections. So, today one came to me and I had a look at the computer and was thinking “this doesn’t make any sense”. Then I looked over all the settings in the computer and everything was what it was supposed to be… conclusion: its not the computer that has the problem. Next I went to the router setup (the device that controls the network users permissions), and there too, all settings were just the way they had to be.. and I dobble checked to be sure.
Since nothing was wrong, though something was wrong anyhow, I deleted an entry in the router and put in exactly what I had deleted. Wolla… it works. But still, it makes no sense that it should be the way to fix the problem.
Anybody ever thought of renaming the word technology to technounlogy ?
January 17, 2009, 11:35 pm
When wordpress 2.7 was released I downloaded it to my computer right away. Somehow I haven’t upgraded my blog untill now. The new wordpress should have some nice new features (i have been told), but it just do not support the old iTheme, which I have used in 2.6. Too bad, because I liked it and it was a nice theme.
Now I found something different, not really sure if I like it, but will stick with this theme for now.