This page is just an information dump for the lecture portion of the Quick Start with Linux so far, for my own notetaking purposes
Quick Start with Linux
-
Your First Linux Lab
Commands
- echo : repeats what you tell it to in the console put message in ""
- whoami : this responds with who the user is
- id : this displays more user information, it includes -un username, -uid(user id), -gid(group id), -groups(all groups), -root (superuser)
- pwd : print working directory, this displays your current location in file system
- ls : list the files and directories in your current working directory can use ~ to see contents of the home directory
- cd : change directory, this can be used to bring back to the start or cd.. for one directory back or cd name to go forward
- touch: can create new files and change timestamps
- cp : copies a file
- mv : moves or renames a file
- rm : removes a file
- rmdir : removes a directory, if its not empty you have to do this recursively with -r
- cat : displays the contents of a file you can use -n to add numbers to the content lines.
- head : displays the head of the file. You can use the -n1 option to show only the first line. You can also use -c1 to just display one character or byte.
- tail : shows the end of the file. You can also use the -n1 option to display the last line, up to the last 10 by default.
- diff : compares two files to see the differences between them.
- man : this displays the manual of a command. Example man cat will display the manual for the cat command.
- chown : modify the user and the group ownership of a file
- chmod : modify file permissions stands for change mode. r is for read, w for write, x is for execute.
- useradd : add a user to the computer we can use -m to give them a home directory
- usermod : modify user settings for a file
- grep : search for something in a file to debug errors
- userdel : delete a user
- uname: To check operating system information and ensure compatibility