Saturday, February 25, 2012

Knowing Your Linux System Via the Command Line

system_command_line-topEvery Linux user will tell you the same thing: know your computer. Mine always works not because there are no bugs, but because I know enough to identify their sources every time and correct them. And one of the best ways to monitor your system is through the command line. There are some great GUI for this, but the command line has the advantage of working on every computer, and it can easily be put into a script.

I propose to you five great commands for:

  1. Knowing your kernel
  2. Finding hidden processes
  3. Listing running modules
  4. Checking disk usage
  5. Locating binaries and configuration files

1. Knowing your kernel

The kernel is the core of your Linux system. It is frequently updated, and knowing its version may be important for compatibility reasons. Certain programs may require a certain version in order to work properly. It may also be important for some peripherals and modules. As an example, my Ubuntu is based on the official kernel 3.0.0. So far, the latest version is 3.2.5.

To know exactly what kernel you are using, its version, and your computer architecture, use the command:

uname -mrs

system_command_line-uname_mrs


With this example, we can clearly see that I am using the official kernel, version 3.0.0. The i686stands for my computer architecture. Here it means that I am using a 32-bit computer. On the other hand, x86_64 would have indicated a 64-bit architecture.


2. Finding hidden processes


To know what processes are currently running on your machine, most people would recommend the command “top“. Joshua wrote a very good article about it last year at Linux Running Too Slow? Here’s How to Find the Cause. Personally, I find this command very useful, and as Joshua explains, it can even be used to monitor the RAM usage.


However, I am sometimes too lazy to search in the list provided by “top“, and if I already know the name of the program running, I recommend the combination:



ps aux | grep [name of the program]

This will have the effect of listing all the current processes, even the smallest ones that will not be picked up immediately by “top“, and then filtering them according to your keywords.


system_command_line-ps_aux_grep


This method will instantly give you the name of the user responsible for this process, the PID number, the CPU usage percentage, the memory usage, the name of the process, etc.


As a side note, if you don’t know how to kill a running process:



kill [PID number]

OR



killall [name of the process]

3. Listing running modules


Modules appeared in version 2.0 of the Linux kernel. They are very useful, and you can consider them as drivers that you can load and remove from the memory. As an example, if you are using a laptop, you probably have a WiFi card. The corresponding modules for that card are probably loaded automatically at start up. If you want to save some battery, you may want to stop the card when you are not using the Internet. Removing the corresponding driver from the memory will then give you a little bit more memory (and you will also be sure that your card is disabled).


But first you need to know which modules are currently running. The command for that is



lsmod

This command is simply the combination of “ls” for listing files in a directory and “mod ” for module (I know, what a surprise).


system_command_line-lsmod


As a complement to your knowledge, you can add modules with the command



modprobe [name of the module]

and remove them via



rmmod [name of the module]

These two commands have to be launched by a super-user.


4. Checking disk usage


Keeping an eye on your system’s volumes can save you a lot of trouble. You may want to be sure that there is always enough room in /root, and remember to periodically clean your /tmp. For that purpose, there are two great commands:



lsblk

and



df -h

lsblk displays a tree representation of the partitions of your computer. It also gives you some useful information about the size of these partitions, their type, and their mountpoint.


system_command_line-lsblk


However, even if lsblk is more visual, I still prefer to use df -h. The latter gives you more information about the remaining space, the size of the partitions, and the percentage of memory in use.


system_command_line-dfh


You may have noticed that the command df alone will give you the size in bytes, which might be very hard to interpret. The option -h stands for human readable and gives you the amount of data in gigabytes, megabytes, or whatever is the easiest for a human to understand.


5. Locating binaries and configuration files


One of the first things that confused me when I left Windows a few years ago was that the file system was completely different on Linux. There is no such thing as Program Files, or a single directory for all the configuration files. But it may be very useful to know where these binaries are. For that purpose, the command:



whereis

is among the best. Similarly to



whoami

which gives you the name of the current user, or



whatis

which explains a command quickly, whereis can locate binaries, manual entries, and various configuration files. Its syntax is also very simple:



whereis [name]

system_command_line-whereis


In the example above, I asked where Firefox was, and the command returned the location for its binary and various directories, as well as the manual page.


But one of the greatest strengths of whereis is its ability to locate standalone configuration files. Here is another example, where I was searching for rc configuration files:


system_command_line-whereis_config


Such options can become very useful, especially if you are not using Ubuntu but another distribution like Archlinux which requires a serious amount of time to edit these files.


Conclusion


With these commands in your pocket, you will be able to see a little more of what is going on in your system. If you still prefer to have a GUI for that, I would still recommend things like Baobab for the files and Gnome System Monitor in general.


 


Via MakeTechEasier.com

Wednesday, December 14, 2011

Free vpn 4 all for one whole year...!

VPN On Demand service adds numerous benefits to your internet experience:

Use the internet without restrictions
Secure your internet connection
Fast connection speeds
Easy to setup
How to apply to a free private beta account?

Send an email to promotion at vpnod.com with subject vpnod

and you will get an instant reply with access credentials to VPNoD service.

Windows Setup Instructions

Click the image to open in full size.

2- Select Set up a connection or network

Click the image to open in full size.

3- Select Connect to a workplace and click Next

Click the image to open in full size.

4- Select Use my Internet Connection (VPN)

