The Ultimate Linux Cheat Sheet
A while back I wrote a post of BASH or SSH Commands. In this post I add several other useful Linux commands.
- ls -alh
- list directory
- lists a history of commands run
- Display file on screen
- keyword search
- read a file and format for pages
- displays server name
- clears the terminal screen
- exits terminal log in
- kills processes
- remove file
- copy a file
- move a file
- advanced text editor
- text editor
- Interprets Binary files and shows what can be printed on the screen
- change working directory
- print working directory
- displays the last 10 lines of the file unless -n is used to tell it how many lines to go up -c is how many bytes you want. -f to follow the log.
- creates an empty text file and updates the modified
- outputs the current date of the system
- gives full binary path to commands
Vi and Vim Commands
In the Linux community there seems to be no conflict greater than the Emacs vs vi/vim editor, with others, like Pico/Nano/Joe with vocal minorities. I started with Pico as my first editor. I have since used many systems, and I find vi or vim most likely installed by default.
Vim has many commands. Whole books cover it. Here are some basic commands to get you started.
dd – Delete Line. You can also type a number and dd to delete multiple lines.
wq – Save and quit.
q! – Quit without saving.
set nu – Show line numbers.
i – Insert text.