Last active
September 6, 2021 18:17
-
-
Save reinislejnieks/022270a0fd49a4f3134d to your computer and use it in GitHub Desktop.
#linux terminal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# useful linux terminal commands | |
#------------------------------- | |
# shows current location | |
pwd | |
# change directory | |
cd / # root dir | |
cd ~ # home dir | |
cd # home dir | |
cd .. # one folder above | |
cd . # one folder below | |
# lists files and folders in current dir | |
ls | |
la -a # all files and folder including hidden | |
# create dir | |
mkdir foldername | |
# remove dir | |
rmdir foldername | |
rm -rf foldername # removes all files and subdirectories in folder | |
# remove file | |
rm file.txt | |
# install programs | |
sudo apt-get install programname | |
# make downloadable installer executable | |
chmod +x programname | |
# opens up folder for read/write access | |
sudo chmod -R ugo+rw foldername | |
# start xampp server | |
sudo /opt/lampp/lampp start | |
# stop xampp server | |
sudo /opt/lampp/lampp stop | |
# rename folders and files | |
mv oldname newnaeme | |
# download and uncompress wp, then remove archive | |
sudo wget http://wordpress.org/latest.tar.gz && tar xzvf latest.tar.gz && rm latest.tar.gz && mv wordpress newProjectname | |
# download with wget | |
wget http://wordpress.org/latest.tar.gz --no-check-certificate && tar xfz latest.tar.gz && rm latest.tar.gz && mv wordpress newProjectname | |
# open file with sublime text | |
subl filename | |
# get gem environment info | |
gem environment | |
# creating shortcut commands | |
alias shortcut-command="regular-command" | |
# clear screen | |
clear | |
# shows terminal history | |
history | |
# login as root | |
sudo -s | |
# add repository | |
add-apt-repository 'deb http://packages.linuxmint.com/ julia main' | |
# can add aliases | |
sudo gedit ~/.bashrc | |
# alias | |
alias name="command" | |
# symlink for node | |
ln -s /usr/bin/nodejs /usr/bin/node | |
# fix xampp apache missing mimetype | |
cd /opt/lampp/etc && sudo gedit mime.types | |
# then add: | |
# image/svg+xml svg | |
# image/svg+xml svgz | |
# boost volume | |
pactl -- set-sink-volume 0 250% | |
pactl -- set-sink-volume 0 100% | |
################### | |
# invert mouse axis | |
################### | |
# first: get the id of the mouse with | |
xinput list | |
# then set the prop: xinput --set-prop <device id> <prop id> <values> | |
# first 0 is x, second is for y axis, default is 0 for both | |
xinput --set-prop 11 264 0 0 | |
# to get available props for config: | |
xinput --list-props <device id> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment