Example of how to setup an alias from the cli on linux
Page 1 of 1
Example of how to setup an alias from the cli on linux
Example of how to setup an alias from the cli on linux
Update linux with just 1 word update
Close linux app with the mouse to close unresponsive or apps that fail to close
Type this to make an alias for your firewall in 1 word firewall (easy)
List current running apps with typing list
Fix audio issues
Type this in your cli and then type home to test
unalias
for example
More Detailed ls
Setup a ssh alias
clear screan with cls
Some alias's may not work permanently read this to make those that need to be made permanent
to make them perminant you can edit file below
Example of my bashrc file (always put at the bottom of the file after the fi
alias srest='sudo /etc/init.d/apache2 restart'
alias cls='clear'
alias picon1='ssh 192.166.2.19'
alias ipconfig='ifconfig'
alias png='timeout 5s ping google.co.uk'
alias home='cd ~/'
alias firewall='sudo gufw'
alias fixsound='pkill jackd'
alias list='sudo ps aux | less'
alias close=' sudo xkill;'
alias update='sudo apt-get update'
Also please note you need to test to see if another program is using the word you plan on using so for example before you alias the word test, you first you should type test into your terminal (console aka cli) and if no actual program or command is using that word you plan to use then you should get an error saying not found for example, also try to avoid using alias's words that maybe used so dont use words like list for example.
Update linux with just 1 word update
- Code:
alias update='sudo apt-get update'
Close linux app with the mouse to close unresponsive or apps that fail to close
- Code:
alias close=' sudo xkill;'
Type this to make an alias for your firewall in 1 word firewall (easy)
List current running apps with typing list
- Code:
alias list='sudo ps aux | less'
Fix audio issues
- Code:
alias fixsound='pkill jackd'
- Code:
alias firewall='sudo gufw'
Type this in your cli and then type home to test
- Code:
alias home='cd ~/'
unalias
for example
- Code:
unalias home
- Code:
alias png='timeout 5s ping google.com'
- Code:
used to windows commands?
- Code:
alias ipconfig='ifconfig'
- Code:
alias dir='ls -l'
More Detailed ls
- Code:
alias dir='ls -l -a'
Setup a ssh alias
- Code:
alias picon1='ssh 192.168.1.16'
clear screan with cls
- Code:
alias cls='clear'
- Code:
alias srest='sudo /etc/init.d/apache2 restart'
Some alias's may not work permanently read this to make those that need to be made permanent
to make them perminant you can edit file below
- Code:
sudo gedit /etc/bash.bashrc
Example of my bashrc file (always put at the bottom of the file after the fi
alias srest='sudo /etc/init.d/apache2 restart'
alias cls='clear'
alias picon1='ssh 192.166.2.19'
alias ipconfig='ifconfig'
alias png='timeout 5s ping google.co.uk'
alias home='cd ~/'
alias firewall='sudo gufw'
alias fixsound='pkill jackd'
alias list='sudo ps aux | less'
alias close=' sudo xkill;'
alias update='sudo apt-get update'
Also please note you need to test to see if another program is using the word you plan on using so for example before you alias the word test, you first you should type test into your terminal (console aka cli) and if no actual program or command is using that word you plan to use then you should get an error saying not found for example, also try to avoid using alias's words that maybe used so dont use words like list for example.
Re: Example of how to setup an alias from the cli on linux
- Code:
alias openports='sudo nmap -sS net_name'
Where net_name is your server / station name!
- Code:
alias netv='sudo nmap -sP 192.168.42.0/24'
- Code:
alias netv2='sudo nmap -sP 192.168.1.0/24'
Edit your alias's by using an alias (i always think outside of the box you see and made a paradox) this works very well!
- Code:
alias bedit='sudo gedit /etc/bash.bashrc'
Quick Shutdown Command Alias
- Code:
alias quickshutdown='sudo shutdown -h now'
Quick Convertin Alias
- Code:
alias convert1='avconv -i input.mp4 -c:a libmp3lame -q:a 4 output.mp3'
Netstat will fire off on the command rtable and it will display current routing table
- Code:
alias rtable='netstat -r'
Crontabs aka cronjobs
~~~~~~~~~~~~~~~~~
- Code:
alias cjob='sudo crontab -u john -l'
Web Cron Jos if required
User Specific Cron tab / cronjob
- Code:
alias cjob='sudo crontab -u www-data -l'
- Code:
alias cjob='sudo crontab -e'
System Wide Cron tab/ cronjob
- Code:
sudo crontab -u root -e
More Commands can be found with the 2 following:
http://www.thegeekstuff.com/2010/11/50-linux-commands
http://www.thetechnicalstuff.com/top-120-linux-commands-for-linux-administrators
Similar topics
» linux networking with alias and multiple ips
» Linux bash &Python & Alias For Getting External IP
» how to setup samba for linux config and allowing linux shares and adding users to samba commands
» Pythem Linux Setup TuT & Vid
» openvpn setup on linux
» Linux bash &Python & Alias For Getting External IP
» how to setup samba for linux config and allowing linux shares and adding users to samba commands
» Pythem Linux Setup TuT & Vid
» openvpn setup on linux
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|