¡GoConqr estrena diseño! Cuéntanos qué te parece.

Fichas

103.1 Work on the command line

Maicon Alencar Portugués 57 fichas

Fichas del conjunto (57)

  1. 1PID - Which meansProccess IDentification
  2. 2What is the proccess with PID 1Init
  3. 3two processes of the same application receives PIDs ______________different
  4. 4How to know what shell am I using?#echo $SHELL
  5. 5Internal command is a command embedded on ____________shell
  6. 6in order to execute external commands, what variable shell should search location info?PATH
    #echo $PATH
  7. 7which command shows if a program is internal or externaltype
    #type tar
    #type cat
  8. 8#echo $PATH/usr/local/sbin:/usr/local/bin:/usr:sbin/:/usr/bin:/bin
  9. 9/desktop/script.sh Is it an absolute or relative path?relative
  10. 10/home/desktop/scripts/script.sh Is it an absolute or relative path?absolute
  11. 11/etc/init.d/script.sh Is it an absolute or relative path?absolute
  12. 12How create a variable in shell?#name_variable=data
  13. 13How export variables in shell?#export name_variable
  14. 14How create and export variable, in order to other shells sessions can see this variable data?#export name_variable=data
  15. 15Which command shows all variable values?#set
    #set | less
  16. 16Which command shows just external variables values?#env
    #env | less
  17. 17An user opened a new shell and executed an external program without export. He received an error, why?Because he executed the relative path and, in this case, external programs needs to be exported.
    Other way is execute the absolute path.
  18. 18How shows the value of a variable in shell?#echo $variable
  19. 19Which variable shows the values as the command #history?#echo $HISTFILE
  20. 20Which variable shows the length of the return of command #history$HISTFILESIZE
  21. 21$HISTSIZEis the number of lines or commands that are stored in memory in a history list while your bash session is ongoing.
  22. 22$HISTFILESIZEis the number of lines or commands that (a) are allowed in the history file at startup time of a session, and (b) are stored in the history file at the end of your bash session for use in future sessions.
    Notice the distinction between file: on disk - and list: in memory.
  23. 23$HOMEhome address of logged user
  24. 24$HOSTNAMEmachine name
  25. 25$LOGNAMElogin name that are logged into this session
    # echo $LOGNAME
    root
  26. 26$PATHvariable that indicate location of binaries
  27. 27$PWDcurrent folder
  28. 28$USERlogin name that are logged into this session
    # echo $USER
    root
  29. 29$$ $! $?$$ PID of this shell session
    $! PID of last proccess executed
    $? exitcode of last proccess executed
  30. 30a proccess was executed with success, what number its returns?0
  31. 31#echo ~home of user logged
    # echo ~
    /root
  32. 32#echo ~nameuserhome of user logged
    # echo ~sftp_usr/
    /home/sftp_usr/
  33. 33$PS1shell appearance
  34. 34$OLDPWDlast folder visited
  35. 35How execute three commands in the same line separating with a char? # clear date ls#clear ; date ; ls
  36. 36&&If the first command was executed with success, then, the second command will be executed
    #clear && date
  37. 37||Only executes the second command if the first command gets ERROR
  38. 38#!!repeats the last command was executed
  39. 39#!19execute the number of the command likes the history
    18 shodan scan 189.40.216.101
    19 shodan scan submit 189.40.216.101
    20 ping 8.8.8.8
  40. 40#!unamesearchs for "uname" command in the history ($HISTFILE)
  41. 41how to clear HISTFILE?#history -c
  42. 42Can I read the HISTFILE from another user being a normal user?No. Just administrators users can user other user's history
  43. 43How to search a command in history?CTRL + R
    OR
    | grep
  44. 44how command provides a detailed view of other command which includes NAME, SYNOPSIS, DESCRIPTION, OPTIONS, EXIT STATUS, RETURN VALUES, ERRORS, FILES, VERSIONS, EXAMPLES, AUTHORS and SEE ALSO#man
    means "manual"
  45. 45#man -k "string"gives all commands that have the "string" as reference in manual
    #man -k "update system"
    fwupdate - update system firmware
  46. 46#whatis#whatis ls
    ls (1) - list directory contents
    #whatis cat
    cat (1) - concatenate files and print on the standard output
    #whatis tar
    tar(1) an archiving utility
  47. 47#apropos=man -k
    gives all commands that have the "string" as reference in manual
    #man -k "update system"
    fwupdate - update system firmware
  48. 48Which command returns system information?#uname
  49. 49Which command returns exactly the following info: linux version, compilation date and kernel version#uname -a
  50. 50How to create a nickname to a command? like the nickname of "cat" is "tom", then, when I use "tom" in shell, the system translate to "cat"#alias tom=cat
  51. 51#echo *show all files from local directory
  52. 52#echo "*"the shell will just print
    *
  53. 53#echo '*'the shell will just print
    *
  54. 54What is the difference between #echo "*" #echo '*'"" - protect all these $ ` / not
    ' ' - protect ALL
  55. 55#echo "Curso Linux" #echo Curso Linux #echo Curso \ \ \ \ \ \ \ Linux #echo "Curso Linux"Curso Linux
    Curso Linux
    Curso Linux
    Curso Linux
  56. 56Which command we can use to get a command path?#which cat
    /usr/bin/cat
    #which tar
    /usr/bin/tar
    #which shodan
    /usr/local/bin/shodan
  57. 57How we get the release of kernel?#uname -r
    OR
    #uname -a

Información

Descripción
103.1 Work on the command line - topico da certificação LPI I
Creado por
Maicon Alencar
Visitas
25
Etiquetas
lpilinux103
Valoración

Escríbenos

¿Sobre qué es tu mensaje?

¿Qué te parece el nuevo diseño?

¿Te gusta?