Skip to content

Linux

General#

  • commands are case sensitive. (because the file system is case-sensitive)

Commands#

also bash, sh, command line, shell, prompts ...

Cmd meaning option / switch note aval.
pwd print working directory
cd change directory
whoami show user name
mkdir make directory
ls list p-parent;v-verbose;a-show all
echo echo
cat concatenate
mv move (also for rename) all to last arg.
cp copy
rm remove r-remove all;i-interactive DONT USE
rmdir remove directory p-parent only empty
wc word count l-line
uniq only unique lines
man manual =help of matlab X
su superuser
logout logout
sudo su do

Paths#

Cmd meaning
/ (slash) starting from the root directory
~ (tilde) starting from my home directory
- (hyphen) option/switch

file#

txt#

Cmd meaning
> overwrite / replace
>> append to end

commands#

ls -la: -l list, -a all chown -R -v admin: change owner. -R --recursive $0: expands to the name of the shell or shell script, Bash special parameters, read only. https://bash.cyberciti.biz/guide/$0 id -un = whoami

bash terminal setup#

http://tldp.org/HOWTO/Bash-Prompt-HOWTO/bash-prompt-escape-sequences.html https://midu.dev/personaliza-el-prompt-de-la-terminal-de-macos/