Redirect

Showing posts with label Linux. Show all posts

Install laptop-mode-tools   $yaourt -S laptop-mode-tools   $yaourt -S hdparm Run service for laptop mode tools   #systemctl enable ...


Install laptop-mode-tools
  $yaourt -S laptop-mode-tools
  $yaourt -S hdparm
Run service for laptop mode tools
  #systemctl enable laptop-mode.service
  Install acpid
  $yaourt -S acpid
Run service for acpid
  #systemctl enable acpid.service
Install cpupower
  $yaourt -S cpupower
Run Service for cpupower
  #systemctl enable cpupower.service
Run Service fancontrol
  #systemctl enable fancontrol
Detect the sensor
  #sensors-detect
Run Service for lm_sensor
  #systemctl enable lm_sensors.service

This is my own notes, and it's works for me to cooling down the temperatur my note nook

This is my personal notes when i try to learn Vi editor To input press 'i' Finish input press 'esc' To change cursor,...


This is my personal notes when i try to learn Vi editor

To input press 'i'
Finish input press 'esc'
To change cursor, don't forget to press "esc" after that:

       Button                         Function
         h                          Left one character
         j                           Down one character
         k                          Up one character
         l                           Right one character
 
Simple editing:
        Button                        Function
        x                           Delete One character in cursor position
        4x                         Delete 3 character to right
        X (Uppercase)      Delete one character to left
        3dw(Fast)             Delete 3 word
         dd                        Delete 1 row
         2dd                      Delete two rows
         D (Uppercase)     Delete all rows to end (start from cursor)
         r                           Change character in cursor
                                     'esc' and press  r to input
         cw                        Change Words
         C (Uppercase)      Change Rows
         a                           Insert character in the end of row
         o                           Insert new row
         u                           Undo
         :w (Press shift)      To save but for the first you must press 'esc'
         :q (Press shift)       Quit


         /                           Find words

Install tor and vidalia   #pacman -S tor Run the services #systemctl enable tor #systemctl start tor Create this bash script: ...


Install tor and vidalia

  #pacman -S tor

Run the services
#systemctl enable tor
#systemctl start tor

Create this bash script:

#############################################################
#!/bin/bash
export TORCHROOT=/opt/torchroot

mkdir -p $TORCHROOT
mkdir -p $TORCHROOT/etc/tor
mkdir -p $TORCHROOT/dev
mkdir -p $TORCHROOT/usr/bin
mkdir -p $TORCHROOT/usr/lib64
mkdir -p $TORCHROOT/var/lib

ln -s /usr/lib  $TORCHROOT/lib64
cp /etc/hosts           $TORCHROOT/etc/
cp /etc/host.conf       $TORCHROOT/etc/
cp /etc/localtime       $TORCHROOT/etc/
cp /etc/nsswitch.conf   $TORCHROOT/etc/
cp /etc/resolv.conf     $TORCHROOT/etc/
cp /etc/tor/torrc       $TORCHROOT/etc/tor/

cp /usr/bin/tor         $TORCHROOT/usr/bin/
cp /lib/libnss* /lib/libnsl* /lib/ld-linux.so* /lib/libresolv* /lib/libgcc_s.so* $TORCHROOT/u$
cp $(ldd /usr/bin/tor | awk '{print $3}'|grep "^/") $TORCHROOT/usr/lib64/
cp -r /var/lib/tor      $TORCHROOT/var/lib/
chown -R tor:tor $TORCHROOT/var/lib/tor

sh -c "grep ^tor /etc/passwd > $TORCHROOT/etc/passwd"
sh -c "grep ^tor /etc/group > $TORCHROOT/etc/group"

mknod -m 644 $TORCHROOT/dev/random c 1 8
mknod -m 644 $TORCHROOT/dev/urandom c 1 9
mknod -m 666 $TORCHROOT/dev/null c 1 3
#################################################################

Run that script

Copy file in /usr/lib/ld-linux-x86-64.so* to /opt/torchroot/usr/lib/
Run chroot
# chroot /opt/torchroot /usr/bin/tor
 Firefox

In Preferences > Advanced > Network tab > Settings manually
set Firefox to use the SOCKS proxy localhost with port 9050.
Then you must type about:config into the address bar and void your warranty.
Change network.proxy.socks_remote_dns to true and restart the browser.
This channels all DNS requests through TOR's socks proxy.

