15 Maret 2016

Menjalankan Program Bahasa C atau C++ Pada Linux


Bagaimana menyusun (compile) dan menjalankan (run) hasil coding bahasa pemograman C / C++ di linux..?


Solusi menyusun(compile) dan menjalankan (run)  hasil Coding bahasa pemograman  dalam bahasa C / C++ di komputer atau laptop berbasis sistem operasi linux adalah
  • Pertama :
Pastikan laptop atau komputer berbasis linux telah terinstal GCC (GNU COMPILER COLLECTION). Lakukan pengecekan pada Command Line
gcc --version

  • Kedua :
Kalau ternyata GCC(GNU COMPILER COLLECTION) lewati tahap ini, akan tetapi jika ternyata belum terinstall maka kita harus menginstal dengan perintah dibawah ini :

sudo apt-get install build-essential
sudo apt-get update

  • Ketiga  :
Coba cek kembali GCC, dan seharusnya sudah terinstal.

Sekarang kita sudah mempunyai GCC (GNU COMPILER COLLECTION), kita lakukan test terlebih dahulu dengan membuat contoh program bahasa C

Langkah 1 :
Buat file kosong nama file Coba_BahasaC.c dengan perintah "gedit" (jika laptop atau komputer kita menggunakan ubuntu), disini saya menggunakan LINUX LITE maka saya menggunakan perintah "leafpad".

sudo leafpad Coba_BahasaC.c

Salin kode dibawah ini kedalam leafpad/gedit Coba_BahasaC.c dan kemudian simpan.

#include <stdio.h>
 
int main() {
  printf("Hello World \n");
  return 0;
}

Langkah 2 :
Karena kita membuat program dalam bahasa C maka penyusunnya(Compiler), maka kita gunakan perintah gcc -o [nama_file] [nama_file.c]. Silahkan salin kode di bawah ini :

sudo gcc -o Coba_Bahasa Coba_BahasaC.c

Langkah 3 :
Terakhir, tinggal kita jalankan (run) dengan perintah :

./Coba_BahasaC 

Semoga bermanfaat..!!
Kemudian bagaimana jika compile C++ apakah sama? Jawabannya berbeda,  Silahkan menuju link yang telah disediakan How To Compile And Running C++ On Linux

14 Maret 2016

Creating Access Point / Share Wifi On Laptop Without Software " LINUX LITE "

This time I will share a little knowledge about how to make the access points / share wifi / hotspot on laptop without additional applications.

Only the linux operating system and network managers a little modification .

Jump on the subject of how to create access points without additional applications.

Step 1 :
Make sure our laptop is connected to the network via Ethernet :


Step 2 :
Create New Wi-fi Network (I give it a name = "tricksix" / password = "tricksix.com" and then select button create)

Step 3 :
at this stage we can choose one , through a Comand line or nautilus . if you select via Comand line follow the instructions below : (Ctrl + Alt + T)
sudo leafpad /etc/NetworkManager/system-connections/tricksix

"tricksix" is the name I gave to the access points

Step 4 :
 If you follow the third step , skip this step...!!!

Step 5 :
find the line mode = adhoc then replace mode = ap and Save


Step 6 :
Connect to a wifi network "tricsik" and choose Connect..!!!

fairly easy to follow , then let us take a look from the other device


Goog Luck ..!!

Kalkulator Konversi Angka Jitu