Showing posts with label Terminal. Show all posts
Showing posts with label Terminal. Show all posts

Wednesday 23 January 2013

All You Need To Know About Linux Commands



System Info


date – Show the current date and time
cal – Show this month's calendar
uptime – Show current uptime
w – Display who is online
whoami – Who you are logged in as
finger user – Display information about user
uname -a – Show kernel information
cat /proc/cpuinfo – CPU information
cat /proc/meminfo – Memory information
df – Show disk usage
du – Show directory space usage
free – Show memory and swap usage

Keyboard Shortcuts

Enter – Run the command
Up Arrow – Show the previous command
Ctrl + R – Allows you to type a part of the command you're looking for and finds it
Ctrl + Z – Stops the current command, resume with fg in the foreground or bg in the background
Ctrl + C – Halts the current command, cancel the current operation and/or start with a fresh new line
Ctrl + L – Clear the screen

command | less – Allows the scrolling of the bash command window using Shift + Up Arrow and Shift + Down Arrow
!! – Repeats the last command
command  !$ – Repeats the last argument of the previous command
Esc + . (a period) – Insert the last argument of the previous command on the fly, which enables you to edit it before executing the command

Ctrl + A – Return to the start of the command you're typing
Ctrl + E – Go to the end of the command you're typing
Ctrl + U – Cut everything before the cursor to a special clipboard, erases the whole line
Ctrl + K – Cut everything after the cursor to a special clipboard
Ctrl + Y – Paste from the special clipboard that Ctrl + U and Ctrl + K save their data to
Ctrl + T – Swap the two characters before the cursor (you can actually use this to transport a character from the left to the right, try it!)
Ctrl + W – Delete the word / argument left of the cursor in the current line
Ctrl + D – Log out of current session, similar to exit

Learn the Commands

apropos subject – List manual pages for subject
man -k keyword – Display man pages containing keyword
man command – Show the manual for command
man -t man | ps2pdf - > man.pdf  – Make a pdf of a manual page
which command – Show full path name of command
time command – See how long a command takes

whereis app – Show possible locations of app
which app – Show which app will be run by default; it shows the full path

Searching

grep pattern files – Search for pattern in files
grep -r pattern dir – Search recursively for pattern in dir
command | grep pattern – Search for pattern in the output of command
locate file – Find all instances of file
find / -name filename – Starting with the root directory, look for the file called filename
find / -name ”*filename*” – Starting with the root directory, look for the file containing the string 

filename

locate filename – Find a file called filename using the locate command; this assumes you have already used the command updatedb (see next)
updatedb – Create or update the database of files on all file systems attached to the Linux root directory
which filename – Show the subdirectory containing the executable file  called filename
grep TextStringToFind /dir – Starting with the directory called dir, look for and list all files containing TextStringToFind

File Permissions

chmod octal file – Change the permissions of file to octal, which can be found separately for user, group, and world by adding: 4 – read (r), 2 – write (w), 1 – execute (x)
Examples:
chmod 777 – read, write, execute for all
chmod 755 – rwx for owner, rx for group and world
For more options, see man chmod.

File Commands

ls – Directory listing
ls -l – List files in current directory using long format
ls -laC – List all files in current directory in long format and display in columns
ls -F – List files in current directory and indicate the file type
ls -al – Formatted listing with hidden files
cd dir – Change directory to dir
cd – Change to home
mkdir dir – Create a directory dir
pwd – Show current directory

rm name – Remove a file or directory called name
rm -r dir – Delete directory dir
rm -f file – Force remove file
rm -rf dir – Force remove an entire directory dir and all it’s included files and subdirectories (use with extreme caution)

cp file1 file2 – Copy file1 to file2
cp -r dir1 dir2 – Copy dir1 to dir2; create dir2 if it doesn't exist
cp file /home/dirname – Copy the file called filename to the /home/dirname directory

mv file /home/dirname – Move the file called filename to the /home/dirname directory
mv file1 file2 – Rename or move file1 to file2; if file2 is an existing directory, moves file1 into directory file2

ln -s file link – Create symbolic link link to file
touch file – Create or update file
cat > file – Places standard input into file
cat file – Display the file called file

