################################################################################## ##############################################################
###################################################################################
Oh well here are some commands and info that I find usefull with
working with my linux box..hope it helps..the ideas are in no particular order.
**Note:The signs " " are not part of the commands**
1.To find out the history of commands you typed in terminal type this in your terminal:
"cat .bash_history"
there should be a bunch of lines there..if you want to delete that info then type:
"rm .bash_history"
2.To find out Your external(internet) ip address..the following should help:
"wget -O - -q www.icanhazip.com" or "curl icanhazip.com"
***EDIT*** it seems the above website is down..but il leave the example above in case it comes back
up..in the mean time we can use this
"wget -O - -q www.findmyip.com | head -18 | tail -1"
3.Some people ask how to clear the screen of older commands that where typed..
well guess what..the command is :
"clear"
You can also press Ctrl+l that should also clear the screen
4.To list files in a directory the command is:
"ls"
now if you have lots of files in a directory they will all scroll by real fast...
so to have them scroll down page by page..I type the following:
"ls | more"
from there You can press ENTER to scroll down.
5.Some file and directory Commands
-To find out which directory Your in..command is:
"pwd"
-To change directory
"cd"
-To move file
"mv" thefile ">" where to move it
example to move a file called "money" to a folder called "wallet" we would type
mv money wallet
-To rename a file
"mv" thefilename newfilename
example to rename a file called MTN to UTL the command would be:
mv MTN UTL
that would change MTN to UTL..
6.Did You know you can play vlc from the command line?..maybe not..well You can
If for exapmle the directory Your in has a song called "Bend over.mp3"
then You can play it from the command line by typing vlc "Bend over.mp3"
or cvlc "Bend over.mp3"
7.Find out what linux issue You are running type command:
"cat /etc/issue"
Find out the kernel You are using type:
"uname -a"
8.Do you ever get tired of typing the same long command?
some thing like "cd /root/Downloads/mymusic/localmusic/bebecool/"
then the command "alias" is for you..in the above example we can do the following
" alias zz='cd /root/Downloads/mymusic/localmusic/bebecool' "
after that all we have to do is type zz and it will take us to that folder..
the alias command is one of my favourite linux commands..the format is
alias = ''
9.To find out connections to the internet + ports used and programs running:
"netstat -antp"
this will show you the established internet connections..help you know what program is taking
your bandwidth..this is useful if your using 3G modems and want to spare your cash..
10.This was written using nano..type in your terminal to find out what it is:
"nano"
without the quotes..
mikeepps@756@gmail.com
################################################################################
#######################################################
################################################################################
Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer
been learning some AWK
been learning some AWK scripting..so would like to add this for the tip up there concerning gettin external ip using wget
wget -O - -q www.findmyip.com | awk ' NR == 18 { print $0} '
to find out how important the commands after the | sign are..try running the command "wget -O - -q www.findmyip.com"
and see the output..
any questions or comments find at mikeepps756@gmail.com
Has any one found this
Has any one found this usefull?..or interesting..or is it french to some..