-
Notifications
You must be signed in to change notification settings - Fork 1
/
Comandos
62 lines (52 loc) · 1.92 KB
/
Comandos
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
Administración de usuarios:
- Crear usuario: useradd "Nuevo Usuario"
- Crear usuario en grupo: useradd "Nuevo Usuario" -g "Grupo Existente"
- Cambiar usuario: su - "Nombre usuario"
- Cambiar contraseña: passwd
- Ver información: chage -l 'usuario'
- Modificar usuarios: usermod
- Borrar usuario: userdel "Nombre Usuario"
Administración de grupos:
- Crear grupo: groupadd "Nuevo Grupo"
- Modificar grupo: groupmod "Grupo Existente"
- Cambiar contraseña: gpasswd
- Borrar grupo: groupdel "Grupo Existente"
Administración de ficheros:
- Crear fichero: touch "Nombre fichero"
- Ver fichero: cat "Nombre fichero"
- Borrar fichero: rm filename1 filename2 filename3
- Renombrar fichero: mv old_file new_file
- Copiar ficheros: cp source_file destination_file
- Contar palabras: wc filename
- Listar ficheros: ls "path"
- Propiedades de fichero: stat
Administración de directorios:
- Crear directorio: mkdir dirname
- Borrar directorio: rmdir dirname1 dirname2 dirname3
- Cambiar de directorio: cd dirname
- Renombrar directorio: mv olddir newdir
Administración de variables:
- Crear variable: nombre_variable=valor;
- Ver valor: echo $nombre_variable;
- Lista variables propias: printenv
- Lista variables usuario: ( set -o posix ; set ) | less | sort
Administración de shells:
- Ver shells disponibles: cat /etc/shells
- Cambiar shell por defecto: chsh -s "Nombre Shell" "Nombre Usuario"
Admnistración de discos:
Configurar particiones de un dispositivo: fdisk
Dar formato a una partición o un dispositivo: mkfs
Montar un dispotivo en un directorio: mount "device" "mountFolder"
Desmontar dispositivo: dismount "device"
Administración volúmenes físicos:
Crear volumen: pvcreate
Ver volúmenes: pvdisplay
Borrar volumen: pvremove
Administración grupos de volumenes:
Crear grupo: vgcreate
Ver grupos: vgdisplay
Borrar grupo: vgremove
Administración volúmenes lógicos:
Crear volumen: lvcreate
Ver volúmenes: lvdisplay
Borrar volumen: lvremove