Click the image to open in full size.

NOTE: If prompted for "Do you want to use a connection that you already have?", select No, create a new connection and click Next.

5- In the Internet Address: field, type vpn.vpnod.com

6- In the Destination Name: field, type VPNOD.

Click the image to open in full size.

7- In the User Name: field, type your VPNOD username. Your VPNOD username which was sent to you earlier in an email.

8- In the Password: field, type your VPNOD password.

Click the image to open in full size.

9- Click the Create button and then click the Close button.

Click the image to open in full size.

10- To connect to the VPN server after creating the VPN Connection, click on Start, then Connect to.

11- Select the VPN connection in the window and click Connect.

Click the image to open in full size.

Thursday, December 8, 2011

Twitter introduces major redesign, here’s how to get it now

Twitter's new design will be rolled out to all in a "few weeks"

Twitter's new design will be rolled out to all in a "few weeks"

Twitter has just announced a major platform design overhaul, simplifying elements and insuring consistency across twitter.com, TweetDeck, and mobile apps. They’ll be rolling out the new design over the “next few weeks” but here’s how to get it now.

To get the new Twitter design immediately simply download the latest version of the official Twitter app for Android (v3.0.0) or iPhone (v4.0). Once updated, sync your tweet stream to associate the latest Twitter app with your account, instructing Twitter to load the new design on twitter.com.

This trick currently only works on Android and iPhone versions of the Twitter app. 

Sunday, November 27, 2011

Windows 7 Admin Account Exploit [No CDs]

Windows 7 Admin Account Exploit [No CDs]

Hi all users, here is a new exploit for bypassing windows 7 admin security which requires no CDs or other third party tools. I don't know if its been patched or not, but I'm sure that it 100% works.

1. Press the power button to turn on your computer.
2. While your on the screen with the animated Microsoft logo press and hold the power button until it turns off.
3. Press the power button to turn on again.
4. You should now see the option to launch Start Up Repair. Select the option and press enter.
5. Run Startup Repair.
6. You should see a blue bar that moves across the screen repeatedly. Above it should be messages that say "searching for problems" or something.
7. The message should change to "Attempting repairs" within a few minutes.
8. Leave the computer running. This message should be there for 10-40 minutes depending on your computer.
9. After 10-40mins a message should pop up that says "start up repair could not fix the problem". Click the arrow next to "show problem details".
10. Scroll to the bottom and click the link to the .txt file.
11. Notepad should open up with the file.
12. In notepad click File->Open.
13. You can now use the file browser to perform the sethc.exe hack.
14. Go to C:\Windows\system32 and find sethc.exe and rename it to random.exe or something.
15. Copy the cmd.exe and rename the copied file to sethc.exe
16. Restart the computer and at the login screen press the "shift" key 5 times in quick succession.
17. Type in the cmd window "control userpasswords2" without the quotation marks.
18. You can now make a new admin account and login with it or make your account an admin.

Enjoy.......

Saturday, November 19, 2011

Free Download Manager Boosts Your Download Speed, Makes Your Downloads A Breeze

free-download-manager-mainMany of us have fast internet connections as measured by overall total capacity, but rarely see maximum throughput. For example, I have a 100 megabit cable connection, but when I download a file via HTTP, I’m lucky to see more than 500KB/sec for that single file. Thankfully, there are ways to max out your connection.

Download managers open multiple streams to download the same file, and in doing so, get around limitations placed on the download speed. My favourite application to that end is Free Download Manager. There are two versions available on the website – a full featured version that offers a built-in bittorent client, video conversion and upload manager, and a “lite” version, that just has the download manager component. I only use the lite version, as I use µTorrent for my torrenting needs and have little use for an upload manager.

Once installed, Free Download Manager (FDM) is extremely easy to setup and use.

The first question you will be asked is to select your connection type. This will affect the download settings FDM uses. If you have anything above 2mbps, select 10/100M LAN and click Finish. That’s all there is to the setup!

free-download-manager-setup

Now, click on Options -> Settings, and then on Network in the Downloads section. Here we can tweak values as they relate to your downloads. I use FDM to download from Easynews quite a bit, as they allows HTTP downloads from Usenet. I usally bump up the “maximum number of connections per one server” to 20 and lower the “maximum number of running downloads” to 2 as per the image below.

free-download-manager-setup

You’ll notice that you have a little transparent box floating on your desktop. This is the “Drop Box” where you can drag and drop links into. You can turn it off by right-clicking on the FDM system tray icon and unticking “Drop Box”.

free-download-manager-dropbox

Okay, let’s see what this baby can do! For testing purposes, I’m going to try and download an AVG trial from AVG’s official website. First, the speed I get through Internet Explorer: 300-500KB/sec as per the image below.

free-download-manager-avg1

Then, the speed I get through FDM: 10MB/sec! Yes, that’s megabytes per second. In my experience, depending on the speed of the remote server, you can usually expect to max out your connection. Neat hey?

free-download-manager-avg2

Okay, one more thing. If you are downloading from a place that requires a username and password, once you have dragged and dropped the link into FDM, click on it and click the stop icon up the top (if it’s already started). Right click on the file and click Download Properties. You can then tick “Login is required” and enter in a username and password. Click OK, follow by the play icon up the top and the download will resume. Simple right?

via maketecheasier.com