Basic Linux Commands
Useful Basic Linux Commands
File Commands:
ls - Directory listing
ls -al - Formated listing
cd - Change to home
cd <dir> - Change directory to dir
pwd - Show current directorytouch <filename> - Create or update file
mkdir <dir> - Create directory <dir>
cp <file1> <file2> - Copy <file1> to <file2>
mv <file1> <file2> - Rename <file1> to <file2>
mv <dir1> <dir2> - Rename <dir1> to <dir2>
cat > <filename> - Place standard input into file
ln -s <source> <destination> - Create symbolic link of file or foldermore <filename> - Output the contents of the file
less <filename> - Output the contenst of the file
head <filename> - Output first 10 lines of file
tail <filename> - Output last 10 lines of file
tail -f <filename> - Output contents of file as it growsShortcuts:
ctrl + c - Halts current command
ctrl + z - Stop current command
fg - Resume stopped command in foreground
bg - Resume stopped command in background
exit - Log out of current sesstion
ctrl + d - Log out of current sesstion
ctrl + w - Erases one word in current line
ctrl + u - Erase whole line
ctrl + r - Reverse lookup of previouse commands
!! - Repeat last commandSearching:
System Info:
SSH:
Network:
Process Management:
File Permissions:
Compression:
Installation:
Last updated
Was this helpful?