Tuesday, December 31, 2013

Find command


Linux commands - Find command

Find files under a specified directory that match conditions you specify.

find / -name myfile*

Find files in the root directory and all directories under it that have file names beginning with myfile. The * is a wild-card character that represents any number of characters. The ? is a wild-card character that represents a single character.

find -name '*.pdf' -print -exec chown User2 {} \;

Find all files in this directory and all subdirectories that end with .pdf, display the names of all files that are found on the screen and, for each file (indicated by the curly braces — {}), change its owner to User2.
 The -print option is not necessary, but it is handy to track the progress of the find command. If you do not use -print, the find command is silent except for error messages from find or from chown.

find -name '*.pdf' -exec grep -il 'SOMETHING' {} \;

Find all files in this directory and all subdirectories that end with .pdf and look for the pattern SOMETHING in each of the files. The -i option to grep makes the search case-insensitive. The -l option to grep causes grep to display the names of the files that have SOMETHING in them. When a file is found that contains SOMETHING, this command displays the full path to the file from the current directory (for example,


Monday, December 30, 2013

Ls command


Linux commands - Ls command

List the files in the current directory.

ls -al
List all (-a) the files in the current directory in long (-l) format.

ls *.pdf
List files in the current directory that end with .pdf. The * is a wild-card character that represents any number of characters. The ? is a wild-card character that represents a single character.

ls /home/user
List the files in the directory /home/user.


Saturday, December 28, 2013

Happy Birthday Linus (Linux)


Happy Birthday Linus (Linux)

Microsoft sends Linux a Happy Birthday video.
The video shows despite of the dispute between Penguin and Windows, Bill gates gave a birthday cake for Penguin which the penguin accepts it.

Microsoft sends a clear message , by saying "Linux and Microsoft" instead of the old one "Linux vs Microsoft".

Microsoft wants to work with Linux in the future.


How to rename a file in Linux


How to rename a file in Linux

"mv" command renames the file, It needs only the source of old file and the location will be in with a new name, or with the same name.

It is obvious from the command "mv" that moves files, however It renames them too as well.

An example to demonstrate renaming a file in the same path :

mv {old-file-name} {new-file-name}
mv file myfile

In fact, It moved the file in the same location and gave it a new name.

Note : You can do the same example, but changing the name is necessary or you will get an error.

This example moved a file from a path to another without changing Its name

mv {old-path/file-name} {new-path/file-name}
mv ~/Myfile ~/Desktop/Myfile 

This example changes the name and the path as well :

mv {old-path/file-name} {new-path/new-file-name}
mv ~/Myfile ~/Desktop/Mynewfile

Note : The same can be done with folders.


Thursday, December 26, 2013

How to Download Youtube videos in Linux


How to Download Youtube videos in Linux

In this Post, I will show you many ways on how to download Youtube videos in Linux.

Newbies of course will prefer something very easy, that does not require typing a single command.

To download Youtube videos in Linux

Flashgot Add on
Flashgot Add on

This one require to have Firefox, then we have to install this Add on, Flashgot : It allows you to Save movies and audio clips With a single click from all webpages and not only from Youtube.

This Add on also gives the choice to select your external download manager.


There are tons of websites that provides that kind of service (Downloading from Youtube).

I recommend These two Websites for you :


For the lovers of Command Line, Youtube-dl is the best tool.

To install it in Ubuntu and Ubuntu base distributions like Linux Mint 
type the following command :

sudo apt-get install youtube-dl

for Debian users : 

sudo aptitude youtube-dl

for Arch Users : 

sudo pacman -S youtube-dl


You need to search for the video you want to download from Youtube

Open up the Terminal and type in :

youtube-dl {video URL}

Note : Don't forget to replace {video URL} with address URL you copied from the browser's navigation 


your video will start downloading, but your download may be heavy, and the video will be in a format you don't want.

To download a video in a format of your choice, type in :

youtube-dl -F  {video URL}

youtube-dl -F

it will give you list of different options, showing the formats and resolutions of that video.

Example of youtube-dl -F

choose the code of one you like and type in :

youtube-dl -f  {format code} {video URL}

Note : Don't forget to replace {format code} with code of your choice and {video URL} with address (URL) you copied from the browser's navigation.

youtube-dl -f

In this example, I chosen to download the video in Webm format with resolution [640x360] which Its code is 43.


Valve's Christmas gift


Valve's Christmas gift

Valve now is gives away its wonderful game of zombie shooter, Left 4 Dead 2, for free on download service Steam.

To get your copy of the game, you’ll need to log in to a Steam account, go to Left 4 Dead 2′s store page, and then click ‘install game.’ This expires on December 26th at 10AM PT/1PM ET, this is a great occasion to get this game for free.


Wednesday, December 25, 2013

Merry Christmas!!


Merry Christmas!!

Sorry I was late, but I want to wish everyone a Merry Christmas. I hope everyone is having a very good time with your loved ones these days. Enjoy!.


Tuesday, December 24, 2013

Linux : Ip Commands


Linux : Ip Commands

ifconfig : Display Current Config for all NIC’s.

ifconfig eth0 : Display Current Config for eth0.

ifconfig eth0 : Assign IP.

ping -c 3 : Ping.

ifconfig eth0:0 : Assign multiple IP’s.

ifconfig eth0:1 : Assign second IP.

ifconfig eth0 down : Disable network card.

ifconfig eth0 up : Enable network card.

route “or” route -n : View current routing table.

arp “or” arp -n : View arp cache.

ifconfig eth0 netmask : Assign IP/Subnet.

route add default gw : Assign Default Gateway.

traceroute www.google.com : Trace Route.

tracepath www.google.com : Trace Path.

host www.google.com : DNS Test.

dig www.google.com : Advanced DNS Test.

Note : Some commands will need root privilege, so better to Enter as Root to perform them all.


Monday, December 23, 2013

Terminal : keyboard Shortcuts


Terminal : keyboard Shortcuts

Keyboard Shorcuts helps in writing codes easily and shorten time.
Some users, probably power users who loves doing some works via the Command Line, performing complicated tasks with just a few keystrokes.

Basic Keyboard Shortcuts

Up/Down Arrows = With those two keys, you can move between your last commands.
Ctrl+Left/Ctrl+Right = Jumps between arguments (words) in your command
Ctrl + U = Clears all characters starting from the cursor position.
Ctrl + K = Clears all characters starting from the end of the command to the position of the cursor.
Ctrl + A = Moves you to the start of the command.
Ctrl + E = Moves you the the end of the command.
Ctrl + L = Clears the screen.
Ctrl + R = Lets you search your command history.
Ctrl + Shift + T = Opens new Tab.
Ctrl + Shift + N = Opens new Terminal.
Ctrl + P = Lets you Browse the command you executed before.
Ctrl+ O = Works as "Enter" button.
Ctrl + Shift + C = Lets you copy selected text.
Ctrl + Shift + V = Lets you paste.
Tab = This is the powerful shortcut, Everyone loves it. It completes paths and commands.

With Path :

cd ~/De 

after hitting Tab, It completes it.

cd ~/Desktop

With command :


after hitting Tab, It completes it.


What if there are resemblance between names ?

We take for example folder "De" and "Desktop"

we typed "De" and hitting Tab for auto-completion. It makes an output : "De", "Desktop", we have then to add another caracther to make it different.

cd ~/Des


Saturday, December 21, 2013

Man command


man command


Friday, December 20, 2013

Manjaro gets better and better with each release


Manjaro gets better and better with each release

Arch Linux is a lightweight and flexible Linux distribution which aims to simplicity and user-centrism, Manjaro Linux (some people pronounce it with letter "J" while others use letter "H" instead) is based on Arch Linux and carries forward the Arch Linux philosophy. However It's a user friendly  that offers intuitive installation process, automatic hardware detection, stable rolling-release model, ability to install multiple kernels, special Bash scripts for managing graphics drivers and extensive desktop configurability.

Manjaro Linux is cutting egde but not bleeding edge. They have their own repositories and access to Arch User repositories (Aur) as well.

It is a rolling release, that means you can install it once, you will continuously get updates (daily updates) no-matter what release you use, in contrast to standard release software which is upgraded between versions.

It comes with Xfce, Openbox,  Desktops as the core, however you can find Manjaro Minimal Net Edition (Arch way), and Manjaro Community Editions that gives you a choice between many other Desktops such as Gnome, Cinamon, E17, Lxde, Mate, Kde.

I have tried Manjaro Openbox edition and the Xfce Edition as well. All I have to say is, they did a magnificent job, I felt like I'm on Linux mint but using Arch package manager (Pacman). The installation was quite easy. I used Graphic installation but they provide also Cli installation which is fast.

I had not faced any problem yet, but I wasn't doing match work on my computer.

Give it a try, Download Manjaro

Some screenshots of Manjaro With 4 different flavours

Manjaro openbox edition
Manjaro Openbox edition 

Manjaro xfce edition
Manjaro xfce edition

Manjaro Kde edition
Manjaro Kde edition

Manjaro Cinnamon edition
Manjaro Cinnamon edition


Thursday, December 19, 2013

Who command


who command


Rm command


rm command


Tuesday, December 17, 2013

SteamOs Review


SteamOs Review

SteamOS is based on Debian GNU/Linux, well known for its stability. It aims to bring PC gaming into the living room.

SteamOS uses Linux kernel 3.10 and GNOME as Its desktop environment. The system includes basic GNOME applications, such as Brasero, Dconf, Baobab, GNOME Terminal, Evince, Disks, Eye of GNOME, GNOME Dictionary, and GNOME Screenshot. The Iceweasel web browser and the Steam for Linux client are also installed, along with a shortcut for the SteamOS desktop.

Most Linux users are excited to see this operating system which is based on Linux, so I came with these quick screenshots.

steamos gnome activities

steamos login

steamos computer

steamos gnome details

steamos gnome system settings

To Download it : from Here 
Note : Login name and password is : steam


Saturday, December 14, 2013

Valve's Steam OS available to download now


SteamOs is available to download now for people who like to test new things especially those who try new Linux distributions. This is their chance to test a new Linux flavour developed by the Bellevue-based game company.

If you want something working good and stable, you might wait because the system is still beta.

SteamOS is based on Debian GNU/Linux, and it requires to run :

  • Intel or AMD 64-bit capable processor
  • 4GB or more memory
  • 500GB or larger disk
  • NVIDIA graphics card (AMD and Intel graphics support coming soon)
  • UEFI boot support
  • USB port for installation


Thursday, December 12, 2013

SteamOS will be available to download on December 13


SteamOS will be available to download on December 13
Valve company announced that SteamOs will be available for public download on December 13.

The announcement comes as Valve ready their Steam Machine and Steam Controller prototypes for shipping on the same day. only 300 people will be getting the prototype devices, Valve will be offering its Linux-based OS to everyone when the devices ship on Friday.

Valve has limited The beta to the U.S(300 people), It is obvious that They wanted to make Steam hardware available to testers all over the world, however due to some obstacles, they could not make it accessible for all people who want to test  SteamOs Machines


Wednesday, December 11, 2013

How to convert binary files into text file?


How to convert binary files into text file?

How to convert binary files into text file?

Simply by using this Linux command :

strings <binary file name >


How to find all tar files in current directory and decompress them ?


How to find all tar files in current directory and decompress them ?

How to find all tar files in current directory and decompress them ?

find . -name "*.tar" -exec tar -xvf "{}" ";"


Sunday, December 8, 2013

Valve joins Linux Foundation


Valve's Gabe Newell and Linus Torvalds on Linux and Gaming

Valve has decided to support the Linux community by joining The Linux Foundation. In this short movie, we catch Valve's Gabe Newell discussing the part Linux is playing in the organization's advancement system, and Linus Torvalds discusses the benefits of this for Linux and the Linux desktop in general.


Saturday, December 7, 2013

Gimp tutorials (+60 videos)


Gimp tutorials (+60 videos)

Gimp is a GNU Image Manipulation Program, It is well known in Linux, Unix systems.
It is a good replacement for Adobe Photoshop, and It can be a biggest competitor too.
Free and open source software is a simple way to go.

60+ GIMP Video Tutorials here


Wednesday, December 4, 2013

Elementary Os distribution


Elementary Os distribution

Elementary Os distribution

Elementary OS is an Ubuntu-based desktop distribution. Some of its fascinating features include a new GTK+ and icon theme for GNOME, the Midori web browser, new applications developed in-house (e.g. Dexter, an address book and Postler, an email client), and Nautilus Elementary, a simple file manager.

Linux Distro Elementary OS has a custom Desktop, Window Manager, as well as several custom applications to match the OS style.

It is faster and very lightweight distro, that some Lxde users have switched to it, however It still rely on Ubuntu repo.

Based onUbuntu 12.04
DesktopPantheon 1.303

Official website : http://elementaryos.org

Some Pictures of Elementary Os Desktop


Tuesday, December 3, 2013

play music using vlc without gui


play music using vlc without gui

play music using vlc without gui

This topic post is dedicated to engaging lovers Terminal,
How to run the media by VLC through terminal (command line)
with ncurses you can do it .

vlc -I ncurses path


vlc -I ncurses ~/Music/*.mp3

There are many options such as raising one's voice by clicking on the 'a' right-or decrease the 'z'
To find out more options click on the 'h'


How To Make A Linux Distribution and Promote It


How To Make A Linux Distribution and Promote It

This short video can show you how to make your own Linux Distribution and how to promote it or  how to built your Software Project as well as how to design your website, get more users, fans, and supporters.


Saturday, November 23, 2013

How to Use X windows


How to Use X windows

The X Window system, make the use of graphical components: X draws the screen, draws objects on the screen, and tracks user input actions such as keyboard input and mouse operations.

For more details :


Wednesday, November 20, 2013

Linux : how to mount Usb flash drive from command line


Linux : how to mount usb flash drive from command line

It's easy to mount a Usb flash drive in Linux from te bash by typing three Linux commands, I'm sure you will find others do it differently than me (using parameters).

Here, I will show you the simple method to do it (without using any parameters).

First, you need to know the device name (sdb*) after you plugged in the Usb flash drive by typing this command (It needs root permission)

sudo fdisk -l

The results will be :

sudo fdisk -l
sudo fdisk -l
The device name here is sdb1. sda1 sda2 ... are partitions of the hard drive.

Now, we need to create a Folder (we will use it later)

sudo mkdir /media/usb

We can mount it now in that folder we created

sudo mount /dev/sdb1 /media/usb

The content of the usb flash drive will be in this path /media/usb.
Before you reject it, you need to unmount it first by this command

sudo umount /dev/sdb1

In case, you want to mount it again, you don't need to create that folder again, because It is there.


Basic Linux commands


Basic Linux commands

Almost These Linux commands are basics except those which relate to package manager, we all know that they differs, Ubuntu, Mint ... use Apt, Arch uses Pacman ...

Here are some Basic Linux commands :

Display Linux distributor's ID
lsb_release -is

Display Linux release number
lsb_release -rs

Display Linux code name
lsb_release -cs

Display machine hardware name
uname -m

List all PCI devices, such as display card and ethernet card.

Reclaim memory which stores pagecache, dentries and inodes
echo 3 > /proc/sys/vm/drop_caches

Display a list of modules in the Linux Kernel

List USB devices
lsusb -v

Display the status of ethernet card
sudo ethtool eth0

List hardware
sudo lshw

List harddisk partitions
sudo fdisk -l

Display SATA harddisk parameters
sudo hdparm -I /dev/sda

Display disk space usage
df -h

Display file/folder space usage

Display amount of free and used memory

Display processes
ps -e

Display a tree of processes

Display processes dynamically

Terminate a process with a given process id
sudo kill -9 PROCESS_ID

Terminate all processes with a given name
sudo killall PROCESS_NAME

List files which are opened by a given process
lsof -p PROCESS_ID

List processes which opened a given file

List processes which are using port 80
lsof -i :80

Configure an ADSL connection
sudo pppoeconf

Starts up ADSL connections
sudo pon

Shuts down ADSL connections
sudo poff

Display MAC of a given IP address

Display NetBIOS name of a given IP address
nmblookup -A IP_ADDRESS

Display IP address and MAC
ifconfig -a

Display route
netstat -rn

Set MAC of ethernet interface
sudo ifconfig eth0 hw ether 00:11:22:33:44:55

Display information of a domain name
whois example.com

Display the network path to a given host
tracepath example.com

Request an IP address from DHCP server
sudo dhclient

Temporarily restart an init script
sudo /etc/init.d/SCRIPT_NAME restart
Temporarily stop an init script
sudo /etc/init.d/SCRIPT_NAME stop

Add a user
sudo adduser USER_NANE
Delete a user
sudo deluser USER_NAME

Change user password
sudo passwd USER_NAME

Changes user fullname, office number, office extension, and home phone number information.
sudo chfn USER_NAME

Display user information
finger USER_NAME

Temporarily prevent a user from logging in
sudo usermod -L USER_NAME

Revoke the operation above
sudo usermod -U USER_NAME

Add a user to admin group
sudo usermod -G admin -a USER_NAME

Set the HTTP proxy
export http_proxy=http://PROXY.DOMAIN.NAME:PORT

Modify the information displayed after logging in
sudo vim /etc/motd.tail

Choose the input method for X Window
im-switch -c

Convert the file name from GBK to UTF8
convmv -r -f gbk -t utf8 --notest FILE_NAME

Convert the file content from GBK to UTF8
iconv -f gbk -t utf8 FILE_NAME

Convert tags in '*.mp3' from GBK to UTF8
find . -name '*.mp3' -execdir mid3iconv -e GBK {} \;

Read a long file

Print lines matching a pattern

Display a list of file name. The files contain a given string.

Display all '.txt' file
find . -name '*.txt'

Create two empty files
touch file_name_1 file_name_2

Create directory. Create parent directories as needed.
mkdir -p /tmp/a/b/c/d/e

Change working directory to the home folder

Change working directory to the previous working directory
cd -

Display hidden files
ls -a

Copy directory. Preserve links, file mode, ownership, timestamps.

Determine file type

Output the last 6 lines
tail -n 6 FILE_NAME

Copy files via SSH

Rename '*.rm' files to '*.rmvb' files
rename 's/.rm$/.rmvb/' *

Change the file name to lowercase
rename 'tr/A-Z/a-z/' *

Display subdirectories in current directory
ls -d */.

Display file number in current directory
ls . | wc -w

Extract "*.gz" file
gunzip FILE_NAME.gz

Extract "*.tar.gz" file
tar zxf FILE_NAME.tar.gz

Extract "*.tar.bz2" file
tar jxf FILE_NAME.tar.bz2

Do compression
tar czf FILE_NAME.tar.gz FILE1 FILE2 FILE3
tar cjf FILE_NAME.tar.bz2 FILE1 FILE2 FILE3

Displays a calendar

Set the date and time via NTP
sudo ntpdate ntp.ubuntu.com

Poweroff your computer
sudo halt
sudo shutdown -h now

Poweroff your computer in 23:00
sudo shutdown -h 23:00

Poweroff your computer after 60 minutes
sudo shutdown -h +60

Reboot your computer
sudo reboot
sudo shutdown -r now

If you want some program to start up automatically, please put '.desktop' files into '$HOME/.config/autostart'

You can configure "preferred applications" by this file "$HOME/.local/share/applications/mimeapps.list"

Continuously monitor the memory usage
watch -d free

Display HTTP HEAD response
w3m -dump_head http://example.com

Display file content with line number

Eliminate Rootkit
sudo rkhunter --checkall

Change hostname
sudo hostname new_name

"Tasksel" group software packages into "task"s. You can select a "task" and then install all necessary software packages. It is easy to set up LAMP servers or cloud computing servers.

Show all tasks
tasksel --list

Display the extended description of a task
tasksel --task-desc lamp-server

List the packages which are parts of a task
tasksel --task-packages lamp-server

Install/remove a task
gksudo tasksel

Change Process priority
example: renice 5  `pgrep firefox`  
         renice -5 `pgrep wine-server`    
               high <------------------> low
NEW_PRIORITY = -19, -18, -17 [...] 18, 19, 20

Clear Bash history
history -c

If you want to use colorful "ls", that is, use colors to distinguish types of files, you can add these lines in $HOME/.bashrc:

if [ "$TERM" != "dumb" ]; then
    eval "`dircolors -b`"
    alias ls='ls --color=auto'

$HOME/.thumbnails/ directory is a cache dir GNOME makes when you browse through your folders in nautilus.
It contains thumbnail pictures of picture files you've previously looked at.

You can get its total size by
du -bs $HOME/.thumbnails/

You can delete the files in the .thumbnails directory that haven't been accessed for seven days, to free disk space.
find $HOME/.thumbnails/ -type f -atime +7 -exec rm {} \;

Capture screen after 10 seconds
gnome-screenshot -d 10
Capture current window after 10 seconds
gnome-screenshot -wd 10

Start GConf editor:
Press Alt+F2, type 'gconf-editor'.

Set apt source
sudo software-properties-gtk
sudo software-properties-kde

Display the packages which are not installed but have remained residual config
dpkg -l | awk '/^rc/ {print $2}'

Add a PPA repository:
sudo add-apt-repository ppa:PPA-REPOSITORY-NAME

Display a list of files. The files are installed from a given package.

Display a list of packages. The packages installed a given file.

Display a list of packages. The name of packages matches given regex pattern.
apt-cache search REG_EXPRESSION

Display a list of packages. The packages provide a given file.
apt-file search FILE_NAME

Display a list of packages. The given package depends on the list of packages.
apt-cache depends PACKAGE_NAME

Display a list of packages. These packages depend on the given package.
apt-cache rdepends PACKAGE_NAME

Prompt for a disk to be inserted and then add the disc to the source list.
sudo apt-cdrom add

Install the newest versions of all packages currently installed on the system.
sudo apt-get upgrade

Delete residual package configuration files.
dpkg -l | grep ^rc | awk '{print $2}' | sudo xargs dpkg -P

Automatically install necessary files for './configure ; make ; make install'
sudo auto-apt run ./configure

Save the list of packages currently installed on your system.
dpkg --get-selections | grep -v deinstall > SOME_FILE
Then use the file to restore packages.
dpkg --set-selections < SOME_FILE ; sudo dselect

After running "sudo apt-get install", "*.deb" files are stored in "/var/cache/apt/archives"
You can clean this directory by:
sudo apt-get clean

Display URL for a given package
apt-get -qq --print-uris install PACKAGE_NAME

Display some statistics about the apt cache
apt-cache stats

Display all package name
apt-cache pkgnames

Display some information of a given package
apt-cache show PACKAGE_NAME


Sunday, November 17, 2013

Valve announces SteamOS which is Linux-based, free and coming soon


Valve announces SteamOS which is Linux-based, free and coming soon

Valve has announced a new operating system based on Linux called SteamOS. It is said to run on any living room hardware.

"As we’ve been working on bringing Steam to the living room, we’ve come to the conclusion that the
environment best suited to delivering value to customers is an operating system built around Steam itself.
SteamOS combines the rock-solid architecture of Linux with a gaming experience built for the big screen.
It will be available soon as a free stand-alone operating system for living room machines."


Rekonq's new release


Rekonq's new release

Rekonq's new release

Rekonq is a web browser for KDE based on webkit focusing on being “light” and “fast”


Saturday, November 16, 2013

Try Windows 3.1 online


Try Windows 3.1 online

We saw these days different websites that offers trying some Linux interfaces (Unity,Gnome shell …). This time we can try something different, what about Windows ?
Yes Windows, but the old one :D : Windows 3.1.
You can try it by clicking Here
The emulator is Created by Michael Vincent


Linus Torvalds Admits He’s Been Asked To Insert Backdoor Into Linux


Linus Torvalds Admits He’s Been Asked To Insert Backdoor Into Linux

Linus Torvalds was asked many questions at the conference in New Orleans with many Kernel developers. One question he was asked was whether a government agency had ever asked about inserting a back-door into Linux.
Torvalds responded ‘no’ while shaking his head ‘yes,’ as the audience broke into spontaneous laughter.Torvalds also admitted that while he as a full life outside of Linux he couldn’t imagine his life without it. ‘I don’t see any project coming along being more interesting to me than Linux,’ Torvalds said. ‘I couldn’t imagine filling the void in my life if I didn’t have Linux.’”