A journal for sharing all things software development related
Wed, 12 Jun 2019 11:19 UTC by garethbrown
A collection of common commands on Linux / Bash systems
Toggle Function Key
Press Fn+Esc will toggle between enabling/disabling Fn-key functions.
You can also press Ctrl+Shift+T.
chmod 700 scriptname first.
Check permissions on files in current directory
Go to last directory
$ cd -
Get disk usage (space)
$ df -h
$ sudo reboot
Change owner of file
Change file permissions
Navigating directories faster
New tab (keyboard shortcut)
Search through history
C-r / C-s
Force removal recusively
$ sudo rm -rf somefolder
SCP - transfer file to remove server
Copy automation file using scp:
$ scp -i "~/.ssh/app-software-application-server-key-pair.pem" -r ~/src/app-software-automation email@example.com:~/.
Get man (manual) pages
$ man <command>
Concatenate files and print on the standard output
$ cat file1, file2
Find in file names
(Searching for files starting with BIOS)
find -name "BIOS*"
Grep find with file name and line numbers
(Searching for word BIOS in text files)
$ grep -H -n --with-filename "BIOS" *.txt
Exit SSH / docker exec etc.
Move to "command mode" - I have no idea if that's what it's called. Where can call :wq etc
Write and quit:
To open a file:
vi \<file match text \>
Accessing files on Windows C:/
Get path to Cygwin folder on Windows
$cygpath -w ~
List running daemons
Various ways of doing this
The information on this site is provided “AS IS” and without warranties of any kind either express or implied. To the fullest extent permissible pursuant to applicable laws, the author disclaims all warranties, express or implied, including, but not limited to, implied warranties of merchantability, non-infringement and suitability for a particular purpose.
Email garethbrown: firstname.lastname@example.org