Buscar
Estás en modo de exploración. debe iniciar sesión para usar MEMORY

   Inicia sesión para empezar

level: UNIX1

Questions and Answers List

level questions: UNIX1

QuestionAnswer
querying other users by nameid (username)
executes the last command!!
gives info on what command doeswhatis file_name
gives info about type of filefile file_name
proposes commandsapropos
shows where command is installedwhich command_name
makes directorymkdir dir_name
creates file that doesnt exist or updates file's datetouch file_name
copies file to new filecp old_file copy_of_file
rename filemv old_name new_name
removes filerm file_name
wildcard for multiple characters*
removes directoryrm -r dir_name
removes empty directoriesrmdir dir_name
escape character\
one level up..
home directory~
reads from file reads from file and enumerates lines fills file with content/ creates file concatenates filescat file_name cat -n file_name cat >> file_name cat file_1 file_2
shows what is in the fileless- more advanced more- less advanced LOGICAL XD
new line\
changing promptPS1="new_prompt"
executes the last command!!
clears current bash session historyhistory -c
clears history file, fills history file with emptinessecho -n > .bash history
combines two commands; cd ; pwd- changes to home dir and prints working dir
lists directories in rootls /
lists directories in current working directoryls ls .
absolute path relative path/somepath --------------- ./somepath somepath
preserve literal meaning of all enclosed characters preserve literal meaning of all except: $ \ `' ' " "
setting variable acccessing variableSOMEVAR ="sth" echo $SOMEVAR echo ${SOMEVAR}
displaying all variablesset
unsetting variableunset SOMEVAR
printing environmentenv
exporting variables to enviromentexport VARIABLE
selecting manual sectionsman 1 kill displays first section of man of kill command don't specify parenthesis for functions
What is SSHsecure shell protocol enables two computers to commmunicate safely, it is encrypted closing terminal results in killing all processes in current session
connecting via sshssh [username@]hostname[.domainname]
What is GNU screen utilityTerminal multiplexer, by starting a screen session one can open many virtual terminals, processes runnning in screen will run even after disconnecting
makes a copy of everything that is printed on terminal and saves it into the ./typescript filescript-starts a script exit-ends script cat ./typescript- access to file
displays datedate
displays calendar of current month displays calendar of whole yearcal cal -y
displays system name displays all the available informationuname uname -a
hardware informationlscpu lspci lsusb
displays information on total and free memoryfree free -h -human readable version
displays the user and group IDsid
querying other users by nameid username
user information lookup programfinger username
displays who is logged on the systemwho
displays logged users and the commands they are runningw
sends a message to user speccifying the terminal is necessary only if user is logged more than once enables/disables incoming messageswrite username [terminal] mesg [y|n]