cd to change directories Type cd followed by the name of a directory to accessthat directory.Keep in mind that you are always in a directory and allowed access to anydirectories hierarchically above or below. Ex:cd gamesIf the directory games is not located hierarchically below the current directory,then the complete path must be written out. Ex:cd /usr/gamesTo move up one directory, use the shortcut command. Ex:cd ..Use clear to clear the command prompt Type clear to clean up your command promptwindow.This is especially helpful when you are typing lots of commands and need a cleanwindow to help you focus.Ex:clearThis is also useful when you are getting ready to type a rather long command anddo not wish to become confused by other details on the screen.Use date to set your server's date and time Type date followed by the two digitmonth, the two digit date, the two digit time, and two digit minutes. The syntaxis easy enough and resembles this: MMDDhhmmThis command is helpful but must be used when superuser or logged in as root.Otherwise you will get an "Operation not permitted" reply.As root user you can usethe command such as:date 11081300The above command will set the server date and time to the 11th month (November),the 8th day, at 1:00pm.Use df to check disk space Typing df provides a very quick check of your filesystem disk space.Type df -h to get a more easily readable version of the output. Notice that thiscommand will include all applicable storage such as your hard disk/s (hda, hdbetc.) and your server SWAP file (shm). To list disk space including filesystemtype:df -h -TUse finger to see who's on the system Typing finger allows you to see who else ison the system or get detailed information about a person who has access to thesystem.Type finger followed by the name of a user's account to get information about thatuser. Or, type finger and press enter to see who's on the system and what they aredoing. Ex:finger johndoeUse logout to quit using the system Yep, you guessed it, typing logout will logyour account out of the system.Type logout at the prompt to disconnect from your Linux machine or to logout aparticular user session from the system. Keep in mind that although rudimentary,leaving your critical account logged on may be a security concern. We alwaysrecommend promptly using logout when you are finished using your root account! Ex:logoutUse ls to list files and directories Type ls to see a list of the files anddirectories located in the current directory. If you’re in the directory namedgames and you type ls, a list will appear that contains files in the gamesdirectory and sub-directories in the games directory. Examples:ls Maills /usr/binType ls -alt to see a list of all files (including .rc files) and all directorieslocated in the current directory. The listing will include detailed, often usefulinformation. Examples:ls -altls -alt /usr/bin
Leave a Comment