Alternatively, install the Tor Browser Bundle (tor-browser-en)
from the AUR. This will allow you to toggle very easily between
Tor navigation and normal navigation instead of changing the preferences.

This is my personal notes when i try to install burg Install burg: $yaourt -S burg-bios-bzr Install burg to your MBR #burg-insta...


This is my personal notes when i try to install burg

Install burg:
$yaourt -S burg-bios-bzr

Install burg to your MBR
#burg-install /dev/sda

Configure burg (Detect OS in sda)
#burg-mkconfig -o /boot/burg/burg.cfg

  This is some burg themes:
$yaourt -S burg-themes
$yaourt -S burg-themes-extras
$yaourt -S persia-theme-burg
$yaourt -S arch-theme-burg

Don't foreget, after you install burg, you must re-Configure your burg:
#burg-mkconfig -o /boot/burg/burg.cfg

Saya menggunakan USB wireless merek Kasens 990WG, di box nya bertuliskan 6000MW. Ketika saya mencoba dengan reg db Bolivia (BO), saya han...


Saya menggunakan USB wireless merek Kasens 990WG, di box nya bertuliskan 6000MW. Ketika saya mencoba dengan reg db Bolivia (BO), saya hanya mendapat 20dbm. Karena masih terkena limit regulasi dari negara tersebut. Lalu bagaimana solusi untuk meningkatkan kekuatan sinyal wireless? Tentunya kita harus membuat regulasi sendiri tanpa ada batasan limit. Cara ini hanya berjalan di linux dan distro yang saya gunakan adalah Arch linux.
Langkahnya:
     Download Wireless-reg-db
     Extract Wireless-reg-dr
     Edit db.txt dengan text editor
#nano db.txt
     Dan masukan kode di bawah ini di akhir db.txt
    country ZZ:
  (2402 - 2482 @ 60), (N/A, 60)

Setelah itu,
 install python2-m2crypto
#yoaurt -S python2-m2crypto
Di arch linux saya mendapati error python edit db2bin.py to version 2
Karena db2bin.py menggunakan python2 dan default python dari Arch Linux adalah python 3  versi 3. Solusinya buka dengan pyhton2 jangan versi 3
#sudo make
Install CRDA

$yaourt -S crda

Copy regulatory.bin ke crda

#cp regulatory.bin /usr/lib/crda/
Extract crda, Contoh:
 /home/user/Wireless/reg-db/crda-1.1.3

Install libnl
#yaourt -S libnl
Salin root.key.pub ke crda folder
#cp root.key.pub.pem /home/user/Wireless/reg-db/crda-1.1.3/pubkeys/
Ke folder crda:
#make
#make install
#reboot
#ifconfig wlan0 down
#iw reg set ZZ
#ifconfig wlan0 up

Setelah install OS di virtualbox ternyata saya megalami masalah dengan ukuran disk vdi virtualbox. Size nya tidak cukup untuk install apl...


Setelah install OS di virtualbox ternyata saya megalami masalah dengan ukuran disk vdi virtualbox. Size nya tidak cukup untuk install aplikasi lagi ^_^
Virtualbox sudah menyediakan layanan untuk merubah ukuran harddisk via command. berikut adalah cara yang saya gunakan untuk merubah ukuran harddisk itu.

Sebelum memulai, lihat dulu ukuran harddisk vdi yang kita punya dengan cara
$ VBoxManage list hdds
UUID:           XXXfab68-XXXX-XXXX-XXXX-XXX9adXXXbd8
Parent UUID:    base
State:          created
Type:           normal (base)
Location:       /home/aditya/VirtualBox VMs/Win 7/Win 7.vdi
Storage format: VDI
Capacity:       30000 MBytes

Itu adalah ukuran sebelum di rubah ukurannya. Dalam kasus ini saya mau merubah capacity nya menjadi 45000. Berikut adalah command nya:
$ VBoxManage modifyhd /home/aditya/VirtualBox\ VMs/Win\ 7/Win\ 7.vdi --resize 45000

Dalam hal ini saya menyimpan virtualbox vdi di directory /home/aditya/VirtualBox VMs/Win 7/
Semua itu tergantung dimana kita meletakannya.  
Setelah itu cek kembali:
$ VBoxManage list hdds
UUID:           XXXfab68-XXXX-XXXX-XXXX-XXX9adXXXbd8
Parent UUID:    base
State:          created
Type:           normal (base)
Location:       /home/aditya/VirtualBox VMs/Win 7/Win 7.vdi
Storage format: VDI
Capacity:       45000 MBytes

Semoga bermanfaat..........

Cara install linux di android dengan menggunakan kit Debian adalah salah satu jenis OS atau yang lebih tepat di sebut distro linux yang...

Cara install linux di android dengan menggunakan kit


Debian adalah salah satu jenis OS atau yang lebih tepat di sebut distro linux yang bisa kita jalankan di android kita. Cara yang saya gunakan bukanlah dengan dual boot os Android dan Linux. Tetapi debian itu ada di dalam terminal android kita. Jadi aman dari resiko jika terjadi kegagalan instalasinya Di persiapkan dulu alat tempurnya:

  • Terminal untuk android, saya menggunakan Juice SSH dari Google Play
  • Debian kit versi 1.6 download dari Google Drive saya download disini.

Jika sudah di siapkan, langsung saja kita eksekusi debian untuk linuxnya :D


  1. Download deb 1.6 shar.
  2. Buka terminal masuk ke folder dimana deb 1.6 disimpan.
  3. Ketik perintah ini: sh debian-kit-1-6.shar
  4. Anda akan di konfirmasi untuk ekstrak di /data/local/deb/ lalu autorun akan berjalan.
  5. Anda akan di tanya untuk memilih jenis paket yang akan di install. 
  6. Dalam hal ini saya menginstall debian Wheezy dengan paket dasar shell nya saja dengan kapasitas 512 MB. 
  7. Masukan pilihan di sebelah kiri Debian Wheezy dan sebelah kiri 512MB. Contoh: w0
  8. Tunggu beberapa menit /jam. Lama dari proses ini tergantung koneksi internet anda. Proses ini akan membuat file .img di direktory /storage/sdcard0/debian.img
  9. Setelah selesai unpack nya ketik perintah deb. Jika berhasil berarti debian sudah terinstall dengan benar.
  10. Keluar dari terminal, lalu masuk kembali kemudian ketik deb
  11. Setting repository agar cepat pada saat update. Dibawah adalah daftar repostiory yang bisa di gunakan.
  12. Update aplikasi dengan perintah apt-get update.
  13. Install andromize. apt-get install andromize. Andromize adalah aplikasi penyempurna untuk menjalankan debian di android.
   
   Setting Repository debian di android:
  • Ketik perintah ini:
nano /etc/apt/sources.list.d/sources.list
  • Agar tidak terjadi duplikat repository, ada baiknya hapus repository lama dan ganti dengan yang baru.
  • Berhubung ga bisa di copas ^_^ download souces.list nya disini.
  • Hapus sources.list yang lama, dan copy sources.list yang baru di download ke direktory /etc/apt/sources.list.d/
  • Isi dari sources.list: 
## LOKAL## KAMBING UIdeb http://kambing.ui.ac.id/debian/ wheezy main contrib non-freedeb http://kambing.ui.ac.id/debian/ wheezy-updates main contrib non-freedeb http://kambing.ui.ac.id/debian-security/ wheezy/updates main contrib non-free## LUARdeb http://ftp.de.debian.org/debian wheezy-backports maindeb http://ftp.us.debian.org/debian wheezy main contrib non-freedeb http://ftp.us.debian.org/debian wheezy-updates main contrib non-freedeb http://security.debian.org wheezy/updates main contrib non-free##  deb-src http://ftp.us.debian.org/debian wheezy main contrib non-free##  deb-src http://ftp.us.debian.org/debian wheezy-updates main contrib non-free##  deb-src http://security.debian.org wheezy/updates main contrib non-free
  • Lalu setting juga di  /etc/apt/sources.list.d/sven-ola.list menjadi:
deb http://sven-ola.dyndns.org/repo wheezy main



Sebelum jauh memasuki dunia linux, ada baiknya kita mengenal perbedaan yang paling mencolok antara linux dengan os windows. Salah satu ...



