- Create shortcut in Ubuntu-Gnome Alacarte
sudo dmidecode -t 16
dmidecode -t memory
>> show memory slots
watch free -m
>> shows free memory
watch -n 2 <command_to_execute>
>> execute the command every 2 seconds
If you create a directory under ~/bin, everything you copy there will be in the PATH directly.
addUser --system --disabled-password --shell=/bin/false jenkins
jinfo -flag MaxPermSize <process_id>
jar tf *.jar
>> view JAR content
http://dev-maziarz.blogspot.com.es/2012/09/ubuntu-1204-installing-both-maven3-and.html
sudo gnome-desktop-item-edit /usr/share/applications/ --create-new
#Graphic driver
apt-get purge nvidia* bumblebee*
echo $$ >> $$ is defined to return the process ID of the parent in a subshell;
sudo lsof -i
sudo netstat -tulpn | grep :<portNumber>
>> you get processId (pid)
sudo ls -la /proc/<pid>/exe
>> you get the exact process
http://askubuntu.com/questions/89710/how-do-i-free-up-more-space-in-boot
#Grails bash completion https://grails.org/Grails%20Bash%20Completion http://pastebin.com/f52475980
ps -A
/etc/init.d/ [start | stop | status] service [start | stop | status]
http://www.ibm.com/developerworks/linux/library/l-tip-prompt/
- Under
/etc/profile.d/
, you can create an .sh file putting together some system-wide env variables.- E.g. under
jdk.sh
you can find env variables for JVM.
- E.g. under
- Under
/etc/environment
- vnstat: https://www.linuxbabe.com/monitoring/install-vnstat-debian-8ubuntu-16-04-server-monitor-network-traffic
- NetSpeed:
Install oh-my-zsh:
https://manuteoriginal.wordpress.com/2013/04/24/zsh-y-oh-my-zsh-en-mac-os-x/
Update bashrc: . ~/.bashrc source ~/.bashrc
Copy into .bashrc:
export GIT_PS1_SHOWDIRTYSTATE=1
export PS1='\w\e[0;32m$(__git_ps1 " (%s)")\$ '
- https://fishshell.com/docs/current/tutorial.html
- https://blog.devopscomplete.com/fishing-with-bob-the-fish-2decd3a2f87
- A universal variable is a variable whose value is shared across all instances of fish, now and in the future – even after a reboot. You can make a variable universal with
set -U
- Modify
$PATH
variable:set -U fish_user_paths <path_to_be_appended> $fish_user_paths
- Unlike other shells, fish does not have an export command. Instead, a variable is exported via an option to set, either --export or just -x.
- You can erase a variable with -e or --erase
- Unlike other shells, fish stores the exit status of the last command in
$status instead of $ ? - Unlike other shells, fish does not use backticks ` for command substitutions. Instead, it uses parentheses
- Unlike other shells, fish does not have aliases or special prompt syntax. Functions take their place.
- You can see them typing
functions
- You can see the source for any function by passing its name to functions, e.g.
functions ls
- You can see them typing
- Unlike other shells, there is no prompt variable like PS1. To display your prompt, fish executes a function with the name fish_prompt, and its output is used as the prompt.
- The equivalent to
bashrc
is~/.config/fish/config.fish
- When fish encounters a command, it attempts to autoload a function for that command, by looking for a file with the name of that command in
~/.config/fish/functions/
- For example, if you wanted to have a function ll, you would add a text file
ll.fish
to~/.config/fish/functions
- For example, if you wanted to have a function ll, you would add a text file
- To define aliases:
$HOME/.config/fish/aliases.fish
- Show prompt in new line:
set -g theme_newline_cursor yes
- To execute a bash script, several options:
exec bash -c "source some-bash-setup.sh; exec fish"
- https://github.com/edc/bass