This blog gives an introduction to using the basic command line interface terminal. In order to work with file and directory effectively, I hope this blog is helpful for users who use Linux.
1. pwd (print working directory): The pwd command allow you to know in which directory you're located. Example: "pwd" in the Desktop directory will show "~/Desktop".
2. sudo (superuser do): the sudo command allows a permitted user to execute a command as the superuser or another user, as specified in thesudoers file.
3. cd: The cd command will allow you to change directories.
- "cd/" to navigate into the root directory
- "cd" or "cd ~" to navigate to your home directory
- "cd .." to navigate up one directory level
- "cd -" to navigate (or back) to the previous directory
- "ls -l" display information of files/directories, time created, adminitration of these files/directories
- "ls -a" display list of files, hidden directories in the current directory
- "cp scuti blog" will make an cope of file "scuti" and name it "blog", but the file "scuti" will still be there.
- If you want to cope a directory, use "cp -a /path/from /path/to"
- "mv scuti asia" will rename the file "scuti" to "asia".
- "mv scuti ~/Desktop" will move the file "scuti" to your Desktop directory, but it will not rename it. You must specify a new file name to rename a file.
8. rmdir (remove directory): The rmdir command will delete an empty directory. To delete a directory and all of its contents recursively, use rm -r instead.
9. history: Display all of the previous commands you typed.
10. mkdir (make directory): This command allows you to make new directories. Example: "mkdir cookstar" will create a directory called "cookstar".
0 Comments:
Post a Comment