more file – Display the file called file one page at a time, proceed to next page using the spacebar
head file – Output the first 10 lines of file
head -20 file – Display the first 20 lines of the file called file
tail file – Output the last 10 lines of file
tail -20 file – Display the last 20 lines of the file called file
tail -f file – Output the contents of file as it grows, starting with the last 10 lines

Compression

tar cf file.tar files – Create a tar named file.tar containing files
tar xf file.tar – Extract the files from file.tar
tar czf file.tar.gz files – Create a tar with Gzip compression
tar xzf file.tar.gz – Extract a tar using Gzip
tar cjf file.tar.bz2 – Create a tar with Bzip2 compression
tar xjf file.tar.bz2 – Extract a tar using Bzip2
gzip file – Compresses file and renames it to file.gz
gzip -d file.gz – Decompresses file.gz back to file

Printing

/etc/rc.d/init.d/lpd start – Start the print daemon
/etc/rc.d/init.d/lpd stop – Stop the print daemon
/etc/rc.d/init.d/lpd status – Display status of the print daemon
lpq – Display jobs in print queue
lprm – Remove jobs from queue
lpr – Print a file
lpc – Printer control tool
man subject | lpr – Print the manual page called subject as plain text
man -t subject | lpr – Print the manual page called subject as Postscript output
printtool – Start X printer setup interface

Network

ifconfig – List IP addresses for all devices on the local machine
ping host – Ping host and output results
whois domain – Get whois information for domain
dig domain – Get DNS information for domain
dig -x host – Reverse lookup host
wget file – Download file
wget -c file – Continue a stopped download

SSH

ssh user@host – Connect to host as user
ssh -p port user@host – Connect to host on port port as user
ssh-copy-id user@host – Add your key to host for user to enable a keyed or passwordless login

User Administration

adduser accountname – Create a new user call accountname
passwd accountname – Give accountname a new password
su – Log in as superuser from current login
exit – Stop being superuser and revert to normal user

Process Management

ps – Display your currently active processes
top – Display all running processes
kill pid – Kill process id pid
killall proc – Kill all processes named proc (use with extreme caution)
bg – Lists stopped or background jobs; resume a stopped job in the background
fg – Brings the most recent job to foreground
fg n – Brings job n to the foreground

Installation from source

./configure
make
make install
dpkg -i pkg.deb – install a DEB package (Debian / Ubuntu / Linux Mint)
rpm -Uvh pkg.rpm – install a RPM package (Red Hat / Fedora)

Stopping & Starting

shutdown -h now – Shutdown the system now and do not reboot
halt – Stop all processes - same as above
shutdown -r 5 – Shutdown the system in 5 minutes and reboot
shutdown -r now – Shutdown the system now and reboot
reboot – Stop all processes and then reboot - same as above
startx – Start the X system



Recommended reading:

Cheat-Sheets.org – All cheat sheets, round-ups, quick reference cards, quick reference guides and quick reference sheets in one page. The only one you need.

Tutorial: The best tips & tricks for bash, explained – Linux Tutorial Blog / Quality Linux tutorials without clutter

LinuxCommand.org – Learning the shell, Writing shell scripts, Script library, SuperMan pages, Who, What, Where, Why

LinuxManPages.com – General commands, System calls, Subroutines, Special files, File formats, Games, Macros and conventions, Maintenence commands, Most Popular Man Pages

Linux Newbie Guide: Shorcuts and Commands - Linux essential shortcuts and sanity commands; Common Linux commands - system info; Basic operations, network apps, file (de)compression; Process control; Basic administration commands, accessing drives/partitions; Network administration tools, music-related commands, graphics-related commands.


Thursday 13 December 2012

VMware on Linux : Running in Permiscuous Mode


 VMware on Linux: Promiscuous Mode

When VMware Workstation is hosted under Linux, by default it doesn't allow VM Guests to access the network in Promiscuous mode.  There's an easy fix for this...

If you run something like Wireshark from a VM Guest, you'll see VMware display an error message.

The problem lies with the permissions on the Host.  When VMware is started without root privileges, it doesn't have the permissions necessary to access the /dev/vmnet0 device.

