Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8436789
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T07:16:39+00:00 2026-06-10T07:16:39+00:00

What script and where I should write in order to define: alias for ll=ls

  • 0

What script and where I should write in order to define:

  1. alias for ll="ls -l"
  2. alias/function cd = "original cd; ll"

So, my question has to parts where is the rc files of the Power Shell on Windows 7 and how to alias ll to ls -l and cd to cd; ll?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T07:16:40+00:00Added an answer on June 10, 2026 at 7:16 am

    Create a file in the place where the power shell points when you type $profile and press enter, if it does not exist. (For more info look here.)

    Also I have found a lots of good examples next to the powershell.exe in my system there is an example folder, where there is a file named profile.ps1 with the following code:

    set-alias cat        get-content
    set-alias cd         set-location
    set-alias clear      clear-host
    set-alias cp         copy-item
    set-alias h          get-history
    set-alias history    get-history
    set-alias kill       stop-process
    set-alias lp         out-printer
    set-alias ls         get-childitem
    set-alias mount      new-mshdrive
    set-alias mv         move-item
    set-alias popd       pop-location
    set-alias ps         get-process
    set-alias pushd      push-location
    set-alias pwd        get-location
    set-alias r          invoke-history
    set-alias rm         remove-item
    set-alias rmdir      remove-item
    set-alias echo       write-output
    
    set-alias cls        clear-host
    set-alias chdir      set-location
    set-alias copy       copy-item
    set-alias del        remove-item
    set-alias dir        get-childitem
    set-alias erase      remove-item
    set-alias move       move-item
    set-alias rd         remove-item
    set-alias ren        rename-item
    set-alias set        set-variable
    set-alias type       get-content
    
    function help
    {
        get-help $args[0] | out-host -paging
    }
    
    function man
    {
        get-help $args[0] | out-host -paging
    }
    
    function mkdir
    {
        new-item -type directory -path $args
    }
    
    function md
    {
        new-item -type directory -path $args
    }
    
    function prompt
    {
        "PS " + $(get-location) + "> "
    }
    
    & {
        for ($i = 0; $i -lt 26; $i++) 
        { 
            $funcname = ([System.Char]($i+65)) + ':'
            $str = "function global:$funcname { set-location $funcname } " 
            invoke-expression $str 
        }
    }
    

    Also take into account the following problem. You may have the following error while executing the file located in $profile:

    “Microsoft.PowerShell_profile.ps” cannot be loaded because the execution of scripts is disabled on this system. Please see “get-help about_signing” for more details.

    Solution:
    Check the current execution-policy

    PS C:\Windows\System32> Get-ExecutionPolicy
    Restricted
    PS C:\Windows\System32>
    

    To change the execution policy to allow PowerShell to execute scripts from local files, run the following command:

    PS C:\Windows\System32> Set-Executionpolicy RemoteSigned -Scope CurrentUser
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have one shell script opening a perl script. This perl script should be
The script below should open all the files inside the folder 'pruebaba' recursively but
I would like to write a small notification script using python watchdog for windows.
Ive got this function as a html helper which should write a javascript function
This simple script should theoretically check the form for errors and then print any
I have a Perl script which calls another script. The Perl script should be
This would be an example of database table: PHP script should limit query result
Hallo I want to make an file upload. The script should take the image,
I want to make a little php poll. The script should ask the users
From what I understand, the output from the following script should include Win32_PerfRawData_PerfDisk_PhysicalDisk in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.