Entradas

Linux – random mac address on boards OrangePi/NanoPi

For some boards, such as Orange Pi/NanoPi, mac address can random changing. To fix it, need to add one string to /etc/network/interfaces hwaddress ether  where ether – is a mac address in format 00:00:00:00:00:00 Example of part of file /etc/network/interfaces allow-hotplug eth0 no-auto-down eth0 iface eth0 inet dhcp     hwaddress 12:34:56:78:90:ab

MONTAR IMAGEN IMG EN LINUX PARA EDITARLA Y REDUCIRLA

Antes de nada hay que tener en cuenta que no se puede montar la imagen en su conjunto, ya que en realidad contiene dos particiones (sector de arranque y sector de sistema). Sin embargo, se puede montar las particiones individuales de la imagen.  Usando el siguiente comando, veremos la distribucion de particiones dentro de la imagen ("imagenRPi") CÓDIGO:  SELECCIONAR TODO fdisk -l "imagenRPi".img. Nos saldrà algo como la siguiente: CÓDIGO:  SELECCIONAR TODO Disco "imagenRPi".img: xxxxxx GiB, xxxxx bytes, xxxxx sectores Unidades: sectores de 1 * 512 = 512 bytes Tamaño de sector (lógico/físico): 512 bytes / 512 bytes Tamaño de E/S (mínimo/óptimo): 512 bytes / 512 bytes Tipo de etiqueta de disco: dos Identificador del disco: 0x81c0ff4b Device Boot Start End Blocks Id System "imagenRPi".img1 8192 122879 57344 c W95 FAT32 (LBA) "imagenRPi".img2 122880 5785599 2831360 83 Linux

Como trabajar a diario con github

Subir archivos de proyecto local a github publico Guia: 1 Empezar a trabajar,ir a la carpeta donde tenemos el proyecto cd /carpera: 1.$git init 2.$git add . 3.$git commit -m “version1.0″ 4.$git remote add origin https://github.com/usuario/repositorio 5.$git remote -v 6.$git push origin master Explicación: En este tutorial voy a explicar como subir los archivos de tu carpeta local a tu repositorio de Github. Para eso es importante seguir los siguientes pasos: Instala Git Bash en tu computadora utilizando la terminal. Lo puedes descargar del siguiente link: https://git-scm.com/downloads Ingresa a www.github.com y crea un repositorio publico en tu cuenta de Github. Abre la terminal y navega con el comando “cd” a la carpeta de tu proyecto. Dentro de tu proyecto escribe: $git init Agrega los archivos a tu nuevo repositorio local utilizando el siguiente comando (no olvides el punto después de “add”): $git add . Para entender el siguiente paso, es necesario entender el

activar Proxy en la shell de Linux

Set http_proxy shell variable on Linux/OS X/Unix bash shell Type the following command to set proxy server: $ export http_proxy=http://server-ip:port/ $ export http_proxy=http://127.0.0.1:3128/ $ export http_proxy=http://proxy-server.mycorp.com:3128/ If the proxy server requires a username and password then add these to the URL. For example, to include the username foo and the password bar: $ export http_proxy=http://foo:bar@server-ip:port/ $ export http_proxy=http://foo:bar@127.0.0.1:3128/ $ export http_proxy=http://USERNAME:PASSWORD@proxy-server.mycorp.com:3128/ How do I setup proxy variable for all users? To setup the proxy environment variable as a global variable, open /etc/profile file: # vi /etc/profile Add the following information: export http_proxy=http://proxy-server.mycorp.com:3128/ OR export http_proxy=http://USERNAME:PASSOWRD@proxy-server.mycorp.com:3128/ Save and close the file. A note about enabling proxy access to a specific user To enable proxy access for a