Sebelum jauh memasuki dunia linux, ada baiknya kita mengenal perbedaan yang paling mencolok antara linux dengan os windows. Salah satu yang paling berbeda jelas adalah User. Dimana pada windows pengguna adalah seorang admin, Sedang pada linux (kecuali distro pentest) default pengguna hanya user biasa. Untuk menjalankan kita harus menjadi admin/root. Untuk menginstall aplikasi, paket, serta menjalankan system, kita harus menjadi root. Dibawah ini adalah contoh ketika kita membuka terminal/konsole apakah kita root atau user biasa.
Ketika pertama kali kita membuka terminal, kita akan melihat
pengguna@host:~$
Atau sebagai contoh:

freeman@lenovo:~$
Ini berarti pengguna di host/komputer tertentu. Perhatikan tanda string "$" di akhir, tanda itu berarti kita masih sebagai pengguna biasa/user yang tidak bisa mengatur file system.
Jika kita mengetik perintah

sudo su
atau

su -
Maka nama di terminal akan berubah menjadi

root@lenovo:~#
Jika tanda "$" berubah menjadi tanda "#" maka kita sudah menjadi root dan dapat mengatur file system.

Prepare Disks Whether you have used the internet-connected Linux distro or the Gentoo minimal installation CD way to get to here, yo...


Prepare Disks

Whether you have used the internet-connected Linux distro or the Gentoo minimal installation CD way to get to here, you’re all set. At this step, you have to setup a space for Gentoo to sit in in your hard disk. Preparing/partitioning disks is a big topic and I’m gonna summarize it here. Your disk is divided into sections called partitions. Each partition have a size and a filesystem. The filesystem is a way to organize folders and files in a way the OS can understand. There are alot filesystems out there like ext2, ext3, HFS, HFS+, NTFS, FAT, …, etc. (If you don’t know these names, it’s ok, don’t panic). In order to install an operating system into the hard disk, you have to allocate a space for it in the disk. That is, you have to make a partition for the OS to write itself into and use. If you want learn more about disks and partitions I recommend searching for a good tutorial rather than reading my summary because it’s a long and interesting topic.
Ok, now you understand why we need to partition the disk for Gentoo to use. To partition your disk you have to use a partition editor program like ‘Partition Magic’ on Windows or ‘gparted’ on Linux. Or use the most basic partition editing tool ‘fdisk’ (but it lacks the ability to move partitions). You need to create what every Linux distro needs from the disk. A root partition and a swap partition (Although some guys reported to me that using Linux in the huge memory age [this age], there’s no need for a swap partition). You can create a separate boot partition, home files partition or anything you like. Most Linux users set one root partition along with a swap partition. You have to sit and decide your partitioning design then carry on. Once, you’ve prepared your disk for Gentoo you can continue installing Gentoo. I’ll use ‘fdisk’ to create three partitions boot, root and swap partition (assuming my disk name is /dev/sda):
(WARNING: don’t do this blindly. You will lose all of your information. I’m assuming you don’t need any of your files and partitioning the whole /dev/sda disk for Gentoo).
fdisk /dev/sda
Command (m for help):
First delete all of your exiting partitions:
Command (m for help): d
Partition number (1-4): 1
Keep on deleting the partitions until there’s no any. Second, Create the boot partition (following the Gentoo Handbook, boot partition will be 32 MB):
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-3876, default 1): 
(Hit Enter)
Last cylinder or +size or +sizeM or +sizeK (1-3876, default 3876): +32M
(notice the +32M that means I want the boot partition to be of size: 32 MB).
Then, toggle the bootable flag by:
Command (m for help): a
Then, create the swap partition:
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (56-3876, default 56): (Hit enter)
Last cylinder or +size or +sizeM or +sizeK (65-3876, default 3876): +512M
Command (m for help): t
Partition number (1-4): 2
Hex code (type L to list codes): 82
And now swap is created. Root partition is left:
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 3
First cylinder (1-3876, default 1): (Hit Enter)
Last cylinder or +size or +sizeM or +sizeK (1-3876, default 3876): (Hit Enter)
(NOTE: hitting enter the ‘Last cylinder’ prompt makes the partition take the rest of the disk).
And last, we have to save our work and write the partition table to physical disk:
Command (m for help): w
At this stage, you have setup your disk and is ready for Gentoo installation. Comming up in Part 2…

