Advertisement
Justman10000

Common Bash commands

Jun 9th, 2023 (edited)
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.96 KB | None | 0 0
  1. //! If you use Gitpod codespaces
  2. sudo passwd root
  3. su root
  4. !//
  5.  
  6. rm -r .*
  7.  
  8. # Check with "lsb_release -cs" which operating system you have...
  9. # Based on the operating system, use this legend:
  10. ## Linux Debian 12    = 12MqJjMq
  11. ## Linux Debian 11    = uUEuWcH4
  12. ## Linux Debian 10    = 7eUKEiKr
  13. ## Linux Debian 9     = 0VdKRtvS
  14. ## Linux Ubuntu 23.04 = tSwvv4Gg
  15. ## Linux Ubuntu 22.10 = H0SrNLEH
  16. ## Linux Ubuntu 22.04 = RJE5fy1S
  17. ## Linux Ubuntu 20.04 = gmhNQf48
  18. ## Linux Ubuntu 18.04 = gGyf8LyH
  19. ## Linux Ubuntu 16.04 = UCUn7Gqr
  20. ## Linux Ubuntu 14.04 = 41W96usZ
  21. osVersion=
  22.  
  23. rm -r /etc/apt/sources.list*
  24. wget https://pastebin.com/raw/$osVersion -O /etc/apt/sources.list
  25.  
  26. apt update
  27. apt upgrade -y
  28.  
  29. # If you use Gitpod codespaces
  30. rm -r /nix /home/gitpod
  31.  
  32. rm -r /*/*/*/apache2
  33. rm -r /*/*/*/*/apache2
  34. rm -r /*/*/*/*/*/apache2
  35.  
  36. apt install apache2* -y
  37.  
  38. rm -r /var/www/html/*
  39.  
  40. apt install software-properties-common -y
  41. add-apt-repository ppa:ondrej/php
  42. apt update
  43. apt install php8.1 php8.1-cli php8.1-common php8.1-curl php8.1-gd php8.1-intl php8.1-mbstring php8.1-mysql php8.1-opcache php8.1-readline php8.1-xml php8.1-xsl php8.1-zip php8.1-bz2 libapache2-mod-php8.1 -y
  44.  
  45. # Git
  46. ## Basic
  47. git config --global user.email "YourMail"
  48. git config --global user.name "YourName"
  49.  
  50. ## Clone a repository manual
  51. git init
  52. git remote add origin REPOSITORY
  53. git checkout -b BRANCH # If the repository is empty
  54. git pull origin BRANCH # If the repository is not empty
  55. git branch -m BRANCH
  56.  
  57. ### If you use Gitpod codespaces
  58. chown gitpod:gitpod *
  59. chown gitpod:gitpod */*
  60. chown gitpod:gitpod */*/*
  61. chown gitpod:gitpod */*/*/*
  62. chown gitpod:gitpod */*/*/*/*
  63. chown gitpod:gitpod */*/*/*/*/*
  64. chown gitpod:gitpod .*
  65.  
  66. ## Gerrit
  67. git checkout
  68. f="$(git rev-parse --git-dir)/hooks/commit-msg"; curl -o "$f" https://gerrit.wikimedia.org/r/tools/hooks/commit-msg ; chmod +x "$f"
  69. bash .git/hooks/commit-msg .git/COMMIT_EDITMSG
  70. git commit --amend --no-edit
  71. git push origin HEAD:refs/for/master
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement