[CONTEXT]
In order to check the information of your CPU, memory and Disk usage.
[HOW]
To check your CPU information, just execute
$ cat /proc/cpuinfo
or
$ lscpu
To check your Memory information, just execute
$ cat /proc/meminfo
To check your Disk Usage information, just execute
$ df -h
[SOURCE]
man proc
man df
Showing posts with label How to. Show all posts
Showing posts with label How to. Show all posts
Monday, December 2, 2013
Sunday, April 21, 2013
Play encrypted DVD
[CONTEXT]
Playing encrypted DVD, sometimes you can recieved a error message like
libdvdread: Encrypted DVD support unavailable.
[WHEN]
You want to play encrypted DVDs with Linux.
[HOW]
As root
Edit your /etc/apt/source.list, adding this line
deb http://www.deb-multimedia.org wheezy main non-free
The first package to install is deb-multimedia-keyring.
# apt-get install deb-multimedia-keyring
Install the library libdvdcss2
# apt-get install libdvdcss2
After this steps, your dvd's player will be able to play DVD
[SOURCE]
http://www.cyberciti.biz/faq/debian-linux-squeeze-installing-libdvdcss2-command/
http://www.deb-multimedia.org/
[OTHERS ALTERNATIVES]
http://theos.in/desktop-linux/linux-playing-encrypted-dvd/
http://www.cyberciti.biz/faq/howto-ubuntu-linux-playback-dvd/
Playing encrypted DVD, sometimes you can recieved a error message like
libdvdread: Encrypted DVD support unavailable.
[WHEN]
You want to play encrypted DVDs with Linux.
[HOW]
As root
Edit your /etc/apt/source.list, adding this line
deb http://www.deb-multimedia.org wheezy main non-free
The first package to install is deb-multimedia-keyring.
# apt-get install deb-multimedia-keyring
Install the library libdvdcss2
# apt-get install libdvdcss2
After this steps, your dvd's player will be able to play DVD
[SOURCE]
http://www.cyberciti.biz/faq/debian-linux-squeeze-installing-libdvdcss2-command/
http://www.deb-multimedia.org/
[OTHERS ALTERNATIVES]
http://theos.in/desktop-linux/linux-playing-encrypted-dvd/
http://www.cyberciti.biz/faq/howto-ubuntu-linux-playback-dvd/
Mount a remote file system using ssh
[CONTEXT]
Access a remote file system
[WHEN]
You want to transfer files from/to a server which you have a ssh access
[HOW]
As root:
install fuse
#apt-get install fuse-utils sshfs ssh
and load its kernel module
#modprobe fuse
add your regular user to fuse's group
#adduser [your-user] fuse
(reboot the machine)
Now using your regular user:
Mount your remote directory:
$ sshfs [user@]host:[dir] mountpoint [options]
e.g.
$sshfs remote-user@remote.server:/remote/directory /home/user/remote/
(If you only put ':' is going to be your default directory)
Then, you can manipulate your remote folder as a regular local folder.
Unmount your remote directory
$fusermount -u mountpoint
e.g.
$fusermount -u /home/user/remote/
[SOURCE]
http://www.debianadmin.com/mount-a-remote-file-system-through-ssh-using-sshfs.html
Access a remote file system
[WHEN]
You want to transfer files from/to a server which you have a ssh access
[HOW]
As root:
install fuse
#apt-get install fuse-utils sshfs ssh
and load its kernel module
#modprobe fuse
add your regular user to fuse's group
#adduser [your-user] fuse
(reboot the machine)
Now using your regular user:
Mount your remote directory:
$ sshfs [user@]host:[dir] mountpoint [options]
e.g.
$sshfs remote-user@remote.server:/remote/directory /home/user/remote/
(If you only put ':' is going to be your default directory)
Then, you can manipulate your remote folder as a regular local folder.
Unmount your remote directory
$fusermount -u mountpoint
e.g.
$fusermount -u /home/user/remote/
[SOURCE]
http://www.debianadmin.com/mount-a-remote-file-system-through-ssh-using-sshfs.html
Tuesday, February 12, 2013
Give bash prompt an interactive value with a script
[CONTEXT]
Bash script to automatically give an interactive value to prompt.
[WHEN]
For instance, you need to execute a sudo command on user logon, and you need to do it through a script.
[HOW]
Edit a bash script with the following content:
Where:
P4ssw0rd is the password for root user
"/sbin/rcnetwork restart" is the command to execute as root user
Take special attention on the new line after the password on the bash script, and also on the single quotes.
[NOTE]
This is only for reference, you never should write out the root password on a plain text file.
Bash script to automatically give an interactive value to prompt.
[WHEN]
For instance, you need to execute a sudo command on user logon, and you need to do it through a script.
[HOW]
Edit a bash script with the following content:
#!/bin/sh
( echo 'P4ssw0rd
' ) | su - root -c "/sbin/rcnetwork restart"
Where:
P4ssw0rd is the password for root user
"/sbin/rcnetwork restart" is the command to execute as root user
Take special attention on the new line after the password on the bash script, and also on the single quotes.
[NOTE]
This is only for reference, you never should write out the root password on a plain text file.
Monday, February 11, 2013
Installing the Nvidia Kernel module
As root type
# apt-get install module-assistant nvidia-kernel-common
# m-a auto-install nvidia-kernel${VERSION}-source
# apt-get install nvidia-glx${VERSION}
and reboot
Source: http://wiki.debian.org/NvidiaGraphicsDrivers
Labels:
configuration,
Debian,
Debian 7.0,
How to,
install,
nvidia,
X
Sunday, February 10, 2013
Download videos from YouTube.com
youtube-dl is a script to download videos from youtube
To install this script, type as root
#
and to update it
#youtube-dl --update
To download videos, just type youtube-dl and link direction, for example
$youtube-dl http://www.youtube.com/watch?v=hUYzQaCCt2o
Also you can use this script to extract the audio of theses vidios, for example
$
Source: http://rg3.github.com/youtube-dl/
To install this script, type as root
#
wget http://youtube-dl.org/downloads/2013.08.09/youtube-dl -O /usr/local/bin/youtube-dl#chmod a+x /usr/local/bin/youtube-dl and to update it
#youtube-dl --update
To download videos, just type youtube-dl and link direction, for example
$youtube-dl http://www.youtube.com/watch?v=hUYzQaCCt2o
Also you can use this script to extract the audio of theses vidios, for example
$
youtube-dl --extract-audio --audio-format=mp3 -t http://www.youtube.com/watch?v=hUYzQaCCt2oSource: http://rg3.github.com/youtube-dl/
Saturday, February 9, 2013
GNU Screen Command
[CONTEXT]
Window manager that multiplexes a physical terminal between several processes, typically interactive shells.
[WHEN]
Pair remote programming/assistance. Using the multiuser mode to do pair programming or create a teaching environment.
[HOW]
sudo apt-get install screen
1. Change user to the username you want to allow screen access
2. To start up screen:
screen -S sessionname
3. Now instruct the second/remote user to SSH connect to your host/IP and to attach to the screen
screen -x sessionname
Both will be able to interact in the same session.
[REFERENCES]
http://www.gnu.org/software/screen
Friday, February 8, 2013
Skype 4.1 AMD64
In the case Skype 4.1 over Debian 7.0, I don't recommend install the deb file, alternatively we can use the tar.bz2 file.
As root:
Install some i386 packages,
#dpkg --add-architecture i386
#aptitude update
#apt-get install lib32asound2 ia32-libs ia32-libs-gtk
#aptitude install libxss1:i386 libqtwebkit4:i386 libqtgui4:i386
#aptitude install libqt4-network:i386 libsmokeqtxmlpatterns4-3:i386
#aptitude install libqtwebkit4:i386
#dpkg -i skype-debian_4.2.0.11-1_i386.deb
As root:
Install some i386 packages,
#dpkg --add-architecture i386
#aptitude update
#apt-get install lib32asound2 ia32-libs ia32-libs-gtk
#aptitude install libxss1:i386 libqtwebkit4:i386 libqtgui4:i386
#aptitude install libqt4-network:i386 libsmokeqtxmlpatterns4-3:i386
#aptitude install libqtwebkit4:i386
#dpkg -i skype-debian_4.2.0.11-1_i386.deb
Thursday, February 7, 2013
Intalling Java plugin
Download the Java from http://java.com/en/download/ (in this cases version 7 update 13).
As root user:
- Make a Java directory, for example
mkdir /usr/java
- Uncompress the downloaded file in it
- Create the symbolic link from your browser to the java plugin
cd /usr/lib/mozilla/plugins/
ln -s /usr/java/jre1.7.0_13/lib/$YOUR_ARCH/libnpjp2.so .
(replace YOUR_ARCH with amd64 or i386, etc)
Restart your browser.
Test your installation http://java.com/en/download/testjava.jsp
Source: http://java.com/en/download/help/linux_install.xml
As root user:
- Make a Java directory, for example
mkdir /usr/java
- Uncompress the downloaded file in it
tar zxvf jre-7u7-linux-i586.tar.gz -C /usr/java- Create the symbolic link from your browser to the java plugin
cd /usr/lib/mozilla/plugins/
ln -s /usr/java/jre1.7.0_13/lib/$YOUR_ARCH/libnpjp2.so .
(replace YOUR_ARCH with amd64 or i386, etc)
Restart your browser.
Test your installation http://java.com/en/download/testjava.jsp
Source: http://java.com/en/download/help/linux_install.xml
Wednesday, February 6, 2013
Acrobat Reader in AMD64
While I was installing Acrobat Reader 9.5.3, I've got the following error:
# dpkg -i --force-architecture AdbeRdr9.5.3-1_i386linux_enu.deb
(Reading database ... 179355 files and directories currently installed.)
Preparing to replace adobereader-enu 9.5.3 (using AdbeRdr9.5.3-1_i386linux_enu.deb) ...
Unpacking replacement adobereader-enu ...
dpkg: dependency problems prevent configuration of adobereader-enu:
adobereader-enu depends on libgtk2.0-0 (>= 2.4).
dpkg: error processing adobereader-enu (--install):
dependency problems - leaving unconfigured
Processing triggers for man-db ...
Errors were encountered while processing:
adobereader-enu
There is no official AMD64 package, then we have to install some i386 packages, so....
#dpkg --add-architecture i386
#aptitude update
And add all the missing libraries...
#aptitude install -f
#apt-get install libgtk2.0-0:i386 libxml2:i386 libstdc++6:i386
and it is better to download and install the bin file
#chmod +x AdbeRdr9.5.5-1_i486linux_enu.bin
#./AdbeRdr9.5.5-1_i486linux_enu.bin
# dpkg -i --force-architecture AdbeRdr9.5.3-1_i386linux_enu.deb
(Reading database ... 179355 files and directories currently installed.)
Preparing to replace adobereader-enu 9.5.3 (using AdbeRdr9.5.3-1_i386linux_enu.deb) ...
Unpacking replacement adobereader-enu ...
dpkg: dependency problems prevent configuration of adobereader-enu:
adobereader-enu depends on libgtk2.0-0 (>= 2.4).
dpkg: error processing adobereader-enu (--install):
dependency problems - leaving unconfigured
Processing triggers for man-db ...
Errors were encountered while processing:
adobereader-enu
There is no official AMD64 package, then we have to install some i386 packages, so....
#dpkg --add-architecture i386
#aptitude update
And add all the missing libraries...
#aptitude install -f
#apt-get install libgtk2.0-0:i386 libxml2:i386 libstdc++6:i386
and it is better to download and install the bin file
#chmod +x AdbeRdr9.5.5-1_i486linux_enu.bin
#./AdbeRdr9.5.5-1_i486linux_enu.bin
Flash Plugin in Debian
Fortunately, we have a Debian package that does the work for me:
flashplugin-nonfree.
Just type as root
aptitude install flashplugin-nonfree
To update:
flashplugin-nonfree.
Just type as root
aptitude install flashplugin-nonfree
To update:
update-flashplugin-nonfree --install
Intalling Debian on an UEFI laptop
I have a ASUS A55V UEFI Laptop. Install Debian linux on it, drove me up to the wall, then, a friend of mine (Bureado) pointed me out this tutorial
My advice: Use the latest CD of Debian Wheezy, run the installation CD without UEFI support, install Debian following the video tutorial without, DO NOT install a boot loader manager, when the installation is finished reboot the machine and use the installation CD with UEFI support, press 'c' to enter to the grub command pront and run the Debian installed
e.g.
grub> set root=(hd0,gpt2)
grub> linux /vmlinu_tab_ ro root=/dev/mapper/xen-linux
grub> initrd /initrd_tab_
g
rub> boot
then login as root and install grub with uefi support
aptitude install grub-efi-amd64
or
aptitude install grub-efi-ia32
depending on your computer
then (in either case)
grub-install && update-grub
Now you have Debian installed with its boot loader manager
Source:
http://www.youtube.com/watch? v=mnTj6_kDIeg
http://wiki.xen.org/wiki/Comprehensive_Xen_Debian_Wheezy_PCI_Passthrough_Tutorial
Subscribe to:
Posts (Atom)