References

Network Configuration In order to download stage3 tarball and portage snapshot from Gentoo website, you have to connect to the inter...

Network Configuration


In order to download stage3 tarball and portage snapshot from Gentoo website, you have to connect to the internet. Connect to internet the way you like. The most common ways to connect to internet are using an ethernet cable or using wireless network. If you want to connect to internet using ethernet cable just plugin the cable wire and try to ping any outside server like http://www.google.com for example. If the result is unknown host (that is if you’re not connected) then you’re most probably haven’t taken an IP address yet. Use the command:
dhcpcd eth0
to get an IP address (Make sure to change the ‘eth0‘ part with your ethernet interface. use the command ‘ifconfig -a‘ to see all of your interfaces) and try to ping google again and this time it should work (If it doesn’t, then most probably your network is down).
If you want to connect to internet using a wireless network then you can configure your wireless interface (most probably will be wlan0. check with ‘ifconfig -a‘ command) using the tool ‘iwconfig‘. Or better, you can use the famous ‘wpa_supplicant‘ program to handle your wireless network and get you connected right away (note: if your wireless network is encrypted with WPA encryption algorithm then you have to use ‘wpa_supplicant‘ program). I prefer using ‘wpa_supplicant‘ program by the way. To use ‘wpa_supplicant‘ program you have to write some configuration files first. open up ‘/etc/conf.d/net‘ with your favorite editor (I prefer Vim. But, you better use another editor like ‘nano‘ because Vim is complex to use):
nano /etc/conf.d/net
and write these lines:
# Prefer wpa_supplicant over wireless-tools
modules=( “wpa_supplicant” )
# It’s important that we tell wpa_supplicant which driver we should
# be using as it’s not very good at guessing yet

wpa_supplicant_wlan0=”-Dwext”
(notice the wlan0 part ! you should change it with your wireless interface, I don’t have to tell you now). Alright, save the file and exit (pressing CTRL+x will close the file and nano will ask you if you want to save or not and will ask about the filename. Just save the file with the same filename).
After configuring ‘/etc/conf.d/net‘ you have to write the ‘wpa_supplicant‘ configuration file (most probably will be ‘/etc/wpa_supplicant/wpa_supplicant.conf‘). Open the ‘wpa_supplicant‘ configuration file with ‘nano‘:
nano /etc/wpa_supplicant/wpa_supplicant.conf
and write this configuration if your wireless network is WEP encrypted:
# The below line not be changed otherwise we refuse to work
ctrl_interface=/var/run/wpa_supplicant
# Ensure that only root can read the WPA configuration
ctrl_interface_group=0
# Let wpa_supplicant take care of scanning and AP selection
ap_scan=1
# Simple case: WPA-PSK, PSK as an ASCII passphrase, allow all valid ciphers
network={
ssid=”name_of_your_ssid”
key_mgmt=NONE
wep_key0=”your_network_key”
# The higher the priority the sooner we are matched
priority=5
}
or write this configuration if your wireless network is WPA/WPA2 encrypted:
# The below line not be changed otherwise we refuse to work
ctrl_interface=/var/run/wpa_supplicant
# Ensure that only root can read the WPA configuration
ctrl_interface_group=0
# Let wpa_supplicant take care of scanning and AP selection
ap_scan=1
# Simple case: WPA-PSK, PSK as an ASCII passphrase, allow all valid ciphers
network={
ssid=”name_of_your_ssid”
psk=”your_network_key”
# The higher the priority the sooner we are matched
priority=5
}
now save the file and exit nano. At this stage, you’re ready to connect:
wpa_supplicant -iwlan0 -Dwext -c/etc/wpa_supplicant/wpa_supplicant.conf &
(notice the latest ampersand character ‘&‘, this way ‘wpa_supplicant‘ will be running in the background but you will see its output when it comes).
if you want to understand the command line of ‘wpa_supplicant‘, then read its man page ‘man wpa_supplicant‘ (come on, don’t be lazy). Now, you’re connected and ready to go.
(NOTE: if you’re still not internet connected while you’re connected to your wireless network, then probably you didn’t took an IP address. Use the command ‘dhcpcd wlan0‘ to take one).