You are on page 1of 5

Area

Command

Description and/or Example Kills the process PIDnumber that we want to (it stops running) kill -HUP PIDnumbe does the same. Kill -STOP PIDnumber Stopis until a new command the NumberPID process. Kill -CONT PIDnumber Resumes the numberPID process that we stopped before. Kills processname. Lists the aplications that are now running with his PID(Process IDentifier). ps aux | more Pauses between screens. Very useful to get information to kill a running process. Shows the processes sorted by CPU use on real time, also free RAM and used SWAP. Kills on X-windows the process that we select by clicking it with the mouse. It's the same as kill but on graphical mode. Hotkey: Ctrl+Alt+ESC When you type ls you'll see color output but only if the output goes to screen (not a file) you could insert this line in ~/.bash_profile to always do it. Makes a disk image and saves it on diskimagename file. Saves the diskimagename file to a floppy disk. Shows free disk space. Shows the total size used by the files. Shows the directory size. Shows the current path. Edits the filename Ctrl+X Ctrl+S (save), Ctrl+X Ctrl+C (quit). Searches from directory the specified filename. A little bash script to loop on the files in a directory. Searches for a string on a file. cat file.txt | grep stringtolookfor Text editor.

daemons kill -9 PIDnumber

daemons killall processname

daemons ps aux

daemons top

daemons xkill

files

alias ls='ls --color=tty'

files files files files files files files files files files files

dd if=/dev/fd0 of=diskimagename dd if=diskimagename of=/dev/fd0 df du -c files du -s directory echo $PATH emacs filename find /directory -name 'filename' for x in $(ls /directory) do echo $x done grep joe filename

files

less fichero ln -s /mnt/cdrom/Mame/roms /usr/games/lib/xmame mke2fs /dev/hda2 more filename mount /dev/hda1 /mnt/c -t vfat pico filename rm -rf directory sed sed 's/stringA/StringB/' filename > newfilename sed 's/stringA/stringB/g' filename > newfilename tail -f filename tar -zcvf filename.tar.gz directory tar -zxvf filename.tar.gz wc filename whereis filename zip -r targetfilename directory zip -r zipfilenameyouwant.zip desiredirectoryname convert -resize 640x480 original.jpg modified.jpg mplayer videoyouwant.avi -vo aa

I'ts like a better more, allows to go up and down and doesn't load the all the entire file when you call it. Makes a soft link to the cdrom roms directory as if it was /usr/games/lib/xmame (xmame must not exist) Formats the second partition from the first hard disk using the Linux format (ext2). Shows filename on screen (it's lik: type | more on ms-dos) . Mounts fat32 partition. A basic text editor. Needs It's size in bytes is very low. Deletes the directory and all the files within. No confirmation requiered. Changes a string for another one on a file (used with pipes). Changes the first occurrence of stringA on filename for stringB and saves it in newfilename. Changes all the occurrence of stringA on filename for stringB and saves it in newfilename. Shows only the last lines of filename (good to follow on real-time log files). Compresses in tarball the directory and all subdirectories into filename.tar.gz Decompress filename.tar.gz Line count, word cound and byte count for the file. Finds filename and says where it is using the internal data base, that must be updated. updatedb updates it. Compress directory and all its folders on ficherodestino.zip Compresses using zip the desiredirectoryname and all the subdirectories. Converts image to 640x480 Plays the video on ascii art.

files files files files files files files files

files files files files files files files files image image

network /etc/network/interfaces network ifconfig network ncftp network netstat -lnp --ip

Edit this file to change IP on Debian Shows your IP also is used to configure your network card. An improved ftp client for console If you type it being root, will display current running daemons.

Copies the file vmlinux remote from the network scp root@192.168.0.201:/boot/vmlinux . host 192.168.201 via ssh to current directory. network wget -c --passive-ftp ftp://filename network wget -c http://filename network wget -rl 4 http://domainname sound system system system system system system system system system system system system system mpg123 -q /directory/*.mp3 & /sbin/hdparm -d 1 /dev/hda /sbin/hdparm -tT /dev/hda /sbin/hdparm /dev/hda bash bc chs dpkg -i package.deb if [ -x /path/to/dnetc ]; then echo "Starting Distributed.net Client..." /path/to/dnetc -quiet fi ksh last ltrace elfexecutable nohup scriptname & pdksh Downloads the file or continues the download using FTP passive mode. Downloads the requested filename or continues the download if the connection was lost. Downloads the website and all files on it until level 4 Plays in background from the shell the .mp3 music files allocated on the directory. Sets using_dma bit to 1 to enable UltraDMA access to disk. Performs a timing benchmark on device reads. Shows hard disk configuration parameters. sh Extension. Is a text mode calculator. C shell. Installs package.deb (Debian). The file /etc/rc.d/rc.local is like autoexec.bat from ms-dos and we cand add this lines on it. If it's not running, will start dnetc application. Korn shell, combines sh and csh. Show list of last logged in users (reads /var/log/wtmp). Traces an elf executable program (nice hacking tool) Runs scriptname in background and keeps running even if you close the window shell. ksh Extension.

system system system system system system system system system sytem time time time time time time

rpm -e rpmname rpm -qa |grep ftp rpm -qpl package.rpm rpm -Uvh package.rpm setterm -blank 0 sh shutdown -h now shutdown -r now strace -s 200 executable rpm -qi rpmname at 7:00 cdplayd atq atrm 8 date date -s "04/25/05" +"%D" date -s "15:00:00" +"%T"

Uninstalls rpm previous isntalled package (the rpmname must be obtained from rpm -qa and without .rpm). List current installed ftp servers. Shows what files are on the package. Upgrades an installed package with the new one or installs it. Turns off console blank screensaver (that is On by default), you can put it on /etc/rc.local Changes to bash shell (Unix standard). Shutdowns the computer. The same as halt Reboots the computer. The same as reboot. Intercepts system calls which are received by a process -s 200 is for string size 200 (nice hacking tools) Querys about version, complete description and more info for the package. Sets the computer to play the cd at 7:00. Lists the automatic programmed jobs. Deletes automatic job number 8. Shows system date and time. Changes sytem date to April, 25th 2005 . Changes system time to 15:00. Ex: 00 00 20 10 * echo 'The winter is here' >/dev/null (this last command is to not send a mail to root). On the next directories you could copy applications or scripts that will run every time period. /etc/cron.hourly/ /etc/cron.daily/ /etc/cron.wee Shows the server date and time. Synchronizes your time and date with the server. Runs the application and when it's finished shows the running time. Shows the total time since the computer was turned on. Asign that user to that group.

time

Edit this file to memorize a job: etc/crontab

time time time time users

rdate -p ntp.nasa.gov rdate -s ntp.nasa.gov time application uptime /usr/bin/gpasswd -a user group

users users users users users users users users X X

chmod mode file chown user:group file gpasswd -d user group groups username id username su su usermod -G group1,group2 user setxkbmap switchdesk desktoptype

Changes the file permissions Changes the file user and group owner. To remove users from a group. The same is to edit: /etc/group Shows groups that username is on Shows user identification and groups where he is on. You become root until type: exit. Becomes root and reads root user's environment. Asign groups to a user. Try if your AltGr keys doesn't work on X mode. Changes the default desktop to anther (gnome, kde, wmaker, etc...).

You might also like