The document provides commands for various tasks including killing processes, managing files and directories, networking, multimedia, and system administration. Some example commands are kill to terminate processes, ls and du to view files and directories, ifconfig to view network settings, mplayer to play videos, and hdparm to view and configure hard disk parameters.
Copyright:
Attribution Non-Commercial (BY-NC)
Available Formats
Download as ODT, PDF, TXT or read online from Scribd
The document provides commands for various tasks including killing processes, managing files and directories, networking, multimedia, and system administration. Some example commands are kill to terminate processes, ls and du to view files and directories, ifconfig to view network settings, mplayer to play videos, and hdparm to view and configure hard disk parameters.
The document provides commands for various tasks including killing processes, managing files and directories, networking, multimedia, and system administration. Some example commands are kill to terminate processes, ls and du to view files and directories, ifconfig to view network settings, mplayer to play videos, and hdparm to view and configure hard disk parameters.
Copyright:
Attribution Non-Commercial (BY-NC)
Available Formats
Download as ODT, PDF, TXT or read online from Scribd
The document provides commands for various tasks including killing processes, managing files and directories, networking, multimedia, and system administration. Some example commands are kill to terminate processes, ls and du to view files and directories, ifconfig to view network settings, mplayer to play videos, and hdparm to view and configure hard disk parameters.
Copyright:
Attribution Non-Commercial (BY-NC)
Available Formats
Download as ODT, PDF, TXT or read online from Scribd
Download as odt, pdf, or txt
You are on page 1of 4
Commands
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 daemons kill -9 PIDnumber NumberPID process. Kill -CONT PIDnumber Resumes the numberPID process that we stopped before. daemons killall processname Kills processname. Lists the aplications that are now running with his PID(Process IDentifier). ps aux | more Pauses between daemons ps aux screens. Very useful to get information to kill a running process. Shows the processes sorted by CPU use on real time, daemons top also free RAM and used SWAP. Kills on X-windows the process that we select by daemons xkill 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 files alias ls='ls --color=tty' the output goes to screen (not a file) you could insert this line in ~/.bash_profile to always do it. dd if=/dev/fd0 Makes a disk image and saves it on diskimagename files of=diskimagename file. dd if=diskimagename files Saves the diskimagename file to a floppy disk. of=/dev/fd0 files df Shows free disk space. files du -c files Shows the total size used by the files. files du -s directory Shows the directory size. files echo $PATH Shows the current path. Edits the filename Ctrl+X Ctrl+S (save), Ctrl+X files emacs filename Ctrl+C (quit). files find /directory -name 'filename' Searches from directory the specified filename. for x in $(ls /directory) do echo files A little bash script to loop on the files in a directory. $x done Searches for a string on a file. cat file.txt | grep files grep stringtolookfor files joe filename Text editor. I'ts like a better more, allows to go up and down and files less file doesn't load the all the entire file when you call it. ln -s /mnt/cdrom/Mame/roms Makes a soft link to the cdrom roms directory as if it files /usr/games/lib/xmame was /usr/games/lib/xmame (xmame must not exist) Formats the second partition from the first hard disk files mke2fs /dev/hda2 using the Linux format (ext2). Shows filename on screen (it's lik: type | more on ms- files more filename dos) . files mount /dev/hda1 /mnt/c -t vfat Mounts fat32 partition. files pico filename A basic text editor. Needs It's size in bytes is very low. Deletes the directory and all the files within. No files rm -rf directory confirmation requiered. Changes a string for another one on a file (used with files sed pipes). sed 's/stringA/StringB/' filename Changes the first occurrence of stringA on filename files > newfilename for stringB and saves it in newfilename. sed 's/stringA/stringB/g' filename Changes all the occurrence of stringA on filename for files > newfilename stringB and saves it in newfilename. Shows only the last lines of filename (good to follow files tail -f filename on real-time log files). Compresses in tarball the directory and all files tar -zcvf filename.tar.gz directory subdirectories into filename.tar.gz files tar -zxvf filename.tar.gz Decompress filename.tar.gz files wc filename Line count, word cound and byte count for the file. Finds filename and says where it is using the internal files whereis filename data base, that must be updated. updatedb updates it. Compress directory and all its folders on files zip -r targetfilename directory ficherodestino.zip zip -r zipfilenameyouwant.zip Compresses using zip the desiredirectoryname and all files desiredirectoryname the subdirectories. convert -resize 640x480 image Converts image to 640x480 original.jpg modified.jpg image mplayer videoyouwant.avi -vo aa Plays the video on ascii art. network /etc/network/interfaces Edit this file to change IP on Debian Shows your IP also is used to configure your network network ifconfig card. network ncftp An improved ftp client for console If you type it being root, will display current running network netstat -lnp --ip daemons. scp Copies the file vmlinux remote from the host network root@192.168.0.201:/boot/vmlin 192.168.201 via ssh to current directory. ux . wget -c --passive-ftp Downloads the file or continues the download using network ftp://filename FTP passive mode. Downloads the requested filename or continues the network wget -c http://filename download if the connection was lost. network wget -rl 4 http://domainname Downloads the website and all files on it until level 4 Plays in background from the shell the .mp3 music sound mpg123 -q /directory/*.mp3 & files allocated on the directory. Sets using_dma bit to 1 to enable Ultra-DMA access system /sbin/hdparm -d 1 /dev/hda to disk. system /sbin/hdparm -tT /dev/hda Performs a timing benchmark on device reads. system /sbin/hdparm /dev/hda Shows hard disk configuration parameters. system bash sh Extension. system bc Is a text mode calculator. system chs C shell. system dpkg -i package.deb Installs package.deb (Debian). if [ -x /path/to/dnetc ]; then echo The file /etc/rc.d/rc.local is like autoexec.bat from ms- system "Starting Distributed.net dos and we cand add this lines on it. If it's not running, Client..." /path/to/dnetc -quiet fi will start dnetc application. system ksh Korn shell, combines sh and csh. system last Show list of last logged in users (reads /var/log/wtmp). system ltrace elfexecutable Traces an elf executable program (nice hacking tool) Runs scriptname in background and keeps running system nohup scriptname & even if you close the window shell. system pdksh ksh Extension. Uninstalls rpm previous isntalled package (the system rpm -e rpmname rpmname must be obtained from rpm -qa and without .rpm). system rpm -qa |grep ftp List current installed ftp servers. system rpm -qpl package.rpm Shows what files are on the package. Upgrades an installed package with the new one or system rpm -Uvh package.rpm installs it. Turns off console blank screensaver (that is On by system setterm -blank 0 default), you can put it on /etc/rc.local system sh Changes to bash shell (Unix standard). system shutdown -h now Shutdowns the computer. The same as halt system shutdown -r now Reboots the computer. The same as reboot. Intercepts system calls which are received by a system strace -s 200 executable process -s 200 is for string size 200 (nice hacking tools) Querys about version, complete description and more sytem rpm -qi rpmname info for the package. time at 7:00 cdplayd Sets the computer to play the cd at 7:00. time atq Lists the automatic programmed jobs. time atrm 8 Deletes automatic job number 8. time date Shows system date and time. time date -s "04/25/05" +"%D" Changes sytem date to April, 25th 2005 . time date -s "15:00:00" +"%T" 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 Edit this file to memorize a job: time the next directories you could copy applications or etc/crontab scripts that will run every time period. /etc/cron.hourly/ /etc/cron.daily/ /etc/cron.wee time rdate -p ntp.nasa.gov Shows the server date and time. time rdate -s ntp.nasa.gov Synchronizes your time and date with the server. Runs the application and when it's finished shows the time time application running time. Shows the total time since the computer was turned time uptime on. users /usr/bin/gpasswd -a user group Asign that user to that group. users chmod mode file Changes the file permissions users chown user:group file Changes the file user and group owner. To remove users from a group. The same is to edit: users gpasswd -d user group /etc/group users groups username Shows groups that username is on users id username Shows user identification and groups where he is on. users su You become root until type: exit. users su - Becomes root and reads root user's environment. users usermod -G group1,group2 user Asign groups to a user. X setxkbmap Try if your AltGr keys doesn't work on X mode. Changes the default desktop to anther (gnome, kde, X switchdesk desktoptype wmaker, etc...).