Linux Quick Reference
VI
Insert Mode - INSERT key
Leave Insert Mode (return to normal mode) - ESC key
Enter Command Mode - : key
Command Mode Commands
Saves work - :w
Saves work and quits - :wq
Writes to a write protected file - :w!
Quits, discarding changes - :q!
Normal Mode Commands
Delete character - x
Delete line - dd
Search - /<search text>
Copy - Go to the line to copy and press Y. Go to the line above where you want to paste and press P.
less
Searching
/* pattern where pattern is a regular expression
?* pattern where pattern is a regular expression
Movement
d# move down # lines
b# move up # lines
g# go to line #
Exiting
Environment Variables
set - displays environment variables
set | grep <search term> - displays only environment variables matching grep search
Setting Runlevel (i.e. text or graphics mode of Linux)
Go to inittab file and set the initdefault entry (1 for single user text mode, 5 for GUI mode)
Changing mode on the fly - /sbin/init <mode>
File Permissions
drwxrwxrwx 1 username groupname 2525 Feb 18 09:17 index.htm
1st position : item type. d=directory, -=file, l=link
User permissions
Group permissions
Others permissions
Searching for Files
find -name '*/jt400.jar' Running this from the root will search all directories for jt400.jar
Changing the GRUB list of available OSes to boot to
sudo vi /boot/grub/menu.lst
remove undesired menu entries, then save.
Comments (0)
You don't have permission to comment on this page.