A quick temporary bodge is to use chgrp and chmod on the Host, to tweak the permissions on /dev/vmnet* until the next reboot (where yourgroup is a group that your user account is in - typically admin on my Ubuntu machines):
   chgrp yourgroup /dev/vmnet*
   chmod g+rw /dev/vmnet*

A more permanent fix is to edit /etc/init.d/vmware on the Host, and tweak the ownership and permissions when the device is created, by adding the lines in red:
  # Start the virtual ethernet kernel service
   vmwareStartVmnet() {
      vmwareLoadModule $vnet
      "$BINDIR"/vmware-networks --start >> $VNETLIB_LOG 2>&1
      chgrp yourgroup  /dev/vmnet*
      chmod g+rw /dev/vmnet*

After you restart the Host's VMware daemon ...

   /etc/init.d/vmware stop
   /etc/init.d/vmware start

you'll be able to boot your Guest VM, and use Wireshark or whatever in the Guest.  Just Remember!   Your VM Guest's Network Adapter must be set to BRIDGED (connected directly to the physical network), not NAT (used to share the host's IP address).

Aside: I did think it ought be possible to achieve the same effect a little more cleanly, by creating a file in /etc/udev/rules.d to set the desired ownership and permission modes for /dev/vmnet*.  But nothing I've tried has worked.  Anyone?

Monday 12 November 2012

How to format USB drive using Linux terminal ..

How to format USB with Linux terminal ..  

[ Formatting a USB in Ubuntu or linux is as easy as make filesystem (mkfs).
mkfs and tab will show you all the filesystem types you can use:

[anc@localhost~]$ mkfs
mkfs mkfs.ext3 mkfs.jfs mkfs.ntfs mkfs.vfat
mkfs.cramfs mkfs.ext4 mkfs.minix mkfs.reiserfs mkfs.xfs
mkfs.ext2 mkfs.ext4dev mkfs.msdos mkfs.udffs


To format a USB drive all you need to know is its name, this can be found by
typing df at a terminal:

[anc@localhost~]$ df -hT
Filesystem Type Size Used Avail Use% Mounted on
--snip
/dev/sdc1 ext3 3.6G 3.3G 134M 97% /media/disk



In the above example my USB is sdc1 and is a 4G USB stick. As you can see
I changed it from NTFS to ext3.

FAT32 and NTFS are weak filesystems, not only are they prone to losing data but also
require constant defragging. Most linux filesystems (except ext2) are journalled. Thye never require defragging and have better security- the disadvantage is that if you format a USB memory stick as ext3 it cant be read under windows.

To answer your earlier question,

mkfs.vfat /dev/sdc1
mkfs.ntfs /dev/sdc1


would make FAT32 and NTFS filesystems on a memory stick called sdc1

Hope that helps. ]


[ This is another posting showing "how to do computing" for everyday computer usages... For a general public ]

Thursday 30 August 2012

Learn how to build a desktop computer or PC

Learn how to build your own computer or PC.  Allows you to customize to meet your exact needs!  Sorry the quality is a little bit crappy.

Parts...
Cooler Master Elite 310 Case
Asus P5Q SE Plus motherboard
Intel Quad core Q8200 2.33 GHZ 4 MB cache 1333 MHZ FSB
Kingston PC8500 2 GB RAM 1066 MHZ
XFX GeForce 9800 GT 512MB GDDR3
Samsung 500 GB SATA HD 7200 RPM 16 MB buffer
Antec 500 W power supply
Samsung 22x SATA dual layer DVD burner
2x Antec 120mm ball bearing multiple speed fans

Music by:  incompetech.com
Song: Deliberate Thought
For use under Creative Commons license 3.0


Thursday 19 July 2012

How to solve the Lampp Linux install Error on a 64bit Architecture

Xampp to Linux error –

XAMPP is currently only availably as 32 bit application.  Please use a 32 bit compatibility library for your system. 




ERROR If your are running XAMPP in a Ubuntu 64 bits, and found the following error: XAMPP is currently only availably as 32 bit application. Please use a 32 bit compatibility library for your system. 



You must go to Sypnatic package manager, in the search field, insert: ia32-libs and install that package. 




here is Lampp running correctly but it presents another error, which you'll find the solution in another poster of mine here

 Source: Ubuntu Help

This is another posting showing "how to do computing" for everyday computer usages... For a general public 

How to install Wireless drivers on ubuntu 10.04

About a day ago my boss asked me to get a Linus distro ubuntu 10.04 to work, it happens that thid version is not coming with network drivers activated...

Here is how I worked out to get my WiFI drivers to work.. Later I post the solution to the Ethernet.  Let me remind you that sometimes, the setup can get mess up by some updates.

But sooner u know how to get it done, and do it once, then it becomes easier. The first thing you need to do, in order to update or install your wifi drivers is to find out what is your kernel version ....

You can do it by running this simple command in terminal ....

uname -r

............

Or something like this ....

A second way is to look at the /proc/version file. This can be easily accomplished by using the cat command (which is commonly used to read and concatenate files), i.e.,
cat /proc/version
A third way is to use the rpm (i.e., Red Hat package manager) command with its -q (i.e., query) option and use the word kernel as an argument (i.e., input data) as follows:
rpm -q kernel

 ....


The download the drives from here a trusted source, for me it happens to be this one .. Realtek Drivers .... {The drivers are to my kernel type yours might be different }..

Download them into your computer, and then that what you have to do..

1 - unzip it into your /tmp folder .. with this command ..

 sudo tar -zxvf name_of_the_package.tar.gz


Then ..

root@hostdevelop:/# ls
bin    etc             lib         mnt   sbin     tmp      vmlinuz.old
boot   home            lib64       opt   selinux  usr
cdrom  initrd.img      lost+found  proc  srv      var
dev    initrd.img.old  media       root  sys      vmlinuz
root@hostdevelop:/# cd ./tmp
root@hostdevelop:/tmp# ls
keyring-r6S9ei      pulse-PKdhtXMmr18n
orbit-gdm           rtl8192ce_linux_2.6.0006.0321.2011.tar.gz
orbit-hostdevelop   ssh-NlCyNr1469
pulse-m5lvqUFNxjXA  virtual-hostdevelop.SxNVar
root@hostdevelop:/tmp# tar -zxvf rtl8192ce_linux_2.6.0006.0321.2011.tar.gz
rtl8192ce_linux_2.6.0006.0321.2011/
rtl8192ce_linux_2.6.0006.0321.2011/firmware/
rtl8192ce_linux_2.6.0006.0321.2011/firmware/RTL8192CE/
rtl8192ce_linux_2.6.0006.0321.2011/firmware/RTL8192CE/Realtek-Firmware-License.txt
rtl8192ce_linux_2.6.0006.0321.2011/firmware/RTL8192CE/rtl8192cfwT.bin
rtl8192ce_linux_2.6.0006.0321.2011/firmware/RTL8192CE/rtl8192cfw_test.bin
rtl8192ce_linux_2.6.0006.0321.2011/HAL/
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/Makefile
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl8192c/
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl8192c/Makefile
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl8192c/r8192C_com.c
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl8192c/r8192C_com.h
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl8192c/r8192C_def.h
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl8192c/r8192C_dev.c
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl8192c/r8192C_dev.h
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl8192c/r8192C_dm.c
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl8192c/r8192C_dm.h
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl8192c/r8192C_dmbt.c
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl8192c/r8192C_dmbt.h
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl8192c/r8192C_dmout.c
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl8192c/r8192C_dmout.h
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl8192c/r8192C_Efuse.c
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl8192c/r8192C_Efuse.h
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl8192c/r8192C_firmware.c
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl8192c/r8192C_firmware.h
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl8192c/r8192C_hw.h
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl8192c/r8192C_hwimg.c
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl8192c/r8192C_hwimg.h
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl8192c/r8192C_inc.h
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl8192c/r8192C_led.c
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl8192c/r8192C_led.h
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl8192c/r8192C_phy.c
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl8192c/r8192C_phy.h
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl8192c/r8192C_PhyParam.c
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl8192c/r8192C_PhyParam.h
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl8192c/r8192C_phyreg.h
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl8192c/r8192C_rtl6052.c
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl8192c/r8192C_rtl6052.h
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl8192c/r8192C_rx.c
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl8192c/r8192C_rx.h
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl8192c/r8192C_tx.c
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl8192c/r8192C_tx.h
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl_cam.c
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl_cam.h
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl_core.c
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl_core.h
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl_debug.c
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl_debug.h
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl_dm.c
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl_dm.h
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl_eeprom.c
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl_eeprom.h
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl_ethtool.c
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl_mesh.c
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl_mesh.h
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl_pci.c
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl_pci.h
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl_platformdef.h
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl_pm.c
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl_pm.h
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl_ps.c
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl_ps.h
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl_regd.c
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl_regd.h
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl_rfkill.c
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl_rfkill.h
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl_softap.c
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl_softap.h
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl_wx.c
rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl_wx.h
rtl8192ce_linux_2.6.0006.0321.2011/Makefile
rtl8192ce_linux_2.6.0006.0321.2011/readme.txt
rtl8192ce_linux_2.6.0006.0321.2011/realtek/
rtl8192ce_linux_2.6.0006.0321.2011/realtek/RadioPower.sh
rtl8192ce_linux_2.6.0006.0321.2011/realtek/wireless-rtl-ac-dc-power.sh
rtl8192ce_linux_2.6.0006.0321.2011/release_note
rtl8192ce_linux_2.6.0006.0321.2011/rtllib/
rtl8192ce_linux_2.6.0006.0321.2011/rtllib/aes.c
rtl8192ce_linux_2.6.0006.0321.2011/rtllib/api.c
rtl8192ce_linux_2.6.0006.0321.2011/rtllib/arc4.c
rtl8192ce_linux_2.6.0006.0321.2011/rtllib/autoload.c
rtl8192ce_linux_2.6.0006.0321.2011/rtllib/cipher.c
rtl8192ce_linux_2.6.0006.0321.2011/rtllib/compress.c
rtl8192ce_linux_2.6.0006.0321.2011/rtllib/crypto_compat.h
rtl8192ce_linux_2.6.0006.0321.2011/rtllib/digest.c
rtl8192ce_linux_2.6.0006.0321.2011/rtllib/dot11d.c
rtl8192ce_linux_2.6.0006.0321.2011/rtllib/dot11d.h
rtl8192ce_linux_2.6.0006.0321.2011/rtllib/internal.h
rtl8192ce_linux_2.6.0006.0321.2011/rtllib/kmap_types.h
rtl8192ce_linux_2.6.0006.0321.2011/rtllib/license
rtl8192ce_linux_2.6.0006.0321.2011/rtllib/Makefile
rtl8192ce_linux_2.6.0006.0321.2011/rtllib/michael_mic.c
rtl8192ce_linux_2.6.0006.0321.2011/rtllib/proc.c
rtl8192ce_linux_2.6.0006.0321.2011/rtllib/rtl819x_BA.h
rtl8192ce_linux_2.6.0006.0321.2011/rtllib/rtl819x_BAProc.c
rtl8192ce_linux_2.6.0006.0321.2011/rtllib/rtl819x_HT.h
rtl8192ce_linux_2.6.0006.0321.2011/rtllib/rtl819x_HTProc.c
rtl8192ce_linux_2.6.0006.0321.2011/rtllib/rtl819x_Qos.h
rtl8192ce_linux_2.6.0006.0321.2011/rtllib/rtl819x_TS.h
rtl8192ce_linux_2.6.0006.0321.2011/rtllib/rtl819x_TSProc.c
rtl8192ce_linux_2.6.0006.0321.2011/rtllib/rtllib.h
rtl8192ce_linux_2.6.0006.0321.2011/rtllib/rtllib_crypt.c
rtl8192ce_linux_2.6.0006.0321.2011/rtllib/rtllib_crypt.h
rtl8192ce_linux_2.6.0006.0321.2011/rtllib/rtllib_crypt_ccmp.c
rtl8192ce_linux_2.6.0006.0321.2011/rtllib/rtllib_crypt_tkip.c
rtl8192ce_linux_2.6.0006.0321.2011/rtllib/rtllib_crypt_wep.c
rtl8192ce_linux_2.6.0006.0321.2011/rtllib/rtllib_endianfree.h
rtl8192ce_linux_2.6.0006.0321.2011/rtllib/rtllib_module.c
rtl8192ce_linux_2.6.0006.0321.2011/rtllib/rtllib_rx.c
rtl8192ce_linux_2.6.0006.0321.2011/rtllib/rtllib_softmac.c
rtl8192ce_linux_2.6.0006.0321.2011/rtllib/rtllib_softmac_wx.c
rtl8192ce_linux_2.6.0006.0321.2011/rtllib/rtllib_tx.c
rtl8192ce_linux_2.6.0006.0321.2011/rtllib/rtllib_wx.c
rtl8192ce_linux_2.6.0006.0321.2011/rtllib/rtl_crypto.h
rtl8192ce_linux_2.6.0006.0321.2011/rtllib/scatterwalk.c
rtl8192ce_linux_2.6.0006.0321.2011/rtllib/scatterwalk.h
rtl8192ce_linux_2.6.0006.0321.2011/rtllib/wapi.c
rtl8192ce_linux_2.6.0006.0321.2011/rtllib/wapi.h
rtl8192ce_linux_2.6.0006.0321.2011/rtllib/wapi_interface.c
rtl8192ce_linux_2.6.0006.0321.2011/rtllib/wapi_interface.h
rtl8192ce_linux_2.6.0006.0321.2011/runwpa
rtl8192ce_linux_2.6.0006.0321.2011/wpa1.conf
rtl8192ce_linux_2.6.0006.0321.2011/wpa_supplicant-0.6.9.tar.gz
root@hostdevelop:/tmp# ls
keyring-r6S9ei      rtl8192ce_linux_2.6.0006.0321.2011
orbit-gdm           rtl8192ce_linux_2.6.0006.0321.2011.tar.gz
orbit-hostdevelop   ssh-NlCyNr1469
pulse-m5lvqUFNxjXA  virtual-hostdevelop.SxNVar
pulse-PKdhtXMmr18n
root@hostdevelop:/tmp# cd ./rtl8192ce_linux_2.6.0006.0321.2011
root@hostdevelop:/tmp/rtl8192ce_linux_2.6.0006.0321.2011# ls
firmware  Makefile    realtek       rtllib  wpa1.conf
HAL       readme.txt  release_note  runwpa  wpa_supplicant-0.6.9.tar.gz
root@hostdevelop:/tmp/rtl8192ce_linux_2.6.0006.0321.2011# make
make[1]: Entering directory `/usr/src/linux-headers-2.6.32-41-generic'
  CC [M]  /tmp/rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl_core.o
  CC [M]  /tmp/rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl_eeprom.o
  CC [M]  /tmp/rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl_wx.o
  CC [M]  /tmp/rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl_cam.o
  CC [M]  /tmp/rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl_pm.o
  CC [M]  /tmp/rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl_pci.o
  CC [M]  /tmp/rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl_ps.o
  CC [M]  /tmp/rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl_debug.o
  CC [M]  /tmp/rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl_ethtool.o
  CC [M]  /tmp/rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl_regd.o
  CC [M]  /tmp/rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl8192c/r8192C_dev.o
  CC [M]  /tmp/rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl8192c/r8192C_tx.o
  CC [M]  /tmp/rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl8192c/r8192C_rx.o
  CC [M]  /tmp/rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl8192c/r8192C_Efuse.o
  CC [M]  /tmp/rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl8192c/r8192C_phy.o
  CC [M]  /tmp/rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl8192c/r8192C_firmware.o
  CC [M]  /tmp/rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl8192c/r8192C_dmbt.o
  CC [M]  /tmp/rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl8192c/r8192C_dmout.o
  CC [M]  /tmp/rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl8192c/r8192C_dm.o
  CC [M]  /tmp/rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl8192c/r8192C_rtl6052.o
  CC [M]  /tmp/rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl8192c/r8192C_hwimg.o
  CC [M]  /tmp/rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl8192c/r8192C_led.o
  CC [M]  /tmp/rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/rtl8192c/r8192C_com.o
  CC [M]  /tmp/rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/../../rtllib/rtllib_rx.o
/tmp/rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/../../rtllib/rtllib_rx.c: In function ‘rtllib_FlushRxTsPendingPkts’:
/tmp/rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/../../rtllib/rtllib_rx.c:1297: warning: the frame size of 1040 bytes is larger than 1024 bytes
/tmp/rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/../../rtllib/rtllib_rx.c: In function ‘RxReorderIndicatePacket’:
/tmp/rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/../../rtllib/rtllib_rx.c:1488: warning: the frame size of 1072 bytes is larger than 1024 bytes
  CC [M]  /tmp/rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/../../rtllib/rtllib_softmac.o
  CC [M]  /tmp/rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/../../rtllib/rtllib_tx.o
  CC [M]  /tmp/rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/../../rtllib/rtllib_wx.o
  CC [M]  /tmp/rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/../../rtllib/rtllib_module.o
  CC [M]  /tmp/rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/../../rtllib/rtllib_softmac_wx.o
  CC [M]  /tmp/rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/../../rtllib/rtl819x_HTProc.o
  CC [M]  /tmp/rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/../../rtllib/rtl819x_TSProc.o
/tmp/rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/../../rtllib/rtl819x_TSProc.c: In function ‘RxPktPendingTimeout’:
/tmp/rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/../../rtllib/rtl819x_TSProc.c:99: warning: the frame size of 1056 bytes is larger than 1024 bytes
  CC [M]  /tmp/rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/../../rtllib/rtl819x_BAProc.o
  CC [M]  /tmp/rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/../../rtllib/dot11d.o
  CC [M]  /tmp/rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/../../rtllib/rtllib_crypt.o
  CC [M]  /tmp/rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/../../rtllib/rtllib_crypt_tkip.o
  CC [M]  /tmp/rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/../../rtllib/rtllib_crypt_ccmp.o
  CC [M]  /tmp/rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/../../rtllib/rtllib_crypt_wep.o
  LD [M]  /tmp/rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/r8192ce_pci.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /tmp/rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/r8192ce_pci.mod.o
  LD [M]  /tmp/rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192/r8192ce_pci.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-41-generic'
root@hostdevelop:/tmp/rtl8192ce_linux_2.6.0006.0321.2011# make install
make[1]: Entering directory `/usr/src/linux-headers-2.6.32-41-generic'
  Building modules, stage 2.
  MODPOST 1 modules
make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-41-generic'
make[1]: Entering directory `/tmp/rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192'
make -C /lib/modules/2.6.32-41-generic/build M=/tmp/rtl8192ce_linux_2.6.0006.0321.2011 CC=gcc modules
make[2]: Entering directory `/usr/src/linux-headers-2.6.32-41-generic'
  Building modules, stage 2.
  MODPOST 0 modules
make[2]: Leaving directory `/usr/src/linux-headers-2.6.32-41-generic'
find /lib/modules/2.6.32-41-generic -name "r8192ce_*.ko" -exec ls -l {} \;
find /lib/modules/2.6.32-41-generic -name "r8192ce_*.ko" -exec rm {} \;
install -p -m 644 r8192ce_pci.ko /lib/modules/2.6.32-41-generic/kernel/drivers/net/wireless/
depmod -a
make[1]: Leaving directory `/tmp/rtl8192ce_linux_2.6.0006.0321.2011/HAL/rtl8192'
root@hostdevelop:/tmp/rtl8192ce_linux_2.6.0006.0321.2011# 






Then .. .. Restart your systems and your wireless should be working fine !!
Hope that this guide help you ..


Any feedback, comments and contribution is welcome ...


Thursday 7 June 2012

How to use FTP with Command Line (Command Prompt)

How to use FTP from the command line. 


 FTP (File Transfer Protocol) allows you to transfer files between your PC and other Internet systems (hosts). You can transfer files, work with local or remote directories, rename and display files, and execute system commands.

Before you start, you must know how to log on to the remote system and have a userid and password on that system. Note: Some systems allow anonymous ftp access. To use anonymous ftp, use anonymous as your userid and your e-mail address as the logon password. Logging Onto and Off of a Remote System To begin using Microsoft's FTP client, Open a command prompt and switch to the destination directory (where you want the download file).

To start an FTP session, enter: ftp host_name where hostname is the name or IP address of the remote system. You will then be asked to enter your userid and password.

Once you have successfully logged onto a remote system, you will be able to use ftp commands to view a listing of files on the remote system and transfer files between the two systems.


Example: Download i386.exe (Windows NT 3.5 Resource Kit) from ftp://ftp.microsoft.com/bussys/winnt/winnt-public/reskit/nt35/i386 to C:\Temp\Download
  1. Open a command prompt. Enter CD C:\Temp\Download (assuming that directory exists).
    Enter: ftp ftp.microsoft.com

    You should now see a prompt similar to this:
    Connected to ftp.microsoft.com.
    220 Microsoft FTP Service
    User (ftp.microsoft.com:(none)):


  2. For the userid, Enter: anonymous

    You should see a prompt similar to this:
    331 Anonymous access allowed, send identity (e-mail name) as password.
    Password:


  3. Enter: userid@domain.com as the password at the "Password:" prompt.
    Note: Any e-mail address in a userid@domain.com format should work. You will not be able to see the password as you type it.


  4. To download i386.exe from the bussys/winnt/winnt-public/reskit/nt35/i386 directory, Enter: get bussys/winnt/winnt-public/reskit/nt35/i386/i386.exe
    Note: You could have also used ls to view the directory and file names, cd bussys/winnt/winnt-public/reskit/nt35/i386 to switch directories, and get i386.exe to download the file from within that directory.


  5. To end the FTP session, Enter: quit or bye.
Note: Once you have extracted the resource kit, you will have to expand individual files 
example: expand choice.ex_ choice.exe



FTP Commands

For a list of FTP commands, at the "ftp>" prompt, Enter: helpWhen using ftp from the command prompt, the following list of supported commands will be displayed:
Note: Hover your mouse over a command to see what the output of "help *" is for that command.


!   

delete

literal

prompt

send

?   

debug

ls  

put 

status

append

dir

mdelete

pwd 

trace

ascii

disconnect

mdir

quit

type

bell

get 

mget

quote

user

binary

glob

mkdir

recv

verbose

bye 

hash

mls 

remotehelp

cd  

help

mput

rename

close

lcd 

open

rmdir


The question mark (?) command is equivalent to the help command. Typing help or ? followed by the name of a command will display a brief description of the command's purpose. The exclamation point (!) can be used to shell to the system (command) prompt. Type Exit to return to the FTP session.

You can also issue a subset of system commands to perform as you shell out, e.g., ! dir %windir% | more. When the commands in the shell have completed, you will be returned to the FTP session. The pwd command will list the current directory on the remote machine.

To change directories on the remote machine, use the cd command. To create a new directory on the remote machine, use the mkdir command followed by the name you would like to assign to the new directory. The lcd command can be used to change directories on the local (PC) machine.

To display a listing of files on the remote system, enter: ls or dir.



To download a file (copy a file from the remote system to your PC), you can use the command get or recv followed by the name of the file you would like to download. Optionally, you can follow the filename with a second filename which will be assigned to the file when it is downloaded to your PC.

To download multiple files, you can use the mget command followed by a descriptor for the files you would like to download (e.g.: *.f for all files ending in ".f" or *.* for all files).

You will be prompted to indicate whether you would like to download each file in turn. To turn off this prompting, enter the prompt command prior to entering the mget command; you will receive the message "Interactive mode OFF" indicating that prompting has been deactivated. By default, files are downloaded and uploaded in ASCII file transfer mode.

To download or upload files using Binary format mode, enter the command Binary at the "ftp>" prompt prior to downloading or uploading the file(s). To return to ASCII file transfer mode, enter the ASCII command. To upload a file (copy a file from your PC to the remote system), you can use the command put or send followed by the name of the file you would like to upload.

Optionally, you can follow the filename with a second filename which will be assigned to the file when it is uploaded to the remote system. The mput command can be used to upload multiple files.

You can use the close or disconnect command to drop the current ftp connection without exiting from the command enironment and then use the open command to connect to a new host.

How to Create a Ansible Lab on your Local Machine using Vagrant in 5 min using ChatGPT

This is an exciting experiment of mine as DevOps. As I am experimenting with the Tools available ... So, the quest is to " Vagrantfile ...