Author: Petronald Green

How to check memory usage in linux 0

How to check memory usage in linux

The are actually multiple way to do this… lets start with the easiest

# -m makes it give result i MB, default is KB
free -m

#for a continuous feed
watch free -m

Result:

root@devget:/etc/nginx/sites-available# free -m
             total       used       free     shared    buffers     cached
Mem:          1024        225        798          0          0          0
-/+ buffers/cache:        225        798
Swap:            0          0          0

 Next up is my personal fav

# Note: press q to quit
top   // also try 'htop' or 'atop'

Result: (more…)

How to Connect to linux PC Via RDP 0

How to Connect to linux PC Via RDP

To use windows Remote Desktop Connection to connect to a linux pc. Simply install xrdp on the linux pc.

sudo apt-get install xrdp

Thats it! Youre done!

If for any reason you encounter any problems.. the solution is supposedly either

echo "gnome-session --session=ubuntu-2d" > ~/.xsession

or

sudo apt-get install gnome-session-fallback

 

How to fix VMware missing Kernel Modules Issue 0

How to fix VMware missing Kernel Modules Issue

If when trying to run VMware after upgrading or installing it gives:

Before you can run VMware, several modules must be compiled and loaded into the running kernel.

Kernel Headers 3.8.0-19-generic

Kernel headers for version 3.8.0-19-generic were not found. If you have installed them in a non-default path you can specify the path below.

or something similar, Simply run:

# Should work for any kernel header
sudo apt-get install build-essential linux-headers-$(uname -r)

Then rerun vmware (for VMware Workstation) or vmplayer (for VMware Player)

How to mount drive as read only on linux 0

How to mount drive as read only on linux

You normally have to do this when you are dual booting and your windows partition is in a state of hibernation.. Linux sees this and refuses to touch files

Complicated Linux Suggested Method:

sudo mount -t "ntfs" -ro "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,dmask=0077,fmask=0177" "/dev/sda2" "~/Desktop/D/"

Where ‘D’ is a folder you previously created to mount the drive (mkdir ~/Desktop/D)

If for some reason this doesnt work.. you can force delete the hibernation data by

mount -t ntfs-3g -o remove_hiberfile /dev/sda2 ~/Desktop/myplacetomount