Comandos de Bash
De MEPIS Documentation Wiki
Tabla de contenidos |
Manejo de archivos y permisos
ls - Enlista el contenido de un directorio
dir - Enlista el contenido de un directorio
rm - Elimina archivos
rmdir - Elimina directorios, directorios deben estar vacios
mkdir - Crea una nueva carpeta
cd - Cambia el directorio
ln - Enlaza datos
cp - Copia archivos
mv - Mueve archivos
pwd - Muestra por pantalla el directorio actual
chmod - Cambia los permisos del archivos
chown - Cambia el propietario de un archivo
chgrp - Cambia el grupo de un archivo
touch - Actualiza la fecha de una archivo
cat - Lee un archivo y lo muestra por pantalla de terminal
patch - Agrega un parche a un programa
diff - compara diferencias entre dos programas
locate - Busca los archivos que coinciden con el patron ingresado
updatedb - Actualiza todas las ubucaciones de DB
find - busca archivos, mas lento que locate pero puede encontrar cosas que locate no encuentra
nano - Editor de texto de consola (instalable con apt-get)
vi - Editor de texto de consola
emacs - Editor de texto de consola
tar - Uno de muchos archivadores para .tar, .tar.gz, y tar.bz2
bzip - Otro archivador para .bz2
gzip - Otro archivador para .gz
unzip - extrae un archivo .zip
unrar - extrae un archivo .rar
sed - Editor de stream
Manejo de usuarios
adduser - Agrega un usuario
rmuser - Elimina un usuario
passwd - Cambia la contraseña de un usuario
users - Muestra los usuarios que estan actualmente logueados
w - Lista de todos los usuarios actualmente logueados, cada terminal abierto es un usuario
who - Muestra quien esta logueado
whoami - Muestra la ID de un usuario
su - Cambia usuarios
exit - Cierra la sesion del usuario actual y regresa al usuario anterior si habia uno
Manejo de tareas
ps - list off running commands, usually ps aux
pstree - a tree representation of your running tasks
top - a program that lists your running tasks
kill - kill a brogram by its PID
killall - kill a program by its name
cron - daemon to execute scheduled commands
crontab - install, deinstall or list the tables used to drive the cron daemon
Disk Management
eject - eject a disk
mount - mount a disk
umount - unmount a disk
free - show your free diskspace
df - show your filesystem usage
du - show the diskspase usage of a file or directory
System Management
halt - shutdown
shutdown - shutdown
reboot - restart
sleep put the kernel into sleep mode
ifconfig - configure an interface
ifup - bring up an interface
ifdown - bring down an interface
iwconfig - configure a wireless interface
uptime - show various pieces of data about your system, including uptime
uname - show various pieces of data about your system
Package Management
dpkg - control packages
dpkg-reconfigure - reconfigure a package
apt-get - install packages
apt-cache search packages
which - use this command on a packagename from apt to see where it installed to, only binaries
whereis - locate the binary, source, and manual page files for a command
Network Tools
ping - ping an ip
dig - gather information on a host
host - gather information on a host
netstat - gather information about all network accesses
ssh - secure shell client
wget - non-interactive download of files from the Web. It supports HTTP, HTTPS, and FTP protocols, as well as retrieval through HTTP proxies.
ftp - Internet file transfer program
ntpdate -set the date and time via Network Time Protocol (NTP)
Program & programming Tools
python - run a python program
perl - run a perl program
ruby - interpreted scripting language for quick and easy object-oriented programming.
java - launches a Java application
make - build a program
make-kpkg - build a debpackage for a kernel
Unsorted
man - read the manual to a command
grep - search for a string
startx - bring up x
echo - print something to the screen
tail - output the last part of files (last 10 lines by default)
less - page through text one screenful at a time
date - prints system date
make-kpkg - build Debian kernel packages from Linux kernel sources
update-rc.d - install and remove System-V style init script links
debconf - configure Debian packages
alias - create aliases
e2fsck - check a Linux ext2/ext3 file system
help - provide info about bash commands
kdesu - starts a program as root
lspci - list all PCI devices
lsusb - list all USB devices
logout - logout from current session
lsmod - list loaded modules
passwd - change user password
runlevel - find the current and previous system runlevel
nice - run a program with modified scheduling priority
rmmod - remove a module from the Linux Kernel
insmod - insert a module into the Linux Kernel
update-inetd - create, remove, enable or disable entry in /etc/inetd.conf
dmesg - print kernel messages
The rest are not commands, read this for more bash tips
to pipe the output of a program to another you use |
example ps aux | grep kded
this would show just the line for kded
to execute multiple commands you use one of the following && || ;
command1 && command2 - execute command2 only if command1 completes properly
command1 || command2 - execute command2 only if command1 fails
command1 ; command2 - always execute command2
direct output of a command to files with > or >>
> - overwite file ex. echo "hello world!" > helloworld.txt
>> - append to end ex. echo "hello world!" >> helloworld.txt
This not a comprehensive list and is a work in progress

