Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- https://boards.4channel.org/g/thread/92936829#p92938504
- 5-minutes Linux handbook
- This handbook is intended for people who are considering about switching over to linux or have just switched to linux, and are unfamiliar with common CLI tools and basic stuff.
- This handbook assumes you have been a seasoned Windows user and possess more IQ than a snail.
- 1. Understanding what the commands actually do
- ALWAYS REMEMBER : UNDERSTAND WHAT YOU ARE DOING *BEFORE* YOU DO IT
- If someone tells you to type any command, you can find out what said command can do by :
- <command> --help
- man <command>
- *<command> refers to a single command without any arguments
- this will show you all the options of said command, if you want to know what a specific argument of a command does, type
- <command> --help | grep <argument>
- Examples :
- ls --help
- ls --help | grep "-s"
- 2. Navigating your filesystem and editing files inside CLI (Command Line Interface)
- Reminder : Everything is case-sensetive, including names and commands
- "Purple purple PuRpLe"
- are three different names/commands/directories/arguments
- Folders and Directories mean the same thing
- //navigating and viewing directories
- ls : list files and folders in current directory
- pwd | tree : same as ls but in tree-view
- cd <path> : takes you to a specific directory
- cd .. : goes up one directory
- //creating or editing files
- touch : creates new file
- nano : basic text editor
- (Ctrl+S to save, Ctrl+X to exit)
- if you need to append a single line to a text file do :
- echo <text> >> filename.txt
- if you need to create/replace a file and append some text to it do :
- echo <text> > filename.txt
- //deleting files and folders
- rm : deletes a single file
- rm -r : bulk deletes folder(s) and everything inside it
- //what is ~
- ~ is usually an alias to your "home" folder
- most of your userdata resides in /home/<user>/
- instead of typing the ^entire path in a command you can just type ~
- for example :
- instead of typing :
- rm -r /home/user/Documents/new-files/
- you can type :
- rm-r ~/Documents/new-files/
- 3. Overview of the Filesystem
- Reminder : If you're a beginner, you really shouldn't mess with anything that's outside of ~/
- / : Root directory, under which literally everything of a linux system resides (even hardware devices)
- /home : where your "Home" is, usually anything you access from your graphical File Manager or other apps are stored here by default under your username
- ~/ : An alias for your Home directory, basically points to /home/<user>/
- /etc , /usr/share , ~/.local/share : usually where config files for both system and normal apps are stored
- ~/.local/ is usually used by Apps for that specific user's configuration
- /usr/ is usually used by Apps for configuration which needs to apply for all users
- /etc/ is usually for other system-related stuff
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement