-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commands
Luis Miguel P. Freitas edited this page Mar 23, 2025
·
8 revisions
-
install [package]- updates all repositories and software -
update- updates all repositories and software -
upgrade- upgrade distro -
remove[package name] - remove specified package -
removeall[package name] - purge specified package (removes config files too) -
historypkg- show history of installs -
searchpkg- search packages
-
alert [text]- Add an "alert" alias for long running commands. Use like so: sleep 10; alert -
ebrc- edit this .bashrc -
help- Show help for this .bashrc file -
da- Show date -
password- generate list of random passwords
- cp='cp -i' - copy
- mv='mv -i' - move
- rm='rm -iv' - remove
- delete='rm -rfi' - remove with options
- mkdir='mkdir -p' - create directory
- ps='ps auxf'
- ping='ping -c 10'
- less='less -R'
- cls='clear'
- apt-get='sudo apt-get' - escalates privileges
- multitail='multitail --no-repeat -c'
- freshclam='sudo freshclam' - update anti-virus (only if installed)
- vi='vim' - editor vim
- svi='sudo vi'
- vis='vim "+set si"'
- gs='git status'
- gc='git commit'
- ga='git add'
- gd='git diff'
- gb='git branch'
- gl='git log'
- gsb='git show-branch'
- gco='git checkout'
- gg='git grep'
- gk='gitk --all'
- gr='git rebase'
- gri='git rebase --interactive'
- gcp='git cherry-pick'
- grm='git rm'
- home='cd ~'
- cd..='cd ..'
- ..='cd ..'
- ...='cd ../..'
- ....='cd ../../..'
- .....='cd ../../../..'
- bd='cd "$OLDPWD"'
- rmd='/bin/rm --recursive --force --verbose '
- la='ls -Alh' # show hidden files
- ls='ls -aFh --color=always' # add colors and file type extensions
- lx='ls -lXBh' # sort by extension
- lk='ls -lSrh' # sort by size
- lc='ls -lcrh' # sort by change time
- lu='ls -lurh' # sort by access time
- lr='ls -lRh' # recursive ls
- lt='ls -ltrh' # sort by date
- lm='ls -alh |more' # pipe through 'more'
- lw='ls -xAh' # wide listing format
- ll='ls -Fls' # long listing format
- labc='ls -lap' #alphabetical sort
- lf="ls -l | egrep -v '^d'" # files only
- ldir="ls -l | egrep '^d'" # directories only
- alias mx='chmod a+x'
- alias 000='chmod -R 000'
- alias 644='chmod -R 644'
- alias 666='chmod -R 666'
- alias 755='chmod -R 755'
- alias 777='chmod -R 777'
- h="history | grep "
#Use this for when the boss comes around to look busy.
- busy="cat /dev/urandom | hexdump -C | grep 'ca fe'"
#Show active ports
- ports='netstat -tulanp'
- alias p="ps aux | grep "
- alias topcpu="/bin/ps -eo pcpu,pid,user,args | sort -k 1 -r | head -10"
- alias f="find . | grep "
- countfiles="for t in files links directories; do echo `find . -type ${t:0:1} | wc -l` $t; done 2> /dev/null"
- checkcommand="type -t"
- openports='netstat -nape --inet'
- restart='sudo shutdown -r now'
- forcerestart='sudo shutdown -r -n now'
- diskspace="du -S | sort -n -r |more"
- folders='du -h --max-depth=1'
- folderssort='find . -maxdepth 1 -type d -print0 | xargs -0 du -sk | sort -rn'
- tree='tree -CAhF --dirsfirst'
- treed='tree -CAFd'
- mountedinfo='df -hT'
- mktar='tar -cvf'
- mkbz2='tar -cvjf'
- mkgz='tar -cvzf'
- untar='tar -xvf'
- unbz2='tar -xvjf'
- ungz='tar -xvzf'
- ungz='tar -xvzf'
- edit - Use the best version of pico installed
- sedit -
- extract - Extracts any archive(s)
- ftext - Searches for text in all files in the current folder
- cpp - copy file with a progress bar
- cpg - copy and go to the directory
- mvg - move and go to the directory
- mkdirg - create and go to the directory
- up - Goes up a specified number of directories (i.e. up 4)
- pwdtail - Returns the last 2 fields of the working directory
- distribution - Show the current distribution (ERROR)
- ver - version (ERROR)
- install_bashrc_support - Automatically install the needed support files for this .bashrc file
- netinfo - show current network information (ERROR)
- whatismyip - show my IP address (ERROR)
- apachelog - view apache logs
- apacheconfig - edit apache configuration
- phpconfig - edit php configuration file (ERROR)
- mysqlconfig - edit MySQL configuration
- trim - Trim leading and trailing spaces (for scripts)
DigitalXS - Programming and Development (2025) - By Luis Miguel P. Freitas