The TOP command

February 27, 2010 at 3:57 pm (commands, linux, terminal, tips)

So I found a nice little command the other day called ‘top’. Essentially what it does is show the top processes in your system in the terminal. ┬áIt’s simply run by issuing the following command:

$ top

A neat little thing about it though, is that it also shows the process ID. Which can then be ‘killed’. So for instance, I’ve got a program that’s misbehaving. I simply run top and find it’s process ID (pid…or to the far left). I can then run a command to kill it.

$ kill pid xxxx

Where xxxx is replaced by the actual number. So for instance if I want to kill Chromium, I simply run $ kill pid 8925.

There are also various hot keys that can be pressed while in top:

a or w- Sorts the processes in various modes. Cycles through all four windows.
k – Kills a command by entering it’s process ID. Easier than using $ kill pid xxxx.
q – Quits the program.
t – Turns on/off the summary information.
z – Turns on/off color.
A – Yes it’s ‘a’ that capitalized. It sorts your processes a bit differently and allows for an easier view of memory hogs.

Permalink 2 Comments

Wireless Install

February 26, 2010 at 7:30 pm (arch, friend, packages, wireless)

Alright, so today I finally got the chance to add wireless support to my friends computer. I had installed Arch for him, but never got the chance to test the wireless connection. So I headed over to his house with a saved copy of the Beginners Wiki and the Wireless page on the Wiki on an external drive. I ran the few commands that it suggested:

$ iwconfig

$ ifconfig wlan0 up

I soon realized that his card needed firmware as ifconfig gave a a nice error of SIOCSIFFLAGS: No such file or directory. Unfortunately we had to download the firmware from the internet…but needed internet to do that. We ended up having to drag his computer into his roommates room and pop the ethernet cable into the back of his computer to fetch his required firmware. After that, wireless setup went smooth. We ended up going with wicd from the repositories. It easily found and connected to his network each time, and adding that to the daemons in the /etc/rc.conf file allowed it to auto load each time the computer restarted.

Overall, wireless in Arch was a bit more time consuming then Ubuntu, but I did learn a lot and was able to install any network manager I wanted instead of being forced to use whichever one was preinstalled.

Permalink Leave a Comment

Dropbox

February 26, 2010 at 1:33 am (arch, dropbox, packages, tips)

I’m sure a good portion of people have heard about this program, but I thought I would list it anyways for those who haven’t. Basically dropbox is an instant online storage for files placed into a the dropbox folder. This program is amazing for backing up documents and other lightweight files. I highly recommend it.

It also runs on Windows as well as Mac, and instantly updates across multiple computers. There is nice list of features that it has, so it’s almost easier to just watch the video. Check it out at The Dropbox Website.

Installation is easy, simply head over to the AUR and install it. And once installation is complete, run this command:

$ dropboxd

It will guide you through and automatically start up each time your computer is turned on.

There is an alternative to dropbox if you don’t wish to use it. Check out Spider Oak. I haven’t used it, but I’ve heard it’s nice.

Permalink Leave a Comment

Force Removal of Trash

February 24, 2010 at 11:28 pm (commands, linux, sudo, terminal, trash)

Alright, I’ve got a quick tip. I recently (as in like 10 minutes ago) ran into a few files that had characters in another language that wouldn’t delete from the trash bin. I tried to run dolphin in root access but it still wouldn’t go. I found this command that forced a deletion of trash regardless of filename:

$ sudo rm -fr /home/USERNAME/.local/share/Trash/files/

Simply change the USERNAME to your own and it should force a deletion of all the files from the trash. Then simply try to “empty” the trash and they should disappear from the trash bin entirely. I believe that’s the newest command for where the trash bin is located, otherwise you could try:

$ sudo rm -fr /home/USERNAME/.Trash

Again, I believe that’s an outdated command, but just in case the first command didn’t work, you could always try that depending on if the operating system you’re using. It’s just a general Linux command.

Permalink Leave a Comment

Using the AUR

February 23, 2010 at 1:05 pm (ABS, AUR, packages, packer, pacman, yaourt)

Alright, so something that I didn’t stumble upon until later was the AUR. It basically contains user modified/updated packages that aren’t in the [core] [extra] [community] updates with pacman. This place is one of the reasons why I came back and stayed with Arch Linux.

There is a couple ways of accessing and installing these files. The most basic way is to use ABS. It’s basically a simplified version of .make, .configure, etc. etc. You build the package using the pkgbuild file you downloaded off of ABS, and once it’s built, you install it using pacman.

A much easier way is to install either Yaourt or Packer. Both need to be installed first using the ABS method, but once you do that, it’s smooth sailing from there.

Yaourt. I originally started using this. Whenever you want to search for and install something in the AUR, you simply run this:

$ yaourt dropbox

It will run and list all the contents of AUR with the search of dropbox. Then you simply supply which numbers you want to install and it will work from there. It will also ask you in the process if you wish to configure the installation file with a text editor. Most of the time I select ‘n’, but if you understand fully what you’re doing to edit the file, go right ahead. The other nice thing about yaourt, is that it can run the same commands as pacman. You can run something like this:

$ yaourt -Syu

Packer. This is basically a lightweight version of yaourt, and searches EXTREMLY fast compared to yaourt. It’s not quite as pretty, but it does it’s job very fast. Again, you have to install this with either ABS or if you have yaourt installed, search for packer, and install it from there. I ended up switching to this once and rarely use yaourt anymore. It also uses the same commands from pacman:

$ packer -Syu

Try any of these methods and figure out which works best for you.

Permalink 1 Comment

Next page »